bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] mktime changes to assume C89 or better


From: Paul Eggert
Subject: [Bug-gnulib] mktime changes to assume C89 or better
Date: Tue, 09 Sep 2003 16:24:28 -0700

I installed this:

2003-09-09  Paul Eggert  <address@hidden>

        * mktime.c (STDC_HEADERS): Remove.
        Include <stdlib.h>, <string.h> unconditionally.
        * mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.

Index: lib/mktime.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/mktime.c,v
retrieving revision 1.40
diff -p -u -r1.40 mktime.c
--- lib/mktime.c        6 Sep 2003 21:34:07 -0000       1.40
+++ lib/mktime.c        9 Sep 2003 22:39:03 -0000
@@ -25,10 +25,6 @@
 # include <config.h>
 #endif
 
-#ifdef _LIBC
-# define STDC_HEADERS 1
-#endif
-
 /* Assume that leap seconds are possible, unless told otherwise.
    If the host has a `zic' command with a `-L leapsecondfilename' option,
    then it supports leap seconds; otherwise it probably doesn't.  */
@@ -43,10 +39,8 @@
 
 #if DEBUG
 # include <stdio.h>
-# if STDC_HEADERS
-#  include <stdlib.h>
-#  include <string.h>
-# endif
+# include <stdlib.h>
+# include <string.h>
 /* Make it work even if the system's libc has its own mktime routine.  */
 # define mktime my_mktime
 #endif /* DEBUG */
@@ -625,6 +619,6 @@ main (int argc, char **argv)
 
 /*
 Local Variables:
-compile-command: "gcc -DDEBUG -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
+compile-command: "gcc -DDEBUG -Wall -W -O -g mktime.c -o mktime"
 End:
 */
Index: m4/mktime.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/mktime.m4,v
retrieving revision 1.21
diff -p -u -r1.21 mktime.m4
--- m4/mktime.m4        6 Sep 2003 21:34:07 -0000       1.21
+++ m4/mktime.m4        9 Sep 2003 22:39:03 -0000
@@ -1,4 +1,4 @@
-# mktime.m4 serial 3
+# mktime.m4 serial 4
 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -199,6 +199,4 @@ AC_DEFUN([gl_FUNC_MKTIME],
 ])
 
 # Prerequisites of lib/mktime.c.
-AC_DEFUN([gl_PREREQ_MKTIME], [
-  AC_REQUIRE([AC_HEADER_STDC])
-])
+AC_DEFUN([gl_PREREQ_MKTIME], [:])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]