about summary refs log tree commit diff
path: root/time/mktime.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-07-08 00:44:35 +0000
committerUlrich Drepper <drepper@redhat.com>1997-07-08 00:44:35 +0000
commit9c2322bc08c01e34c7488ef12c1d1bf26097190b (patch)
treeec433de31ad6b94ffc5b422c95fcefb9895fd571 /time/mktime.c
parent762a2918eee55943319f2c81f35257d59450ad5b (diff)
downloadglibc-9c2322bc08c01e34c7488ef12c1d1bf26097190b.tar.gz
glibc-9c2322bc08c01e34c7488ef12c1d1bf26097190b.tar.xz
glibc-9c2322bc08c01e34c7488ef12c1d1bf26097190b.zip
1997-07-08 02:18  Ulrich Drepper  <drepper@cygnus.com>

	* 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 <kukuk@uni-paderborn.de>.

	* 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 <rms@gnu.ai.mit.edu>.
Diffstat (limited to 'time/mktime.c')
-rw-r--r--time/mktime.c46
1 files changed, 23 insertions, 23 deletions
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 <config.h>
+# include <config.h>
 #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 <sys/types.h>		/* Some systems define `time_t' here.  */
 #include <time.h>
 
 #if HAVE_LIMITS_H
-#include <limits.h>
+# include <limits.h>
 #endif
 
 #if DEBUG
-#include <stdio.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#endif
+# include <stdio.h>
+# if STDC_HEADERS
+#  include <stdlib.h>
+# 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 */