Also removed _WTIME_DEFINED and _TM_DEFINED.
Signed-off-by: Zhongteng Gui <[email protected]>
---
mingw-w64-headers/crt/corecrt_wtime.h | 58 +++++++++++++++++++++++++++
mingw-w64-headers/crt/time.h | 51 +----------------------
mingw-w64-headers/crt/wchar.h | 52 +-----------------------
3 files changed, 60 insertions(+), 101 deletions(-)
create mode 100644 mingw-w64-headers/crt/corecrt_wtime.h
diff --git a/mingw-w64-headers/crt/corecrt_wtime.h
b/mingw-w64-headers/crt/corecrt_wtime.h
new file mode 100644
index 000000000..415405756
--- /dev/null
+++ b/mingw-w64-headers/crt/corecrt_wtime.h
@@ -0,0 +1,58 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _INC_CORECRT_WTIME
+#define _INC_CORECRT_WTIME
+
+#include <corecrt.h>
+
+_CRT_BEGIN_C_HEADER
+
+ struct tm {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+ };
+
+ _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
+ _SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const
struct tm *_Tm);
+ wchar_t *__cdecl _wctime32(const __time32_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+ _SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const
__time32_t *_Time);
+ size_t __cdecl wcsftime(wchar_t * __restrict__ _Buf,size_t
_SizeInWords,const wchar_t * __restrict__ _Format,const struct tm *
__restrict__ _Tm);
+ _CRTIMP size_t __cdecl _wcsftime_l(wchar_t * __restrict__ _Buf,size_t
_SizeInWords,const wchar_t * __restrict__ _Format,const struct tm *
__restrict__ _Tm,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+ _SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
+ _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+ _SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
+ _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+ _SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const
__time64_t *_Time);
+
+#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
+#define _INC_WTIME_INL
+#ifndef _USE_32BIT_TIME_T
+ wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime64)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+#else
+ wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime32)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+#endif
+#endif
+
+#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
+#define _INC_WTIME_S_INL
+#ifndef _USE_32BIT_TIME_T
+ errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t
*_Time) __MINGW_ASM_CALL(_wctime64_s);
+#else
+ errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t
*_Time) __MINGW_ASM_CALL(_wctime32_s);
+#endif
+#endif
+
+_CRT_END_C_HEADER
+
+#endif /* _INC_CORECRT_WTIME */
diff --git a/mingw-w64-headers/crt/time.h b/mingw-w64-headers/crt/time.h
index 882859b86..b0e8cee49 100644
--- a/mingw-w64-headers/crt/time.h
+++ b/mingw-w64-headers/crt/time.h
@@ -7,6 +7,7 @@
#define _TIME_H_
#include <crtdefs.h>
+#include <corecrt_wtime.h>
#ifndef _WIN32
#error Only Win32 target is supported!
@@ -34,21 +35,6 @@ _CRT_BEGIN_C_HEADER
#endif
#endif
-#ifndef _TM_DEFINED
-#define _TM_DEFINED
- struct tm {
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- };
-#endif
-
#define CLOCKS_PER_SEC 1000
#ifdef _UCRT
@@ -129,41 +115,6 @@ _CRT_BEGIN_C_HEADER
unsigned __cdecl _getsystime(struct tm *_Tm);
unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
-#ifndef _WTIME_DEFINED
- _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
- _SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const
struct tm *_Tm);
- wchar_t *__cdecl _wctime32(const __time32_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const
__time32_t *_Time);
- size_t __cdecl wcsftime(wchar_t * __restrict__ _Buf,size_t
_SizeInWords,const wchar_t * __restrict__ _Format,const struct tm *
__restrict__ _Tm);
- _CRTIMP size_t __cdecl _wcsftime_l(wchar_t * __restrict__ _Buf,size_t
_SizeInWords,const wchar_t * __restrict__ _Format,const struct tm *
__restrict__ _Tm,_locale_t _Locale);
- _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
- _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
- _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const
__time64_t *_Time);
-
-#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
-#define _INC_WTIME_INL
-#ifndef _USE_32BIT_TIME_T
- wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime64)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-#else
- wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime32)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-#endif
-#endif
-
-#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
-#define _INC_WTIME_S_INL
-#ifndef _USE_32BIT_TIME_T
- errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t
*_Time) __MINGW_ASM_CALL(_wctime64_s);
-#else
- errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t
*_Time) __MINGW_ASM_CALL(_wctime32_s);
-#endif
-#endif
-
-#define _WTIME_DEFINED
-#endif
-
#ifndef RC_INVOKED
/*
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 52926e1c3..ccd14fe6a 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -13,6 +13,7 @@
#include <corecrt_wstdio.h>
#include <corecrt_wstdlib.h>
#include <corecrt_wstring.h>
+#include <corecrt_wtime.h>
#include <_mingw_locale.h>
#if __USE_MINGW_ANSI_STDIO && !defined (__USE_MINGW_STRTOX) &&
!defined(_CRTBLD)
@@ -190,57 +191,6 @@ _CRT_BEGIN_C_HEADER
#endif
#endif
-#ifndef _TM_DEFINED
-#define _TM_DEFINED
- struct tm {
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- };
-#endif
-
-#ifndef _WTIME_DEFINED
-#define _WTIME_DEFINED
-
- _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
- _SECIMP errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const
struct tm *_Tm);
- wchar_t *__cdecl _wctime32(const __time32_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const
__time32_t *_Time);
- size_t __cdecl wcsftime(wchar_t * __restrict__ _Buf,size_t
_SizeInWords,const wchar_t * __restrict__ _Format,const struct tm *
__restrict__ _Tm);
- _CRTIMP size_t __cdecl _wcsftime_l(wchar_t * __restrict__ _Buf,size_t
_SizeInWords,const wchar_t * __restrict__ _Format,const struct tm *
__restrict__ _Tm,_locale_t _Locale);
- _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
- _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
- _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _SECIMP errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const
__time64_t *_Time);
-
-#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
-#define _INC_WTIME_INL
-#ifndef _USE_32BIT_TIME_T
- wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime64)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-#else
- wchar_t *__cdecl _wctime(const time_t *_Time) __MINGW_ASM_CALL(_wctime32)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-#endif
-#endif
-
-#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
-#define _INC_WTIME_S_INL
-#ifndef _USE_32BIT_TIME_T
- errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t
*_Time) __MINGW_ASM_CALL(_wctime64_s);
-#else
- errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t
*_Time) __MINGW_ASM_CALL(_wctime32_s);
-#endif
-#endif
-
-#endif
-
#if defined(_UCRT) || defined(__LARGE_MBSTATE_T)
typedef struct _Mbstatet {
unsigned long _Wchar;
--
2.55.0.windows.4
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public