summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/include/sys/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/include/sys/types.h')
-rw-r--r--winsup/mingw/include/sys/types.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/winsup/mingw/include/sys/types.h b/winsup/mingw/include/sys/types.h
index ed25e5270..82085e43b 100644
--- a/winsup/mingw/include/sys/types.h
+++ b/winsup/mingw/include/sys/types.h
@@ -23,9 +23,9 @@
#ifndef RC_INVOKED
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
+#ifndef _TIME32_T_DEFINED
+typedef __int32 __time32_t;
+#define _TIME32_T_DEFINED
#endif
#ifndef _TIME64_T_DEFINED
@@ -33,6 +33,20 @@ typedef __int64 __time64_t;
#define _TIME64_T_DEFINED
#endif
+#ifndef _TIME_T_DEFINED
+/* FIXME __STRICT_ANSI__ ! */
+#if __MSVCRT_VERSION__ >= 0x0800
+#ifndef _USE_32BIT_TIME_T
+typedef __time64_t time_t;
+#else
+typedef __time32_t time_t;
+#endif /* !_USE_32BIT_TIME_T */
+#else
+typedef __time32_t time_t;
+#endif /* __MSVCRT_VERSION__ >= 0x0800 */
+#define _TIME_T_DEFINED
+#endif
+
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;