diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-04-17 21:23:31 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-04-17 21:23:31 +0000 |
commit | 10d002160949c985e6f99fb8d647d5e3c67ef554 (patch) | |
tree | 6ffe46b0b090120c2a251ffc2ce19574fb5f1dfb /newlib/libc/include | |
parent | a26c50352b4db457813ef86fb053bd838d310d30 (diff) | |
download | cygnal-10d002160949c985e6f99fb8d647d5e3c67ef554.tar.gz cygnal-10d002160949c985e6f99fb8d647d5e3c67ef554.tar.bz2 cygnal-10d002160949c985e6f99fb8d647d5e3c67ef554.zip |
2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/time.h (tzset, _tzset_r): Added prototypes.
(strptime): Moved prototype to be within !__STRICT_ANSI__.
(_tzname, _daylight, _timezone): No long __CYGWIN__ only.
(tzname): Defined for all platforms.
(daylight, timezone): Defined only for CYGWIN.
* libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after
environment set up.
* libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
environment variable is set.
* libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and
tzset_r.c.
* libc/time/Makefile.in: Regenerated.
* libc/time/gmtime.c (gmtime): Changed to call gmtime_r.
* libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r.
* libc/time/lcltime_r.c (lcltime_r): Ditto.
* libc/time/local.h: New local header file.
* libc/time/mktime.c (mktime): Add timezone support.
* libc/time/mktm_r.c: New file which is the common engine
for gmtime_r and lcltime_r. This code has timezone support.
* libc/time/strftime.c (strftime): Add %Z timezone support.
* libc/time/tzlock.c: New file containing timezone lock stubs.
* libc/time/tzset.c: New file containing tzset() routine.
* libc/time/tzset_r.c: New file containing _tzset_r and
internal routine for calculating timezone changes for specified year.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/time.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h index fe43c285e..c45be5484 100644 --- a/newlib/libc/include/time.h +++ b/newlib/libc/include/time.h @@ -8,6 +8,7 @@ #define _TIME_H_ #include "_ansi.h" +#include <sys/reent.h> #ifdef __cplusplus extern "C" { @@ -55,22 +56,29 @@ struct tm *_EXFUN(gmtime, (const time_t *_timer)); struct tm *_EXFUN(localtime,(const time_t *_timer)); #endif size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t)); -char *_EXFUN(strptime, (const char *, const char *, struct tm *)); char *_EXFUN(asctime_r, (const struct tm *, char *)); char *_EXFUN(ctime_r, (const time_t *, char *)); struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *)); struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *)); -#ifdef __CYGWIN__ #ifndef __STRICT_ANSI__ +char *_EXFUN(strptime, (const char *, const char *, struct tm *)); +_VOID _EXFUN(tzset, (_VOID)); +_VOID _EXFUN(_tzset_r, (struct _reent *)); + +/* defines for the opengroup specifications Derived from Issue 1 of the SVID. */ 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. */ + +/* POSIX defines the external tzname being defined in time.h */ #ifndef tzname #define tzname _tzname #endif + +/* CYGWIN also exposes daylight and timezone in the name space */ +#ifdef __CYGWIN__ #ifndef daylight #define daylight _daylight #endif @@ -81,13 +89,11 @@ extern __IMPORT char *_tzname[2]; #else char *_EXFUN(timezone, (void)); #endif -void _EXFUN(tzset, (void)); -#endif #endif /* __CYGWIN__ */ +#endif /* !__STRICT_ANSI__ */ #include <sys/features.h> - #if defined(_POSIX_TIMERS) #include <signal.h> |