about summary refs log tree commit diff
path: root/time/tzfile.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-07-14 21:49:20 +0000
committerUlrich Drepper <drepper@redhat.com>1997-07-14 21:49:20 +0000
commitcd6ede759fadcf8cd1f8c069928611d18cef5c1a (patch)
tree9d4bbf1daaf37c365dfa5234d1caf2b6b9547708 /time/tzfile.c
parentf21acc89c06c14160eab88246e9dbe0b17eb5f89 (diff)
downloadglibc-cd6ede759fadcf8cd1f8c069928611d18cef5c1a.tar.gz
glibc-cd6ede759fadcf8cd1f8c069928611d18cef5c1a.tar.xz
glibc-cd6ede759fadcf8cd1f8c069928611d18cef5c1a.zip
1997-07-14 23:37  Ulrich Drepper  <drepper@cygnus.com>

	* inet/getnameinfo.c: Pretty print.
	Correctly enlarge buffers.

	* login/programs/utmpd.c: Use _() instead of gettext().

	* nis/nss_nisplus/nisplus-hosts.c: Optimize some uses of stpcpy away.
	* nis/nss_nisplus/nisplus-network.c: Likewise.
	* nis/nss_nisplus/nisplus-proto.c: Likewise.
	* nis/nss_nisplus/nisplus-rpc.c: Likewise.
	* nis/nss_nisplus/nisplus-service.c: Likewise.

	* sysdeps/alpha/fpu/bits/mathinline.h: Only define functions if
	__OPTIMIZE__.
	* sysdeps/powerpc/bits/mathinline.h: Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h: Define ISO C9x comparison
	function always.
	* sysdeps/m68k/fpu/bits/mathinline.h: Likewise.
	* sysdeps/stub/bits/mathinline.h: Add conditionals to show how
	it should look like in real files.

	* sysdeps/generic/bits/select.h (__FD_ZERO): Don't use memset to
	prevent prototype trouble, use simple loop.
	* sysdeps/i386/bits/select.h [!__GNUC__] (__FD_ZERO): Likewise.

	* sysdeps/mips/mips64/Implies: Imply ieee754.

	* sysdeps/unix/sysv/linux/Makefile: Make sure bits/syscall.h is
	installed.
	* sysdeps/unix/sysv/linux/sys/syscal.h: Pretty print.

1997-07-14 00:25  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/stub/bits/stdio_lim.h: Unify with standalone version.
	* sysdeps/standalone/bits/stdio_lim.h: Removed.
	Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.

1997-06-22  Paul Eggert  <eggert@twinsun.com>

	* time/strftime.c (strftime): Use tm_zone if available, even if _LIBC.

	* time/tzfile.c (__tzstring): New decl.
	(__tzfile_read, __tzfile_default): Set __tzname to permanent strings.
	(__tzfile_default): First two args are now const char *.

	* time/tzset.c (__tzstring): New function.
	(tz_rule): Name is now const char *.
	(struct tzstring_head): New type.
	(tzstring_list, tzstring_last_buffer_size): New static vars.
	(__tzset_internal): Time zone names are now permanent, not temporary.
Diffstat (limited to 'time/tzfile.c')
-rw-r--r--time/tzfile.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index 2d0752c147..88e86e33b1 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -43,6 +43,8 @@ struct leap
     long int change;		/* Seconds of correction to apply.  */
   };
 
+extern const char * __tzstring (const char *); /* Defined in tzset.c.  */
+
 static struct ttinfo *find_transition (time_t timer);
 static void compute_tzname_max (size_t);
 
@@ -267,9 +269,9 @@ __tzfile_read (const char *file)
   info = find_transition (0);
   for (i = 0; i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]);
        ++i)
-    __tzname[types[i].isdst] = &zone_names[types[i].idx];
+    __tzname[types[i].isdst] = __tzstring (&zone_names[types[i].idx]);
   if (info->isdst < sizeof (__tzname) / sizeof (__tzname[0]))
-    __tzname[info->isdst] = &zone_names[info->idx];
+    __tzname[info->isdst] = __tzstring (&zone_names[info->idx]);
 
   compute_tzname_max (chars);
 
@@ -285,7 +287,8 @@ __tzfile_read (const char *file)
    from the TZDEFRULES file.  */
 
 void
-__tzfile_default (char *std, char *dst, long int stdoff, long int dstoff)
+__tzfile_default (const char *std, const char *dst,
+		  long int stdoff, long int dstoff)
 {
   size_t stdlen, dstlen, i;
   long int rule_offset, rule_stdoff, rule_dstoff;
@@ -372,8 +375,8 @@ __tzfile_default (char *std, char *dst, long int stdoff, long int dstoff)
   types[1].isdst = 1;
 
   /* Reset the zone names to point to the user's names.  */
-  __tzname[0] = &zone_names[0];
-  __tzname[1] = &zone_names[stdlen];
+  __tzname[0] = (char *) std;
+  __tzname[1] = (char *) dst;
 
   compute_tzname_max (stdlen + dstlen);
 }
@@ -455,7 +458,7 @@ __tzfile_compute (time_t timer, long int *leap_correct, int *leap_hit)
 void
 compute_tzname_max (size_t chars)
 {
-  extern size_t __tzname_cur_max; /* Defined in __tzset.c. */
+  extern size_t __tzname_cur_max; /* Defined in tzset.c. */
 
   const char *p;