浏览代码

I forgot to update the thread locking in the last dst fix.

Manuel Novoa III 21 年之前
父节点
当前提交
439df74f73
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      libc/misc/time/time.c

+ 4 - 2
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]);