about summary refs log tree commit diff
path: root/time/time.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-09-12 02:51:03 +0000
committerUlrich Drepper <drepper@redhat.com>1996-09-12 02:51:03 +0000
commitf0f1bf8536fe660cb6230a22694f9b7e6b02605e (patch)
treea26814737a9eb5d4d5f4b0144f2fe610057a5d62 /time/time.h
parent158ff48e348ece17fbda4d9b3c152df2f7cc76d0 (diff)
downloadglibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.tar.gz
glibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.tar.xz
glibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.zip
update from main archive 960911 cvs/libc-960912
Thu Sep 12 03:35:27 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/i386/Dist: Remove init-first.h.
	* sysdeps/unix/sysv/linux/m68k/Dist: Likewise.
	* sysdeps/unix/sysv/linux/Dist: Add init-first.h.

1996-09-11  Paul Eggert  <eggert@twinsun.com>

	* strftime.c (strftime):
	Handle E and O modifiers, required for POSIX.2 and XPG4.
	Don't use sprintf to format numbers; this way, we can handle time_t
	correctly regardless of whether it's signed.
	Don't dump core if format ends in %.
	In default %c format, use %e instead of %d, for POSIX.2 compatibility.
	For %z:
		Use tm_gmtoff if available.
		Output nothing if tm_isdst is negative.
		Output correct value even if arg is 1969-12-31 23:59:59 UTC.
		Don't assume that UTC offset is less than 24 hours;
		Posix requires support for 24 hours, and there's no point
		limiting it at all.
	(HAVE_TM_GMTOFF, TYPE_SIGNED, INT_STRLEN_BOUND): New macros.
	(CHAR_BIT): Define if <limits.h> doesn't.
	(tm_diff): New function.
	(fmt, <stdio.h>): Remove; no longer used.

Thu Sep 12 02:21:44 1996  Ulrich Drepper  <drepper@cygnus.com>

	* db/Makefile: Add extra-libs-others variable so that shared
	library is built in `others' pass.
	* elf/Makefile: Likewise.
	* math/Makefile: Likewise.
	* resolv/Makefile: Likewise.

	* Makefile (generated): Add version.info.h.

	* time/checktab.awk: New file.  From ADO 96k.
	* time/iso3166.tab: Likewise.
	* time/tzselect.ksh: Likewise.
	* time/zone.tab: Likewise.

	* stdio-common/vfprintf.c: Correct cleanup registration.  We
	cannot use a macro

1996-09-11  Paul Eggert  <eggert@twinsun.com>

	* time/time.h (tm_gmtoff, tm_zone): Prefix with `__' unless
	__USE_BSD; this is required for ANSI C compatibility.
	* manual/time.texi: Replace GMT by UTC, daylight savings by
 	daylight saving, timezone by time zone.
	Rewrite description of %V to match ISO 8601.
	Fix TZ Posix string example for US Eastern time.
	Explain tzname[1] when DST isn't used.
	Explain tzname when multiple abbreviations used (e.g. EST/EWT/EDT).
	Explain that timezone's sign is opposite from tm_gmtoff, and that
	timezone lacks DST adjustment whereas tm_gmtoff has it.
	Deprecate tzname and timezone.

Tue Sep 10 14:46:16 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	Implement Roland McGrath's idea of how to put an .interp into
	shared libraries.
	* interp.c: New file.
	* Makerules (interp-obj): New object, linked into every shared
	library.
	(common-generated): Add interp.so.
	(CFLAGS-interp.c): Pass name of interpreter.

Tue Sep 10 21:09:35 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* db/Makefile: Fix typo.

Tue Sep 10 19:29:53 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* nss/db-Makefile ($(VAR_DB)/passwd.db): Look for multiple
	occurences of the same uid, and only generate a mapping for the
	first one.

Tue Sep 10 03:14:59 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/system.c: New file, to override
	sysdeps/unix/system.c.

Tue Sep 10 15:05:40 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makefile (before-compile): Add version-info.h, needed to build
	version.d.

Tue Sep 10 14:14:33 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/m68k/sysdep.S: Remove check for
	EWOULDBLOCK, never true on Linux.
	(__errno_location): New function.
	[_LIBC_REENTRANT]: Set errno using __errno_location function.
	* sysdeps/unix/sysv/linux/m68k/sysdep.h [PIC]: Add second
 	syscall_error handler for reentrant libc.

Tue Sep 10 13:27:49 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/Makefile (extra-objs): Add eval.so to get dependencies.

