From f641982c71972cbf57eb9469d14af8629bf79d7b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 13 Feb 2007 00:28:52 +0000 Subject: [PATCH] Make q2c link under mingw32, by eliminating the dependency on localtime. Gnulib replaces localtime by a fixed version, but we don't link q2c against gnulib. q2c only uses localtime to put the time of processing into the output file, which I've never in practice found to be useful, so the patch just drops this feature. Patch #5740. --- src/language/lexer/ChangeLog | 9 +++++++++ src/language/lexer/q2c.c | 17 +++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/language/lexer/ChangeLog b/src/language/lexer/ChangeLog index a49c2fa9..f29c5859 100644 --- a/src/language/lexer/ChangeLog +++ b/src/language/lexer/ChangeLog @@ -1,3 +1,12 @@ +Sun Feb 11 20:31:51 2007 Ben Pfaff + + * q2c.c: Make q2c link under mingw32, by eliminating the + dependency on localtime. Gnulib replaces localtime by a fixed + version, but we don't link q2c against gnulib. q2c only uses + localtime to put the time of processing into the output file, + which I've never in practice found to be useful, so the patch just + drops this feature. + Wed Dec 13 21:00:24 2006 Ben Pfaff * variable-parser.c (parse_variables): If not successful, set diff --git a/src/language/lexer/q2c.c b/src/language/lexer/q2c.c index 0b21afba..4ba008fa 100644 --- a/src/language/lexer/q2c.c +++ b/src/language/lexer/q2c.c @@ -23,14 +23,15 @@ #include #include #include -#include +#include +#include #include #include + #include #include -#include -#include "exit.h" +#include "exit.h" /* Max length of an input line. */ #define MAX_LINE_LEN 1024 @@ -1875,18 +1876,10 @@ dump_parser (int persistent) static void dump_header (void) { - time_t curtime; - struct tm *loctime; - char *timep; - indent = 0; - curtime = time (NULL); - loctime = localtime (&curtime); - timep = asctime (loctime); - timep[strlen (timep) - 1] = 0; dump (0, "/* %s\t\t-*- mode: c; buffer-read-only: t -*-", ofn); dump (0, nullstr); - dump (0, " Generated by q2c from %s on %s.", ifn, timep); + dump (0, " Generated by q2c from %s.", ifn); dump (0, " Do not modify!"); dump (0, " */"); } -- 2.30.2