Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/time PR/28324: Takayoshi Kochi: localtime_r(3) retu...



details:   https://anonhg.NetBSD.org/src/rev/1d8dd500cc12
branches:  trunk
changeset: 571289:1d8dd500cc12
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Nov 16 04:15:28 2004 +0000

description:
PR/28324: Takayoshi Kochi: localtime_r(3) returns GMT
Add missing tzset_unlocked(); as suggested.

diffstat:

 lib/libc/time/localtime.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b18efa9c0da6 -r 1d8dd500cc12 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Tue Nov 16 03:51:30 2004 +0000
+++ b/lib/libc/time/localtime.c Tue Nov 16 04:15:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.35 2003/12/20 00:12:05 kleink Exp $    */
+/*     $NetBSD: localtime.c,v 1.36 2004/11/16 04:15:28 christos Exp $  */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    7.78";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.35 2003/12/20 00:12:05 kleink Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.36 2004/11/16 04:15:28 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1132,6 +1132,7 @@
 struct tm *            tmp;
 {
        rwlock_rdlock(&lcl_lock);
+       tzset_unlocked();
        localsub(timep, 0L, tmp);
        rwlock_unlock(&lcl_lock);
        return tmp;



Home | Main Index | Thread Index | Old Index