Wed Sep 11 04:40:57 1996  Ulrich Drepper  <drepper@cygnus.com>

	* time/tzset.c (__tzname_cur_max): Use type `size_t' to avoid
 	warning.
	* time/tzfile.c (compute_tzname_max): Likewise.
Diffstat (limited to 'time/time.h')
-rw-r--r--time/time.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/time/time.h b/time/time.h
index 6b955f1986..f4c27f926e 100644
--- a/time/time.h
+++ b/time/time.h
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA.  */
 
 #ifndef	_TIME_H
 
-#if	(! defined (__need_time_t) && !defined(__need_clock_t) && \
+#if	(! defined (__need_time_t) && !defined (__need_clock_t) && \
 	 ! defined (__need_timespec))
 #define	_TIME_H		1
 #include <features.h>
@@ -54,8 +54,8 @@ __BEGIN_DECLS
 #endif /* <time.h> included.  */
 
 
-#if	!defined(__clock_t_defined) &&			\
-	(defined(_TIME_H) || defined(__need_clock_t))
+#if	!defined (__clock_t_defined) &&			\
+	(defined (_TIME_H) || defined (__need_clock_t))
 #define	__clock_t_defined	1
 
 #include <gnu/types.h>
@@ -66,8 +66,8 @@ typedef __clock_t clock_t;
 #endif /* clock_t not defined and <time.h> or need clock_t.  */
 #undef	__need_clock_t
 
-#if	!defined(__time_t_defined) &&			\
-	(defined(_TIME_H) || defined(__need_time_t))
+#if	!defined (__time_t_defined) &&			\
+	(defined (_TIME_H) || defined (__need_time_t))
 #define	__time_t_defined	1
 
 #include <gnu/types.h>
@@ -79,7 +79,7 @@ typedef __time_t time_t;
 #undef	__need_time_t
 
 
-#if	! defined(__timespec_defined) &&			\
+#if	! defined (__timespec_defined) &&			\
 	((defined (_TIME_H) && defined (__USE_POSIX)) ||	\
 	 defined (__need_timespec))
 #define	__timespec_defined	1
@@ -101,7 +101,7 @@ struct timespec
 /* Used by other time functions.  */
 struct tm
 {
-  int tm_sec;			/* Seconds.	[0-61] (2 leap seconds) */
+  int tm_sec;			/* Seconds.	[0-60] (1 leap second) */
   int tm_min;			/* Minutes.	[0-59] */
   int tm_hour;			/* Hours.	[0-23] */
   int tm_mday;			/* Day.		[1-31] */
@@ -110,8 +110,14 @@ struct tm
   int tm_wday;			/* Day of week.	[0-6] */
   int tm_yday;			/* Days in year.[0-365]	*/
   int tm_isdst;			/* DST.		[-1/0/1]*/
-  long int tm_gmtoff;		/* Seconds west of UTC.  */
+
+#ifdef	__USE_BSD
+  long int tm_gmtoff;		/* Seconds east of UTC.  */
   __const char *tm_zone;	/* Timezone abbreviation.  */
+#else
+  long int __tm_gmtoff;		/* Seconds east of UTC.  */
+  __const char *__tm_zone;	/* Timezone abbreviation.  */
+#endif
 };
 
 #endif /* <time.h> included.  */
@@ -190,7 +196,7 @@ extern void __offtime __P ((__const time_t *__timer,
    that is the representation of TP in this format.  */
 extern char *asctime __P ((__const struct tm *__tp));
 
-/* Equivalent to `asctime(localtime(timer))'.  */
+/* Equivalent to `asctime (localtime (timer))'.  */
 extern char *ctime __P ((__const time_t *__timer));
 
 #ifdef	__USE_REENTRANT
@@ -201,14 +207,14 @@ extern char *ctime __P ((__const time_t *__timer));
 extern char *__asctime_r __P ((__const struct tm *__tp, char *__buf));
 extern char *asctime_r __P ((__const struct tm *__tp, char *__buf));
 
-/* Equivalent to `asctime_r(localtime_r(timer, *TMP*), buf)'.  */
+/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'.  */
 extern char *ctime_r __P ((__const time_t *__timer, char *__buf));
 #endif	/* reentrant */
 
 
 /* Defined in localtime.c.  */
 extern char *__tzname[2];	/* Current timezone names.  */
-extern int __daylight;		/* If it is daylight savings time.  */
+extern int __daylight;		/* If daylight-saving time is ever in use.  */
 extern long int __timezone;	/* Seconds west of UTC.  */
 
 /* Set time conversion information from the TZ environment variable.