Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-03-05 16:43:12 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-03-05 16:43:12 +0400
commit07be216aabff46148510557d1ce6cef470a2a002 (patch)
tree1e49837fde7d71fc725d10a89a76148a4eefe5bc
parent065c7717b7593baee9a4e2eefd314f6a41646d66 (diff)
* 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.
-rw-r--r--newlib/ChangeLog6
-rw-r--r--newlib/libc/include/time.h16
2 files changed, 22 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 2b06b4e75..cec4ec598 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -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>
* libc/include/machine/_default_types.h: Define unsigned type using
diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h
index b91b03920..dcae828f5 100644
--- a/newlib/libc/include/time.h
+++ b/newlib/libc/include/time.h
@@ -28,6 +28,16 @@
_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
{
int tm_sec;
@@ -39,6 +49,12 @@ struct tm
int tm_wday;
int tm_yday;
int tm_isdst;
+#ifdef __TM_GMTOFF
+ long __TM_GMTOFF;
+#endif
+#ifdef __TM_ZONE
+ const char *__TM_ZONE;
+#endif
};
clock_t _EXFUN(clock, (void));