From bdd3a681cb980d7a2fa135ac9f528fb075976862 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Thu, 19 Apr 2001 15:54:47 +0000 Subject: [PATCH] 2001-04-19 Robert Collins * include/time.h[__CYGWIN__]: Define tzname to _tzname if not defined. Define daylight to _daylight if it is not defined Prepare a variable export of timezone based on timezonevariable. (Cannot be used with the timezone() function.) --- newlib/ChangeLog | 7 +++++++ newlib/libc/include/time.h | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index fe1108aca7..1200ab9f40 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2001-04-19 Robert Collins + + * include/time.h[__CYGWIN__]: Define tzname to _tzname if not defined. + Define daylight to _daylight if it is not defined + Prepare a variable export of timezone based on timezonevariable. + (Cannot be used with the timezone() function.) + 2001-04-17 Stephen L. Moshier * newlib/libm/math/ef_asin.c (pio2_hi, pio2_lo, pio4_hi): diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h index 261a5c6e0c..f8bb53eb18 100644 --- a/newlib/libc/include/time.h +++ b/newlib/libc/include/time.h @@ -66,8 +66,20 @@ struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *)); extern __IMPORT time_t _timezone; extern __IMPORT int _daylight; extern __IMPORT char *_tzname[2]; - +/* defines for the opengroup specifications Derived from Issue 1 of the SVID. */ +#ifndef tzname +#define tzname _tzname +#endif +#ifndef daylight +#define daylight _daylight +#endif +#if timezonevar +#ifndef timezone +#define timezone ((long int) _timezone) +#endif +#else char *_EXFUN(timezone, (void)); +#endif void _EXFUN(tzset, (void)); #endif #endif /* __CYGWIN__ */ -- 2.11.0