diff --git a/sm5/atacmds.c b/sm5/atacmds.c
index 15f447b9b5922c97f3a65e02a0f889be8c816d1a..d0f3cb1e53bf88e0ba1f34b97b13989b1c034a4a 100644
--- a/sm5/atacmds.c
+++ b/sm5/atacmds.c
@@ -1,4 +1,3 @@
-//  $Id: atacmds.c,v 1.15 2002/10/22 08:43:22 ballen4705 Exp $
 /*
  * atacmds.c
  * 
@@ -31,6 +30,8 @@
 #include <errno.h>
 #include "atacmds.h"
 
+const char *CVSid1="$Id: atacmds.c,v 1.16 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 ;
+
 // These Drive Identity tables are taken from hdparm 5.2, and are also
 // given in the ATA/ATAPI specs for the IDENTIFY DEVICE command.  Note
 // that SMART was first added into the ATA/ATAPI-3 Standard with
diff --git a/sm5/atacmds.cpp b/sm5/atacmds.cpp
index 6982de9a8994817f3b355dad112d9614ce1c8872..42aa8ad71ccc9f6506150006f6e68d00272fa928 100644
--- a/sm5/atacmds.cpp
+++ b/sm5/atacmds.cpp
@@ -1,4 +1,3 @@
-//  $Id: atacmds.cpp,v 1.15 2002/10/22 08:43:22 ballen4705 Exp $
 /*
  * atacmds.c
  * 
@@ -31,6 +30,8 @@
 #include <errno.h>
 #include "atacmds.h"
 
+const char *CVSid1="$Id: atacmds.cpp,v 1.16 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 ;
+
 // These Drive Identity tables are taken from hdparm 5.2, and are also
 // given in the ATA/ATAPI specs for the IDENTIFY DEVICE command.  Note
 // that SMART was first added into the ATA/ATAPI-3 Standard with
diff --git a/sm5/atacmds.h b/sm5/atacmds.h
index 6c207736c0973e1b39e34519e03e42a0fedf03ba..c9995b9ac208ee9ba6ad5320c4a6b786950e5a63 100644
--- a/sm5/atacmds.h
+++ b/sm5/atacmds.h
@@ -1,4 +1,3 @@
-//  $Id: atacmds.h,v 1.14 2002/10/21 16:45:22 ballen4705 Exp $
 /*
  * atacmds.h
  *
@@ -26,6 +25,10 @@
 #ifndef _ATACMDS_H_
 #define _ATACMDS_H_
 
+#ifndef CVSID1
+#define CVSID1 "$Id: atacmds.h,v 1.15 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
+
 // These are the major and minor versions for smartd and smartctl
 #define PROJECTHOME "http://smartmontools.sourceforge.net/"
 #define RELEASE_MAJOR 5
diff --git a/sm5/ataprint.c b/sm5/ataprint.c
index 05d3fa84b72916146e18afbc7affeaac9eb3df4d..b510e12254dc3d5b28acf894557c96fbf532aefa 100644
--- a/sm5/ataprint.c
+++ b/sm5/ataprint.c
@@ -1,4 +1,3 @@
-//  $Id: ataprint.c,v 1.14 2002/10/21 16:00:48 ballen4705 Exp $
 /*
  * ataprint.c
  *
@@ -29,6 +28,8 @@
 #include "smartctl.h"
 #include "extern.h"
 
+const char *CVSid4="$Id: ataprint.c,v 1.15 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID2 CVSID3 CVSID6 ;
+
 // Function for printing ASCII byte-swapped strings, skipping white
 // space. This is needed on little-endian architectures, eg Intel,
 // Alpha. If someone wants to run this on SPARC they'll need to test
diff --git a/sm5/ataprint.cpp b/sm5/ataprint.cpp
index bfc6c5e07849063b8a47a38c725183217e70aad1..b1975143d99f4f999c6d0829d5395558678b5be1 100644
--- a/sm5/ataprint.cpp
+++ b/sm5/ataprint.cpp
@@ -1,4 +1,3 @@
-//  $Id: ataprint.cpp,v 1.14 2002/10/21 16:00:48 ballen4705 Exp $
 /*
  * ataprint.c
  *
@@ -29,6 +28,8 @@
 #include "smartctl.h"
 #include "extern.h"
 
+const char *CVSid4="$Id: ataprint.cpp,v 1.15 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID2 CVSID3 CVSID6 ;
+
 // Function for printing ASCII byte-swapped strings, skipping white
 // space. This is needed on little-endian architectures, eg Intel,
 // Alpha. If someone wants to run this on SPARC they'll need to test
diff --git a/sm5/ataprint.h b/sm5/ataprint.h
index 2184b51913c7feb52312e524fa4e092abc6e8cb9..6564e897342f817138984641027f517b79a12bf5 100644
--- a/sm5/ataprint.h
+++ b/sm5/ataprint.h
@@ -1,7 +1,5 @@
-//  $Id: ataprint.h,v 1.6 2002/10/20 19:22:02 ballen4705 Exp $
-
 /*
- * ataprint.c
+ * ataprint.h
  *
  * Home page of code is: http://smartmontools.sourceforge.net
  *
@@ -27,6 +25,10 @@
 #ifndef _SMART_PRINT_H_
 #define _SMART_PRINT_H_
 
+#ifndef CVSID2
+#define CVSID2 "$Id: ataprint.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include "atacmds.h"
diff --git a/sm5/extern.h b/sm5/extern.h
index a49096f4ff22608bbd70d18299ba0228f3e9ab9a..0d50f27059f9cf0a5c72f2f376820cd297f62898 100644
--- a/sm5/extern.h
+++ b/sm5/extern.h
@@ -1,4 +1,3 @@
-//  $Id: extern.h,v 1.6 2002/10/20 19:22:02 ballen4705 Exp $
 /*
  * extern.h
  *
@@ -26,6 +25,11 @@
 #ifndef _EXTERN_H_
 #define _EXTERN_H_
 
+
+#ifndef CVSID3
+#define CVSID3 "$Id: extern.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
+
 extern unsigned char driveinfo;
 extern unsigned char checksmart;
 extern unsigned char smartvendorattrib;
diff --git a/sm5/scsicmds.c b/sm5/scsicmds.c
index e2c276f09be3d0e1d4c2b858ccc73d8a4b49adc5..3f3dc2f13a634ac3639b56ae93a214105e644a60 100644
--- a/sm5/scsicmds.c
+++ b/sm5/scsicmds.c
@@ -1,5 +1,3 @@
-//  $Id: scsicmds.c,v 1.8 2002/10/22 08:43:22 ballen4705 Exp $
-
 /*
  * scsicmds.c
  *
@@ -35,7 +33,7 @@
 #include <scsi/scsi.h>
 #include "scsicmds.h"
 
-
+const char *CVSid2="$Id: scsicmds.c,v 1.9 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID4 ;
 
 
 UINT8 logsense (int device, UINT8 pagenum, UINT8 *pBuf)
diff --git a/sm5/scsicmds.cpp b/sm5/scsicmds.cpp
index d8fa1eb48c21d370533d16deb5c59929e1993697..d5eb436b182123471242a1220f4242d1247d2beb 100644
--- a/sm5/scsicmds.cpp
+++ b/sm5/scsicmds.cpp
@@ -1,5 +1,3 @@
-//  $Id: scsicmds.cpp,v 1.8 2002/10/22 08:43:22 ballen4705 Exp $
-
 /*
  * scsicmds.c
  *
@@ -35,7 +33,7 @@
 #include <scsi/scsi.h>
 #include "scsicmds.h"
 
-
+const char *CVSid2="$Id: scsicmds.cpp,v 1.9 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID4 ;
 
 
 UINT8 logsense (int device, UINT8 pagenum, UINT8 *pBuf)
diff --git a/sm5/scsicmds.h b/sm5/scsicmds.h
index 7843da88c6d2521c07ff30963255ddfaa0b9fb3e..8e1a3e9108d502d3c30c2ad25ca19a11da991845 100644
--- a/sm5/scsicmds.h
+++ b/sm5/scsicmds.h
@@ -1,4 +1,3 @@
-//  $Id: scsicmds.h,v 1.6 2002/10/22 08:43:22 ballen4705 Exp $
 /*
  * scsicmds.h
  *
@@ -27,6 +26,9 @@
 #ifndef SCSICMDS_H_
 #define SCSICMDS_H_
 
+#ifndef CVSID4
+#define CVSID4 "$Id: scsicmds.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
 
 #ifndef LOG_SENSE
 #define LOG_SENSE 0x4d
diff --git a/sm5/scsiprint.c b/sm5/scsiprint.c
index 140285eae2e573a59cedae1feceb8034635e25c3..c965f22e60cdb5f6e6d6d1d5a575d7ac0f5948da 100644
--- a/sm5/scsiprint.c
+++ b/sm5/scsiprint.c
@@ -1,4 +1,3 @@
-//  $Id: scsiprint.c,v 1.6 2002/10/15 14:24:27 ballen4705 Exp $
 /*
  * scsiprint.c
  *
@@ -37,6 +36,8 @@
 
 #define GBUF_SIZE 65535
 
+const char* CVSid5="$Id: scsiprint.c,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID3 CVSID4 CVSID5 CVSID6 ;
+
 UINT8 gBuf[GBUF_SIZE];
 
 UINT8 gSmartPage = 0;
diff --git a/sm5/scsiprint.cpp b/sm5/scsiprint.cpp
index fb8bc0099bb71a1fa4587aafb07be13614338027..3fd4414411f042b1ee89c70bab36439109c81734 100644
--- a/sm5/scsiprint.cpp
+++ b/sm5/scsiprint.cpp
@@ -1,4 +1,3 @@
-//  $Id: scsiprint.cpp,v 1.6 2002/10/15 14:24:27 ballen4705 Exp $
 /*
  * scsiprint.c
  *
@@ -37,6 +36,8 @@
 
 #define GBUF_SIZE 65535
 
+const char* CVSid5="$Id: scsiprint.cpp,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID3 CVSID4 CVSID5 CVSID6 ;
+
 UINT8 gBuf[GBUF_SIZE];
 
 UINT8 gSmartPage = 0;
diff --git a/sm5/scsiprint.h b/sm5/scsiprint.h
index d2625f4ebc86589a306732c7aee418a961b4ea8b..07b02c0f7a031fe81a061d5b26ed9dda1580620d 100644
--- a/sm5/scsiprint.h
+++ b/sm5/scsiprint.h
@@ -1,4 +1,3 @@
-//  $Id: scsiprint.h,v 1.5 2002/10/15 14:24:27 ballen4705 Exp $
 /*
  * scsiprint.h
  *
@@ -28,6 +27,9 @@
 #ifndef SCSI_PRINT_H_
 #define SCSI_PRINT_H_
 
+#ifndef CVSID5
+#define CVSID5 "$Id: scsiprint.h,v 1.6 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
 
 void scsiPrintMain (int fd);
 
diff --git a/sm5/smartctl.c b/sm5/smartctl.c
index 5f94abe9e075e0ab34e96f201d3652dfff61edb4..b619b2306a535edac6b5cfd2b59fc67a66270f2c 100644
--- a/sm5/smartctl.c
+++ b/sm5/smartctl.c
@@ -1,4 +1,3 @@
-//  $Id: smartctl.c,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $
 /*
  * smartctl.c
  *
@@ -37,6 +36,9 @@
 #include "scsicmds.h"
 #include "scsiprint.h"
 
+extern const char *CVSid1, *CVSid2, *CVSid4, *CVSid5; 
+const char* CVSid6="$Id: smartctl.c,v 1.12 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID2 CVSID4 CVSID5 CVSID6 ;
+
 unsigned char driveinfo               = FALSE;
 unsigned char checksmart              = FALSE;
 unsigned char smartvendorattrib       = FALSE;
@@ -229,7 +231,7 @@ int main (int argc, char **argv){
     printf("is free software, and you are welcome to redistribute it\n");
     printf("under the terms of the GNU General Public License Version 2.\n");
     printf("See http://www.gnu.org for further details.\n\n");
-    printf("CVS version ID %s\n","$Id: smartctl.c,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $");
+    printf("CVS version IDs of files used to build this code are:\n%s%s%s%s%s",CVSid1,CVSid2,CVSid4,CVSid5,CVSid6);
     if (argc==2)
       exit(0);
  }
diff --git a/sm5/smartctl.cpp b/sm5/smartctl.cpp
index 407eb7a8feb648ff67c2b22f9ebb1430b34b6a18..af444f0a041378df0fb132561fbfb05a5f32ecfe 100644
--- a/sm5/smartctl.cpp
+++ b/sm5/smartctl.cpp
@@ -1,4 +1,3 @@
-//  $Id: smartctl.cpp,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $
 /*
  * smartctl.c
  *
@@ -37,6 +36,9 @@
 #include "scsicmds.h"
 #include "scsiprint.h"
 
+extern const char *CVSid1, *CVSid2, *CVSid4, *CVSid5; 
+const char* CVSid6="$Id: smartctl.cpp,v 1.12 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID2 CVSID4 CVSID5 CVSID6 ;
+
 unsigned char driveinfo               = FALSE;
 unsigned char checksmart              = FALSE;
 unsigned char smartvendorattrib       = FALSE;
@@ -229,7 +231,7 @@ int main (int argc, char **argv){
     printf("is free software, and you are welcome to redistribute it\n");
     printf("under the terms of the GNU General Public License Version 2.\n");
     printf("See http://www.gnu.org for further details.\n\n");
-    printf("CVS version ID %s\n","$Id: smartctl.cpp,v 1.11 2002/10/21 08:49:23 ballen4705 Exp $");
+    printf("CVS version IDs of files used to build this code are:\n%s%s%s%s%s",CVSid1,CVSid2,CVSid4,CVSid5,CVSid6);
     if (argc==2)
       exit(0);
  }
diff --git a/sm5/smartctl.h b/sm5/smartctl.h
index 93586f0c8308f74add23e79ced79b231630fdbe6..d8ec2f2b2689a08648b0d263729c8117754c8a19 100644
--- a/sm5/smartctl.h
+++ b/sm5/smartctl.h
@@ -1,4 +1,3 @@
-//  $Id: smartctl.h,v 1.6 2002/10/15 14:24:27 ballen4705 Exp $
 /*
  * smartctl.h
  *
@@ -26,6 +25,10 @@
 #ifndef __SMARTCTL_H_
 #define __SMARTCTL_H_
 
+#ifndef CVSID6
+#define CVSID6 "$Id: smartctl.h,v 1.7 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
+
 /* Defines for command line options */ 
 #define DRIVEINFO		'i'
 #define CHECKSMART		'c'
