From f775f3e105f3c923368114aa839140d173f1f4d0 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 28 Oct 2013 14:18:37 +0100 Subject: [PATCH] wmc: Don't put timestamps in generated files. --- 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 a08d733b0ed..9d34a40f30c 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 cf6d430759e..9ef9ac77a56 100644 --- a/tools/wmc/wmc.h +++ b/tools/wmc/wmc.h @@ -21,8 +21,6 @@ #ifndef __WMC_WMC_H #define __WMC_WMC_H -#include /* 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 cf170d489bf..19cd5b3ee06 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 : "", 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 : "", 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 : "", cmdline, cptr); + fprintf(fp, str_header, input_name ? input_name : "", cmdline); if(rcinline) write_rcinline(fp);