* libc/include/time.h (__TM_GMTOFF): Define on Cygwin.

(__TM_ZONE): Ditto.
	(struct tm): Add __TM_GMTOFF and __TM_ZONE members if they are defined.
This commit is contained in:
Corinna Vinschen 2014-03-05 12:43:12 +00:00
parent 065c7717b7
commit 07be216aab
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-03-05 Corinna Vinschen <vinschen@redhat.com>
* libc/include/time.h (__TM_GMTOFF): Define on Cygwin.
(__TM_ZONE): Ditto.
(struct tm): Add __TM_GMTOFF and __TM_ZONE members if they are defined.
2014-03-04 Ed Nelson <ed@nelson305.com> 2014-03-04 Ed Nelson <ed@nelson305.com>
* libc/include/machine/_default_types.h: Define unsigned type using * libc/include/machine/_default_types.h: Define unsigned type using

View File

@ -28,6 +28,16 @@
_BEGIN_STD_C _BEGIN_STD_C
#ifdef __CYGWIN__
# ifdef __BSD_VISIBLE
# define __TM_GMTOFF tm_gmtoff
# define __TM_ZONE tm_zone
# else
# define __TM_GMTOFF __tm_gmtoff
# define __TM_ZONE __tm_zone
# endif
#endif
struct tm struct tm
{ {
int tm_sec; int tm_sec;
@ -39,6 +49,12 @@ struct tm
int tm_wday; int tm_wday;
int tm_yday; int tm_yday;
int tm_isdst; int tm_isdst;
#ifdef __TM_GMTOFF
long __TM_GMTOFF;
#endif
#ifdef __TM_ZONE
const char *__TM_ZONE;
#endif
}; };
clock_t _EXFUN(clock, (void)); clock_t _EXFUN(clock, (void));