Jacek Caban : include: Add corecrt_wtime.h file.

Alexandre Julliard julliard at winehq.org
Thu Feb 20 18:26:13 CST 2020


Module: wine
Branch: master
Commit: f0779722c33779d937b22773003b4bf7d64735ab
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f0779722c33779d937b22773003b4bf7d64735ab

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Feb 20 15:49:42 2020 +0100

include: Add corecrt_wtime.h file.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/Makefile.in            |  1 +
 include/msvcrt/corecrt_wtime.h | 48 ++++++++++++++++++++++++++++++++++++++++++
 include/msvcrt/time.h          | 39 +---------------------------------
 include/msvcrt/wchar.h         | 38 +--------------------------------
 4 files changed, 51 insertions(+), 75 deletions(-)

diff --git a/include/Makefile.in b/include/Makefile.in
index 506e5fc96a..fbfbf72be0 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -427,6 +427,7 @@ SOURCES = \
 	msvcrt/corecrt_stdio_config.h \
 	msvcrt/corecrt_wio.h \
 	msvcrt/corecrt_wstdio.h \
+	msvcrt/corecrt_wtime.h \
 	msvcrt/crtdbg.h \
 	msvcrt/crtdefs.h \
 	msvcrt/ctype.h \
diff --git a/include/msvcrt/corecrt_wtime.h b/include/msvcrt/corecrt_wtime.h
new file mode 100644
index 0000000000..3422b2d349
--- /dev/null
+++ b/include/msvcrt/corecrt_wtime.h
@@ -0,0 +1,48 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the Wine project.
+ */
+
+#ifndef _WTIME_DEFINED
+#define _WTIME_DEFINED
+
+#include <corecrt.h>
+
+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;
+};
+
+#ifdef _USE_32BIT_TIME_T
+#define _wctime32 _wctime
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+wchar_t* __cdecl _wasctime(const struct tm*);
+size_t   __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
+wchar_t* __cdecl _wctime32(const __time32_t*);
+wchar_t* __cdecl _wctime64(const __time64_t*);
+wchar_t* __cdecl _wstrdate(wchar_t*);
+errno_t  __cdecl _wstrdate_s(wchar_t*,size_t);
+wchar_t* __cdecl _wstrtime(wchar_t*);
+errno_t  __cdecl _wstrtime_s(wchar_t*,size_t);
+
+#ifndef _USE_32BIT_TIME_T
+static inline wchar_t* _wctime(const time_t *t) { return _wctime64(t); }
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WTIME_DEFINED */
diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h
index 9ed27f5f9e..61df364d21 100644
--- a/include/msvcrt/time.h
+++ b/include/msvcrt/time.h
@@ -20,7 +20,7 @@
 #ifndef __WINE_TIME_H
 #define __WINE_TIME_H
 
-#include <corecrt.h>
+#include <corecrt_wtime.h>
 
 #include <pshpack8.h>
 
@@ -33,21 +33,6 @@ typedef __msvcrt_long clock_t;
 #define CLOCKS_PER_SEC 1000
 #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 /* _TM_DEFINED */
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -113,28 +98,6 @@ static inline time_t mktime(struct tm *tm) { return _mktime64(tm); }
 static inline time_t time(time_t *t) { return _time64(t); }
 #endif
 
-#ifndef _WTIME_DEFINED
-#define _WTIME_DEFINED
-
-#ifdef _USE_32BIT_TIME_T
-#define _wctime32 _wctime
-#endif
-
-wchar_t* __cdecl _wasctime(const struct tm*);
-size_t   __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
-wchar_t* __cdecl _wctime32(const __time32_t*);
-wchar_t* __cdecl _wctime64(const __time64_t*);
-wchar_t* __cdecl _wstrdate(wchar_t*);
-errno_t  __cdecl _wstrdate_s(wchar_t*,size_t);
-wchar_t* __cdecl _wstrtime(wchar_t*);
-errno_t  __cdecl _wstrtime_s(wchar_t*,size_t);
-
-#ifndef _USE_32BIT_TIME_T
-static inline wchar_t* _wctime(const time_t *t) { return _wctime64(t); }
-#endif
-
-#endif /* _WTIME_DEFINED */
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h
index d5ae3561d0..b93fec9de7 100644
--- a/include/msvcrt/wchar.h
+++ b/include/msvcrt/wchar.h
@@ -10,6 +10,7 @@
 
 #include <corecrt_wstdio.h>
 #include <corecrt_wio.h>
+#include <corecrt_wtime.h>
 #include <string.h>
 
 #include <pshpack8.h>
@@ -50,21 +51,6 @@ typedef int _off_t;
 #define _OFF_T_DEFINED
 #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 /* _TM_DEFINED */
-
 #ifndef _STAT_DEFINED
 #define _STAT_DEFINED
 
@@ -326,28 +312,6 @@ wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
 size_t   __cdecl wcsxfrm(wchar_t*,const wchar_t*,size_t);
 #endif /* _WSTRING_DEFINED */
 
-#ifndef _WTIME_DEFINED
-#define _WTIME_DEFINED
-
-#ifdef _USE_32BIT_TIME_T
-#define _wctime32 _wctime
-#endif
-
-wchar_t* __cdecl _wasctime(const struct tm*);
-size_t   __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
-wchar_t* __cdecl _wctime32(const __time32_t*);
-wchar_t* __cdecl _wctime64(const __time64_t*);
-wchar_t* __cdecl _wstrdate(wchar_t*);
-errno_t  __cdecl _wstrdate_s(wchar_t*,size_t);
-wchar_t* __cdecl _wstrtime(wchar_t*);
-errno_t  __cdecl _wstrtime_s(wchar_t*,size_t);
-
-#ifndef _USE_32BIT_TIME_T
-static inline wchar_t* _wctime(const time_t *t) { return _wctime64(t); }
-#endif
-
-#endif /* _WTIME_DEFINED */
-
 wchar_t __cdecl btowc(int);
 size_t  __cdecl mbrlen(const char *,size_t,mbstate_t*);
 size_t  __cdecl mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);




More information about the wine-cvs mailing list