diff lib/ChangeLog @ 4621:3d28ad4e18e2

Add time_r module. Change timegm, mktime, and strftime to use localtime_r and gmtime_r, now supplied by the time_r module. This fixes some timegm bugs and cleans up mktime and strftime a bit.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 06 Sep 2003 21:34:07 +0000
parents b0acbb185a60
children 13cc36518e0b
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,28 @@
+2003-09-06  Paul Eggert  <eggert@twinsun.com>
+
+	* time_r.c, time_r.h: New files.
+
+	* mktime.c (my_mktime_localtime_r): Remove; all uses changed to
+	__localtime_r.
+	(__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
+	(__mktime_internal) [!defined _LIBC]: Now extern, not static.
+
+	* strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
+	__gmtime_r.
+	(my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
+	(__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
+	Include <time_r.h>.
+
+	* timegm.c: Switch to glibc implementation, with the following changes:
+	[defined HAVE_CONFIG_H]: Include <config.h>.
+	[!defined _LIBC]: Include "timegm.h" rather than <time.h>.
+	(__mktime_internal) [!defined _LIBC]: New decl.
+	(__gmtime_r) [!defined _LIBC]: New macro and function.
+	(timegm): Use a prototype, since gnulib assumes C89.
+	Do not bother declaring tmp to be const, as it's not really usefu.
+	* timegm.h: Hoist "#include <time.h>" out of #ifdef.
+	(timegm): Declare only if HAVE_DECL_TIMEGM.
+
 2003-09-03  Paul Eggert  <eggert@twinsun.com>
 
 	* human.c (human_readable): Fix bug that rounded 10501 to 10k.