summaryrefslogtreecommitdiff
path: root/libc/misc/time
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-11-16 21:10:07 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-11-16 21:10:07 +0000
commit439df74f73edc3c2045080df470b89cb92e41a4e (patch)
tree48920f9227fb7d8073b0a21651e77fcd9397de38 /libc/misc/time
parentf6552f749d672154866d7b82f4edba2321b80b97 (diff)
I forgot to update the thread locking in the last dst fix.
Diffstat (limited to 'libc/misc/time')
-rw-r--r--libc/misc/time/time.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 5bda87039..69e688b40 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -126,6 +126,8 @@
* list.
*
* Fix a dst-related bug which resulted in use of uninitialized data.
+ *
+ * Nov 15, 2003 I forgot to update the thread locking in the last dst fix.
*/
#define _GNU_SOURCE
@@ -2100,6 +2102,8 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success)
register const unsigned char *s;
int d, default_dst;
+ TZLOCK;
+
tzset();
memcpy(p, timeptr, sizeof(struct tm));
@@ -2135,8 +2139,6 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success)
--d;
}
- TZLOCK;
-
#ifdef __BCC__
d = p[5] - 1;
days = -719163L + ((long)d)*365 + ((d/4) - (d/100) + (d/400) + p[3] + p[7]);