From 9d6d4ac6476107b42a9bdca8e794fdb309aeca28 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 25 Nov 2008 15:52:24 +0000 Subject: - hide some time related relocs --- include/time.h | 3 +-- libc/misc/time/time.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/time.h b/include/time.h index a96fcae04..66ad43c8a 100644 --- a/include/time.h +++ b/include/time.h @@ -288,8 +288,7 @@ extern char *ctime_r (__const time_t *__restrict __timer, /* Defined in localtime.c. */ -#ifdef __UCLIBC_MJN3_ONLY__ -#warning "mjn3 FIXME: __tzname, __daylight, and __timezone have a prototype but are not defined." +#if 0 extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index ae800e1ca..4bc1aafd9 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -1747,9 +1747,12 @@ static const char vals[] = { #define DEFAULT_2007_RULES (vals + 38) /* Initialize to UTC. */ -int daylight = 0; -long timezone = 0; -char *tzname[2] = { (char *) UTC, (char *) (UTC-1) }; +int __daylight attribute_hidden = 0; +weak_alias(__daylight, daylight) +long __timezone attribute_hidden = 0; +weak_alias(__timezone, timezone) +char *__tzname[2] attribute_hidden = { (char *) UTC, (char *) (UTC-1) }; +weak_alias(__tzname, tzname) __UCLIBC_MUTEX_INIT(_time_tzlock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP); @@ -2059,10 +2062,10 @@ SKIP_OFFSET: memcpy(_time_tzinfo, new_rules, sizeof(new_rules)); DONE: - tzname[0] = _time_tzinfo[0].tzname; - tzname[1] = _time_tzinfo[1].tzname; - daylight = !!_time_tzinfo[1].tzname[0]; - timezone = _time_tzinfo[0].gmt_offset; + __tzname[0] = _time_tzinfo[0].tzname; + __tzname[1] = _time_tzinfo[1].tzname; + __daylight = !!_time_tzinfo[1].tzname[0]; + __timezone = _time_tzinfo[0].gmt_offset; #if defined(__UCLIBC_HAS_TZ_FILE__) || defined(__UCLIBC_HAS_TZ_CACHING__) FAST_DONE: -- cgit v1.2.3