mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 11:31:00 +08:00
6b9a74f9e6
* 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.
16 lines
288 B
C
16 lines
288 B
C
#include <sys/types.h>
|
|
#include <local.h>
|
|
|
|
/* Shared timezone information for libc/time functions. */
|
|
static __tzinfo_type tzinfo = {1, 0,
|
|
{ {'J', 0, 0, 0, 0, (time_t)0, 0 },
|
|
{'J', 0, 0, 0, 0, (time_t)0, 0 }
|
|
}
|
|
};
|
|
|
|
__tzinfo_type *
|
|
__gettzinfo (void)
|
|
{
|
|
return &tzinfo;
|
|
}
|