From 9c2322bc08c01e34c7488ef12c1d1bf26097190b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 8 Jul 1997 00:44:35 +0000 Subject: Update. 1997-07-08 02:18 Ulrich Drepper * io/lockf.c (lockf): Clear fl before using. Patch by sr@adb.fr. * libio/strops.c: Correctly handle _IO_write_end. * nss/libnss_files.map: Add __nss_netgroup_parseline. * nss/nss_files/files-netgroup.c (_nss_netgroup_parseline): Don't panic if setnetgrent wasn't called before, return error. Patch by Thorsten Kukuk . * time/mktime.c: Define localtime_r function as my_mktime_localtime_r if locally defined. * time/strftime.c: Define localtime_r function as my_ftime_localtime_r if locally defined. Define tm_diff function as ftime_tm_diff if locally defined. Reported by Richard Stallman . --- time/mktime.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'time/mktime.c') diff --git a/time/mktime.c b/time/mktime.c index 30438b5b10..5012888967 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -22,7 +22,7 @@ /* #define DEBUG 1 */ #ifdef HAVE_CONFIG_H -#include +# include #endif #ifdef _LIBC @@ -35,52 +35,52 @@ If the host has a `zic' command with a `-L leapsecondfilename' option, then it supports leap seconds; otherwise it probably doesn't. */ #ifndef LEAP_SECONDS_POSSIBLE -#define LEAP_SECONDS_POSSIBLE 1 +# define LEAP_SECONDS_POSSIBLE 1 #endif #include /* Some systems define `time_t' here. */ #include #if HAVE_LIMITS_H -#include +# include #endif #if DEBUG -#include -#if STDC_HEADERS -#include -#endif +# include +# if STDC_HEADERS +# include +# endif /* Make it work even if the system's libc has its own mktime routine. */ -#define mktime my_mktime +# define mktime my_mktime #endif /* DEBUG */ #ifndef __P -#if defined (__GNUC__) || (defined (__STDC__) && __STDC__) -#define __P(args) args -#else -#define __P(args) () -#endif /* GCC. */ +# if defined (__GNUC__) || (defined (__STDC__) && __STDC__) +# define __P(args) args +# else +# define __P(args) () +# endif /* GCC. */ #endif /* Not __P. */ #ifndef CHAR_BIT -#define CHAR_BIT 8 +# define CHAR_BIT 8 #endif #ifndef INT_MIN -#define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) +# define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) #endif #ifndef INT_MAX -#define INT_MAX (~0 - INT_MIN) +# define INT_MAX (~0 - INT_MIN) #endif #ifndef TIME_T_MIN /* The outer cast to time_t works around a bug in Cray C 5.0.3.0. */ -#define TIME_T_MIN ((time_t) \ +# define TIME_T_MIN ((time_t) \ (0 < (time_t) -1 ? (time_t) 0 \ : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))) #endif #ifndef TIME_T_MAX -#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) +# define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) #endif #define TM_YEAR_BASE 1900 @@ -89,7 +89,7 @@ #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ -#define __isleap(year) \ +# define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif @@ -109,11 +109,11 @@ time_t __mktime_internal __P ((struct tm *, #ifdef _LIBC -#define localtime_r __localtime_r +# define localtime_r __localtime_r #else -#if ! HAVE_LOCALTIME_R && ! defined (localtime_r) +# if ! HAVE_LOCALTIME_R && ! defined localtime_r /* Approximate localtime_r as best we can in its absence. */ -#define localtime_r my_localtime_r +# define localtime_r my_mktime_localtime_r static struct tm *localtime_r __P ((const time_t *, struct tm *)); static struct tm * localtime_r (t, tp) @@ -126,7 +126,7 @@ localtime_r (t, tp) *tp = *l; return tp; } -#endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */ +# endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */ #endif /* ! _LIBC */ -- cgit v1.2.3