Rename xclone to xmemdup. Remove obsolete xalloc macros.
[gnulib.git] / lib / mktime.c
index 5a17eec..ce3de58 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert a `struct tm' to a time_t value.
-   Copyright (C) 1993-1999, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1993-1999, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert (eggert@twinsun.com).
 
 # 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.  */
 
 #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 */
@@ -114,6 +108,7 @@ const unsigned short int __mon_yday[2][13] =
 # include "time_r.h"
 # undef __localtime_r
 # define __localtime_r localtime_r
+# define __mktime_internal mktime_internal
 #endif
 
 /* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
@@ -236,7 +231,8 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
    the monotonic and mostly-unit-linear conversion function CONVERT.
    Use *OFFSET to keep track of a guess at the offset of the result,
    compared to what the result would be for UTC without leap seconds.
-   If *OFFSET's guess is correct, only one CONVERT call is needed.  */
+   If *OFFSET's guess is correct, only one CONVERT call is needed.
+   This function is external because it is used also by timegm.c.  */
 time_t
 __mktime_internal (struct tm *tp,
                   struct tm *(*convert) (const time_t *, struct tm *),
@@ -625,6 +621,6 @@ main (int argc, char **argv)
 \f
 /*
 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:
 */