diff --git a/sm5/smartd.c b/sm5/smartd.c
index b593fbcb9180f638ae54e4958a7f8640d05e38ed..48e152ce1eef0e31131a7ca459d728d3715ccdac 100644
--- a/sm5/smartd.c
+++ b/sm5/smartd.c
@@ -1,4 +1,3 @@
-//  $Id: smartd.c,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $
 /*
  * smartd.c
  *
@@ -38,6 +37,8 @@
 #include "scsicmds.h"
 #include "smartd.h"
 
+extern const char *CVSid1, *CVSid2;
+const char *CVSid3="$Id: smartd.c,v 1.11 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID4 CVSID7 ;
 
 int daemon_init(void){
   pid_t pid;
@@ -277,8 +278,7 @@ char copyleftstring[]=
 "smartd comes with ABSOLUTELY NO WARRANTY. This\n"
 "is free software, and you are welcome to redistribute it\n"
 "under the terms of the GNU General Public License Version 2.\n"
-"See http://www.gnu.org for further details.\n\n"
-"CVS Version ID $Id: smartd.c,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $\n";
+"See http://www.gnu.org for further details.\n\n";
 
 const char opts[] = { DEBUGMODE, EMAILNOTIFICATION, PRINTCOPYLEFT,'\0' };
 
@@ -321,6 +321,7 @@ int main (int argc, char **argv){
     printout(LOG_INFO,"smartd version %d.%d-%d Copyright (C) Bruce Allen 2002\n",
 		RELEASE_MAJOR,RELEASE_MINOR,SMARTMONTOOLS_VERSION);
     printout(LOG_INFO,copyleftstring);
+    printout(LOG_INFO,"CVS version IDs of files used to build this code are:\n%s%s%s",CVSid1,CVSid2,CVSid3);
     exit(0);
   }
   
diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp
index ce1aa9ff2fca8952d7aa55d37d206e0e15c2ce80..4ae422fca91515f00bb613f7c223f18363138b53 100644
--- a/sm5/smartd.cpp
+++ b/sm5/smartd.cpp
@@ -1,4 +1,3 @@
-//  $Id: smartd.cpp,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $
 /*
  * smartd.c
  *
@@ -38,6 +37,8 @@
 #include "scsicmds.h"
 #include "smartd.h"
 
+extern const char *CVSid1, *CVSid2;
+const char *CVSid3="$Id: smartd.cpp,v 1.11 2002/10/22 09:44:55 ballen4705 Exp $\n" CVSID1 CVSID4 CVSID7 ;
 
 int daemon_init(void){
   pid_t pid;
@@ -277,8 +278,7 @@ char copyleftstring[]=
 "smartd comes with ABSOLUTELY NO WARRANTY. This\n"
 "is free software, and you are welcome to redistribute it\n"
 "under the terms of the GNU General Public License Version 2.\n"
-"See http://www.gnu.org for further details.\n\n"
-"CVS Version ID $Id: smartd.cpp,v 1.10 2002/10/20 19:22:02 ballen4705 Exp $\n";
+"See http://www.gnu.org for further details.\n\n";
 
 const char opts[] = { DEBUGMODE, EMAILNOTIFICATION, PRINTCOPYLEFT,'\0' };
 
@@ -321,6 +321,7 @@ int main (int argc, char **argv){
     printout(LOG_INFO,"smartd version %d.%d-%d Copyright (C) Bruce Allen 2002\n",
 		RELEASE_MAJOR,RELEASE_MINOR,SMARTMONTOOLS_VERSION);
     printout(LOG_INFO,copyleftstring);
+    printout(LOG_INFO,"CVS version IDs of files used to build this code are:\n%s%s%s",CVSid1,CVSid2,CVSid3);
     exit(0);
   }
   
diff --git a/sm5/smartd.h b/sm5/smartd.h
index 88de270530ab1115bc1a87e9714a13de0f915fd3..40eeb79c66da0f7f4f24b59c491e4f104c8e4351 100644
--- a/sm5/smartd.h
+++ b/sm5/smartd.h
@@ -1,4 +1,3 @@
-//  $Id: smartd.h,v 1.5 2002/10/15 14:24:27 ballen4705 Exp $
 /*
  * smartd.h
  *
@@ -23,6 +22,10 @@
  *
  */
 
+#ifndef CVSID7
+#define CVSID7 "$Id: smartd.h,v 1.6 2002/10/22 09:44:55 ballen4705 Exp $\n"
+#endif
+
 /* Defines for command line options */ 
 #define DEBUGMODE 		'X'
 #define EMAILNOTIFICATION	'e'