summaryrefslogtreecommitdiff
path: root/time/tzset.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-23 21:40:11 +0000
committerRoland McGrath <roland@gnu.org>1996-07-23 21:40:11 +0000
commitb24be05f19d1471526b4643d96c078d32ec1c692 (patch)
tree63907e014c30ac36f9ab6714dce8e945da305deb /time/tzset.c
parente3047adb46007d1c8a81c0f10c74f7d4f8fdbd22 (diff)
Tue Jul 23 02:49:58 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/iso-4217.def: Add India to comment for symbol "INR ". Reported by Raja R Harinath <harinath@cs.umn.edu>. Sat Jul 20 14:03:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/dl-machine.h (elf_machine_rela): Remove bogus #undef RESOLVE. * time/tzset.c: Include <libc-lock.h>. (__tzset_lock): New lock variable. (tzset): New function (weak defn), no longer weak alias for __tzset. Call __tzset while holding __tzset_lock. * time/localtime.c: Include <libc-lock.h>. (__localtime_r): Hold __tzset_lock while doing the work.
Diffstat (limited to 'time/tzset.c')
-rw-r--r--time/tzset.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/time/tzset.c b/time/tzset.c
index d3a33dc1ce..a4fa8e358b 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -483,5 +483,19 @@ DEFUN(__tz_compute, (timer, tm),
return 1;
}
+
+#include <libc-lock.h>
+
+/* This locks all the state variables in tzfile.c and this file. */
+__libc_lock_define (, __tzset_lock)
+
+/* Reinterpret the TZ environment variable and set `tzname'. */
-weak_alias (__tzset, tzset)
+weak_symbol (tzset)
+void
+tzset (void)
+{
+ __libc_lock_lock (__tzset_lock);
+ __tzset ();
+ __libc_lock_unlock (__tzset_lock);
+}