Alexandre Julliard : wmc: Don't put timestamps in generated files.

Alexandre Julliard julliard at winehq.org
Fri Jan 10 14:44:53 CST 2014


Module: wine
Branch: stable
Commit: 4665c33a77abdf3bf0f82470581afa94cc75b42b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4665c33a77abdf3bf0f82470581afa94cc75b42b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Oct 28 14:18:37 2013 +0100

wmc: Don't put timestamps in generated files.

(cherry picked from commit f775f3e105f3c923368114aa839140d173f1f4d0)

---

 tools/wmc/wmc.c   |    2 --
 tools/wmc/wmc.h   |    3 ---
 tools/wmc/write.c |   17 +++++------------
 3 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c
index a08d733..9d34a40 100644
--- a/tools/wmc/wmc.c
+++ b/tools/wmc/wmc.c
@@ -174,8 +174,6 @@ int main(int argc,char *argv[])
 	signal( SIGHUP, exit_on_signal );
 #endif
 
-	now = time(NULL);
-
 	/* First rebuild the commandline to put in destination */
 	/* Could be done through env[], but not all OS-es support it */
 	cmdlen = 5; /* for "wmc " and \0 */
diff --git a/tools/wmc/wmc.h b/tools/wmc/wmc.h
index cf6d430..9ef9ac7 100644
--- a/tools/wmc/wmc.h
+++ b/tools/wmc/wmc.h
@@ -21,8 +21,6 @@
 #ifndef __WMC_WMC_H
 #define __WMC_WMC_H
 
-#include <time.h>	/* For time_t */
-
 #include "wmctypes.h"
 
 /*
@@ -51,7 +49,6 @@ extern char *output_name;
 extern char *input_name;
 extern char *header_name;
 extern char *cmdline;
-extern time_t now;
 
 extern int line_number;
 extern int char_number;
diff --git a/tools/wmc/write.c b/tools/wmc/write.c
index cf170d4..19cd5b3 100644
--- a/tools/wmc/write.c
+++ b/tools/wmc/write.c
@@ -91,7 +91,6 @@ static const char str_header[] =
 	"/* This file is generated with wmc version " PACKAGE_VERSION ". Do not edit! */\n"
 	"/* Source : %s */\n"
 	"/* Cmdline: %s */\n"
-	"/* Date   : %s */\n"
 	"\n"
         ;
 
@@ -178,11 +177,9 @@ void write_h_file(const char *fname)
 		perror(fname);
 		exit(1);
 	}
-	cptr = ctime(&now);
-	killnl(cptr, 0);
-	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline, cptr);
-	fprintf(fp, "#ifndef __WMCGENERATED_%08lx_H\n", (long)now);
-	fprintf(fp, "#define __WMCGENERATED_%08lx_H\n", (long)now);
+	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline);
+	fprintf(fp, "#ifndef __WMCGENERATED_H\n");
+	fprintf(fp, "#define __WMCGENERATED_H\n");
 	fprintf(fp, "\n");
 
 	/* Write severity and facility aliases */
@@ -501,18 +498,14 @@ static void write_rcinline(FILE *fp)
 
 void write_rc_file(const char *fname)
 {
-	FILE *fp;
-	char *cptr;
+	FILE *fp = fopen(fname, "w");
 
-	fp = fopen(fname, "w");
 	if(!fp)
 	{
 		perror(fname);
 		exit(1);
 	}
-	cptr = ctime(&now);
-	killnl(cptr, 0);
-	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline, cptr);
+	fprintf(fp, str_header, input_name ? input_name : "<stdin>", cmdline);
 
 	if(rcinline)
 		write_rcinline(fp);




More information about the wine-cvs mailing list