From 439df74f73edc3c2045080df470b89cb92e41a4e Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Sun, 16 Nov 2003 21:10:07 +0000 Subject: I forgot to update the thread locking in the last dst fix. --- libc/misc/time/time.c | 6 ++++-- 1 file 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]); -- cgit v1.2.3