]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Avoid a link-time failure on some Linux systems.
authorJim Meyering <jim@meyering.net>
Tue, 19 Nov 2002 08:05:29 +0000 (08:05 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 19 Nov 2002 08:05:29 +0000 (08:05 +0000)
(STATIC): Define to be empty (_LIBC) or `static' (otherwise).
(__mon_yday): Declare with the STATIC attribute.
(__mktime_internal): Likewise.
Based on a report from Greg Schafer.

lib/mktime.c

index 00354703ae703b95fd84973b185ae0ba70bc9ae4..21926fc7824ecc7dd40e02424f15b0add18969b5 100644 (file)
@@ -29,6 +29,9 @@
 #ifdef _LIBC
 # define HAVE_LIMITS_H 1
 # define STDC_HEADERS 1
+# define STATIC /* empty */
+#else
+# define STATIC static
 #endif
 
 /* Assume that leap seconds are possible, unless told otherwise.
 #endif
 
 /* How many days come before each month (0-12).  */
-const unsigned short int __mon_yday[2][13] =
+STATIC const unsigned short int __mon_yday[2][13] =
   {
     /* Normal years.  */
     { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
@@ -213,7 +216,7 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
    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.  */
-time_t
+STATIC time_t
 __mktime_internal (struct tm *tp,
                   struct tm *(*convert) (const time_t *, struct tm *),
                   time_t *offset)