svn commit: trunk/uClibc: include libc/misc/time

aldot at uclibc.org aldot at uclibc.org
Tue Nov 25 15:52:25 UTC 2008


Author: aldot
Date: 2008-11-25 07:52:24 -0800 (Tue, 25 Nov 2008)
New Revision: 24149

Log:
- hide some time related relocs


Modified:
   trunk/uClibc/include/time.h
   trunk/uClibc/libc/misc/time/time.c


Changeset:
Modified: trunk/uClibc/include/time.h
===================================================================
--- trunk/uClibc/include/time.h	2008-11-25 14:43:18 UTC (rev 24148)
+++ trunk/uClibc/include/time.h	2008-11-25 15:52:24 UTC (rev 24149)
@@ -288,8 +288,7 @@
 
 
 /* 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.  */

Modified: trunk/uClibc/libc/misc/time/time.c
===================================================================
--- trunk/uClibc/libc/misc/time/time.c	2008-11-25 14:43:18 UTC (rev 24148)
+++ trunk/uClibc/libc/misc/time/time.c	2008-11-25 15:52:24 UTC (rev 24149)
@@ -1747,9 +1747,12 @@
 #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 @@
 
 	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:




More information about the uClibc-cvs mailing list