|
|
b3c1d3b |
From c239923641ae52e6c99011c57bc35e86b38f6872 Mon Sep 17 00:00:00 2001
|
|
|
b3c1d3b |
From: martell <martellmalone@gmail.com>
|
|
|
b3c1d3b |
Date: Wed, 28 Jan 2015 20:54:58 +0000
|
|
|
b3c1d3b |
Subject: [PATCH] Use a Guard defined by the spec and not _POSIX. This should
|
|
|
b3c1d3b |
also guard from windows programs that assume the functions are unavailable
|
|
|
b3c1d3b |
|
|
|
b3c1d3b |
---
|
|
|
b3c1d3b |
mingw-w64-headers/crt/time.h | 4 ++--
|
|
|
b3c1d3b |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
b3c1d3b |
|
|
|
b3c1d3b |
diff --git a/mingw-w64-headers/crt/time.h b/mingw-w64-headers/crt/time.h
|
|
|
b3c1d3b |
index b551a27..7b43fd8 100644
|
|
|
b3c1d3b |
--- a/mingw-w64-headers/crt/time.h
|
|
|
b3c1d3b |
+++ b/mingw-w64-headers/crt/time.h
|
|
|
b3c1d3b |
@@ -261,7 +261,7 @@ struct timezone {
|
|
|
b3c1d3b |
|
|
|
b3c1d3b |
#pragma pack(pop)
|
|
|
b3c1d3b |
|
|
|
b3c1d3b |
-#if defined(_POSIX) || defined(_POSIX_THREAD_SAFE_FUNCTIONS)
|
|
|
b3c1d3b |
+#if defined(_POSIX_C_SOURCE) || defined(_POSIX_THREAD_SAFE_FUNCTIONS)
|
|
|
b3c1d3b |
__forceinline struct tm *__cdecl localtime_r(const time_t *_Time, struct tm *_Tm) {
|
|
|
b3c1d3b |
return localtime_s(_Tm, _Time) ? NULL : _Tm;
|
|
|
b3c1d3b |
}
|
|
|
b3c1d3b |
@@ -274,7 +274,7 @@ __forceinline char *__cdecl ctime_r(const time_t *_Time, char *_Str) {
|
|
|
b3c1d3b |
__forceinline char *__cdecl asctime_r(const struct tm *_Tm, char * _Str) {
|
|
|
b3c1d3b |
return asctime_s(_Str, 0x7fffffff, _Tm) ? NULL : _Str;
|
|
|
b3c1d3b |
}
|
|
|
b3c1d3b |
-#endif /* _POSIX */
|
|
|
b3c1d3b |
+#endif /* _POSIX_C_SOURCE */
|
|
|
b3c1d3b |
|
|
|
b3c1d3b |
/* Adding timespec definition. */
|
|
|
b3c1d3b |
#include <sys/timeb.h>
|
|
|
b3c1d3b |
--
|
|
|
b3c1d3b |
2.2.2
|
|
|
b3c1d3b |
|