From 6b9a74f9e625e8e4d96e325b959ebead48e4a192 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 23 Feb 2005 19:08:58 +0000 Subject: 2005-02-23 Jeff Johnston * libc/include/time.h [!CYGWIN](_timezone): Change to long. (__tzrule_type, __tzinfo_type): New types. (__gettzinfo): New function. * libc/sys/linux/include/time.h: Ditto. * libc/time/Makefile.am: Add gettzinfo.c. * libc/time/Makefile.in: Regenerated. * libc/time/local.h: Moved __tzrule_type to time.h. * libc/time/mktime.c: Call __gettzinfo to reference __tznorth, __tzyear, and __tzrule array. * libc/time/mktm_r.c: Ditto. * libc/time/strftime.c: Ditto. * libc/time/tzset_r.c: Ditto. Also remove definition of __tzrule which is now in gettzinfo.c. Change _timezone references to not cast to time_t. * libc/time/gettzinfo.c: New file. --- newlib/libc/sys/linux/include/time.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'newlib/libc/sys') diff --git a/newlib/libc/sys/linux/include/time.h b/newlib/libc/sys/linux/include/time.h index 8b4b28460..0a5279f0b 100644 --- a/newlib/libc/sys/linux/include/time.h +++ b/newlib/libc/sys/linux/include/time.h @@ -84,6 +84,26 @@ char *_EXFUN(strptime, (const char *, const char *, struct tm *)); _VOID _EXFUN(tzset, (_VOID)); _VOID _EXFUN(_tzset_r, (struct _reent *)); +typedef struct __tzrule_struct +{ + char ch; + int m; + int n; + int d; + int s; + time_t change; + int offset; +} __tzrule_type; + +typedef struct __tzinfo_struct +{ + int __tznorth; + int __tzyear; + __tzrule_type __tzrule[2]; +} __tzinfo_type; + +__tzinfo_type *_EXFUN (__gettzinfo, (_VOID)); + /* getdate functions */ #ifndef _REENT_ONLY @@ -106,7 +126,7 @@ struct tm * _EXFUN(getdate, (const char *)); int _EXFUN(getdate_r, (const char *, struct tm *)); /* defines for the opengroup specifications Derived from Issue 1 of the SVID. */ -extern __IMPORT time_t _timezone; +extern __IMPORT long _timezone; extern __IMPORT int _daylight; extern __IMPORT char *_tzname[2]; -- cgit v1.2.3