summaryrefslogtreecommitdiff
path: root/libc/misc/time
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-11-20 19:33:08 +0000
committerEric Andersen <andersen@codepoet.org>2001-11-20 19:33:08 +0000
commit6dd7cf3090e2042cd7fab3e8925cc75b640b2b3f (patch)
treeb0e27dfc6a430f835d175808f9685d0fc81245a7 /libc/misc/time
parent61349a4cef1ded7f65ce7a5c786797368db3d9dd (diff)
A few symbols needed for testing
Diffstat (limited to 'libc/misc/time')
-rw-r--r--libc/misc/time/localtime.c9
-rw-r--r--libc/misc/time/strftime.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/libc/misc/time/localtime.c b/libc/misc/time/localtime.c
index bedbb8ea7..cdfd9bde3 100644
--- a/libc/misc/time/localtime.c
+++ b/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)
diff --git a/libc/misc/time/strftime.c b/libc/misc/time/strftime.c
index 8529446eb..4dd3d7dd0 100644
--- a/libc/misc/time/strftime.c
+++ b/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 = "???";