Browse Source

A few symbols needed for testing

Eric Andersen 22 years ago
parent
commit
6dd7cf3090
2 changed files with 9 additions and 2 deletions
  1. 9 0
      libc/misc/time/localtime.c
  2. 0 2
      libc/misc/time/strftime.c

+ 9 - 0
libc/misc/time/localtime.c

@@ -2,6 +2,15 @@
 #include <time.h>
 #include <sys/time.h>
 
+/* These globals are exported by the C library */
+char *__tzname[2] = { (char *) "GMT", (char *) "GMT" };
+int __daylight = 0;
+long int __timezone = 0L;
+weak_alias (__tzname, tzname);
+weak_alias (__daylight, daylight);
+weak_alias (__timezone, timezone);
+
+
 extern void __tm_conv();
 
 struct tm *localtime(timep)

+ 0 - 2
libc/misc/time/strftime.c

@@ -145,10 +145,8 @@ size_t strftime( char *s , size_t maxsize , const char *format , register const
 #if HAVE_TM_ZONE
   zone = (const char *) tp->tm_zone;
 #endif
-#if HAVE_TZNAME
   if (!(zone && *zone) && tp->tm_isdst >= 0)
     zone = tzname[tp->tm_isdst];
-#endif
   if (!(zone && *zone))
     zone = "???";