Jacek Caban : include: Add corecrt_wstdlib.h header.

Alexandre Julliard julliard at winehq.org
Mon Feb 24 15:23:54 CST 2020


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 24 16:35:44 2020 +0100

include: Add corecrt_wstdlib.h header.

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_wstdlib.h | 60 ++++++++++++++++++++++++++++++++++++++++
 include/msvcrt/stdlib.h          | 46 +-----------------------------
 include/msvcrt/wchar.h           | 43 ++--------------------------
 4 files changed, 64 insertions(+), 86 deletions(-)

diff --git a/include/Makefile.in b/include/Makefile.in
index 694828ab71..f5e2ba665b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -428,6 +428,7 @@ SOURCES = \
 	msvcrt/corecrt_wctype.h \
 	msvcrt/corecrt_wio.h \
 	msvcrt/corecrt_wstdio.h \
+	msvcrt/corecrt_wstdlib.h \
 	msvcrt/corecrt_wtime.h \
 	msvcrt/crtdbg.h \
 	msvcrt/crtdefs.h \
diff --git a/include/msvcrt/corecrt_wstdlib.h b/include/msvcrt/corecrt_wstdlib.h
new file mode 100644
index 0000000000..da97e42bb9
--- /dev/null
+++ b/include/msvcrt/corecrt_wstdlib.h
@@ -0,0 +1,60 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the Wine project.
+ */
+
+#ifndef _WSTDLIB_DEFINED
+#define _WSTDLIB_DEFINED
+
+#include <corecrt.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+wchar_t*      __cdecl _itow(int,wchar_t*,int);
+errno_t       __cdecl _itow_s(int,wchar_t*,int, int);
+wchar_t*      __cdecl _i64tow(__int64,wchar_t*,int);
+errno_t       __cdecl _i64tow_s(__int64, wchar_t*, size_t, int);
+wchar_t*      __cdecl _ltow(__msvcrt_long,wchar_t*,int);
+errno_t       __cdecl _ltow_s(__msvcrt_long,wchar_t*,int,int);
+wchar_t*      __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
+errno_t       __cdecl _ui64tow_s(unsigned __int64, wchar_t*, size_t, int);
+wchar_t*      __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
+errno_t       __cdecl _ultow_s(__msvcrt_ulong, wchar_t*, size_t, int);
+wchar_t*      __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
+wchar_t*      __cdecl _wgetenv(const wchar_t*);
+void          __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
+int           __cdecl _wmakepath_s(wchar_t*,size_t,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
+void          __cdecl _wperror(const wchar_t*);
+int           __cdecl _wputenv(const wchar_t*);
+void          __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
+void          __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
+errno_t       __cdecl _wsplitpath_s(const wchar_t*,wchar_t*,size_t,wchar_t*,size_t,
+                                       wchar_t*,size_t,wchar_t*,size_t);
+int           __cdecl _wsystem(const wchar_t*);
+double        __cdecl _wtof(const wchar_t*);
+int           __cdecl _wtoi(const wchar_t*);
+__int64       __cdecl _wtoi64(const wchar_t*);
+__msvcrt_long __cdecl _wtol(const wchar_t*);
+
+size_t        __cdecl mbstowcs(wchar_t*,const char*,size_t);
+errno_t       __cdecl mbstowcs_s(size_t*,wchar_t*,size_t,const char*,size_t);
+int           __cdecl mbtowc(wchar_t*,const char*,size_t);
+float         __cdecl wcstof(const wchar_t*,wchar_t**);
+double        __cdecl wcstod(const wchar_t*,wchar_t**);
+__msvcrt_long __cdecl wcstol(const wchar_t*,wchar_t**,int);
+size_t        __cdecl wcstombs(char*,const wchar_t*,size_t);
+errno_t       __cdecl wcstombs_s(size_t*,char*,size_t,const wchar_t*,size_t);
+__msvcrt_ulong __cdecl wcstoul(const wchar_t*,wchar_t**,int);
+int           __cdecl wctomb(char*,wchar_t);
+__int64       __cdecl _wcstoi64(const wchar_t*,wchar_t**,int);
+__int64       __cdecl _wcstoi64_l(const wchar_t*,wchar_t**,int,_locale_t);
+unsigned __int64 __cdecl _wcstoui64(const wchar_t*,wchar_t**,int);
+unsigned __int64 __cdecl _wcstoui64_l(const wchar_t*,wchar_t**,int,_locale_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WSTDLIB_DEFINED */
diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h
index 78fc5fba75..5bcc2e4455 100644
--- a/include/msvcrt/stdlib.h
+++ b/include/msvcrt/stdlib.h
@@ -8,7 +8,7 @@
 #ifndef __WINE_STDLIB_H
 #define __WINE_STDLIB_H
 
-#include <corecrt.h>
+#include <corecrt_wstdlib.h>
 
 #include <pshpack8.h>
 
@@ -222,50 +222,6 @@ int           __cdecl system(const char*);
 void*         __cdecl bsearch(const void*,const void*,size_t,size_t,int (__cdecl *)(const void*,const void*));
 void          __cdecl qsort(void*,size_t,size_t,int (__cdecl *)(const void*,const void*));
 
-#ifndef _WSTDLIB_DEFINED
-#define _WSTDLIB_DEFINED
-wchar_t*      __cdecl _itow(int,wchar_t*,int);
-errno_t       __cdecl _itow_s(int,wchar_t*,int, int);
-wchar_t*      __cdecl _i64tow(__int64,wchar_t*,int);
-errno_t       __cdecl _i64tow_s(__int64, wchar_t*, size_t, int);
-wchar_t*      __cdecl _ltow(__msvcrt_long,wchar_t*,int);
-errno_t       __cdecl _ltow_s(__msvcrt_long,wchar_t*,int,int);
-wchar_t*      __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
-errno_t       __cdecl _ui64tow_s(unsigned __int64, wchar_t*, size_t, int);
-wchar_t*      __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
-errno_t       __cdecl _ultow_s(__msvcrt_ulong, wchar_t*, size_t, int);
-wchar_t*      __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
-wchar_t*      __cdecl _wgetenv(const wchar_t*);
-void          __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
-int           __cdecl _wmakepath_s(wchar_t*,size_t,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
-void          __cdecl _wperror(const wchar_t*);
-int           __cdecl _wputenv(const wchar_t*);
-void          __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
-void          __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
-errno_t       __cdecl _wsplitpath_s(const wchar_t*,wchar_t*,size_t,wchar_t*,size_t,
-                                       wchar_t*,size_t,wchar_t*,size_t);
-int           __cdecl _wsystem(const wchar_t*);
-double        __cdecl _wtof(const wchar_t*);
-int           __cdecl _wtoi(const wchar_t*);
-__int64       __cdecl _wtoi64(const wchar_t*);
-__msvcrt_long __cdecl _wtol(const wchar_t*);
-
-size_t        __cdecl mbstowcs(wchar_t*,const char*,size_t);
-errno_t       __cdecl mbstowcs_s(size_t*,wchar_t*,size_t,const char*,size_t);
-int           __cdecl mbtowc(wchar_t*,const char*,size_t);
-float         __cdecl wcstof(const wchar_t*,wchar_t**);
-double        __cdecl wcstod(const wchar_t*,wchar_t**);
-__msvcrt_long __cdecl wcstol(const wchar_t*,wchar_t**,int);
-size_t        __cdecl wcstombs(char*,const wchar_t*,size_t);
-errno_t       __cdecl wcstombs_s(size_t*,char*,size_t,const wchar_t*,size_t);
-__msvcrt_ulong __cdecl wcstoul(const wchar_t*,wchar_t**,int);
-int           __cdecl wctomb(char*,wchar_t);
-__int64       __cdecl _wcstoi64(const wchar_t*,wchar_t**,int);
-__int64       __cdecl _wcstoi64_l(const wchar_t*,wchar_t**,int,_locale_t);
-unsigned __int64 __cdecl _wcstoui64(const wchar_t*,wchar_t**,int);
-unsigned __int64 __cdecl _wcstoui64_l(const wchar_t*,wchar_t**,int,_locale_t);
-#endif /* _WSTDLIB_DEFINED */
-
 typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t);
 _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler);
 _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h
index 6b30645dc0..2daa6de169 100644
--- a/include/msvcrt/wchar.h
+++ b/include/msvcrt/wchar.h
@@ -8,9 +8,10 @@
 #ifndef __WINE_WCHAR_H
 #define __WINE_WCHAR_H
 
-#include <corecrt_wstdio.h>
 #include <corecrt_wctype.h>
 #include <corecrt_wio.h>
+#include <corecrt_wstdio.h>
+#include <corecrt_wstdlib.h>
 #include <corecrt_wtime.h>
 #include <string.h>
 #include <sys/stat.h>
@@ -61,46 +62,6 @@ int      __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wcha
 int      __cdecl _wsystem(const wchar_t*);
 #endif /* _WPROCESS_DEFINED */
 
-#ifndef _WSTDLIB_DEFINED
-#define _WSTDLIB_DEFINED
-wchar_t* __cdecl _itow(int,wchar_t*,int);
-errno_t  __cdecl _itow_s(int,wchar_t*,int, int);
-wchar_t* __cdecl _i64tow(__int64,wchar_t*,int);
-errno_t  __cdecl _i64tow_s(__int64, wchar_t*, size_t, int);
-wchar_t* __cdecl _ltow(__msvcrt_long,wchar_t*,int);
-errno_t  __cdecl _ltow_s(__msvcrt_long,wchar_t*,int,int);
-wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
-errno_t  __cdecl _ui64tow_s(unsigned __int64, wchar_t*, size_t, int);
-wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
-errno_t  __cdecl _ultow_s(__msvcrt_ulong, wchar_t*, size_t, int);
-wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
-wchar_t* __cdecl _wgetenv(const wchar_t*);
-void     __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
-int      __cdecl _wmakepath_s(wchar_t*,size_t,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
-void     __cdecl _wperror(const wchar_t*);
-int      __cdecl _wputenv(const wchar_t*);
-void     __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
-void     __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
-errno_t  __cdecl _wsplitpath_s(const wchar_t*,wchar_t*,size_t,wchar_t*,size_t,
-                                   wchar_t*,size_t,wchar_t*,size_t);
-int      __cdecl _wsystem(const wchar_t*);
-double   __cdecl _wtof(const wchar_t*);
-int      __cdecl _wtoi(const wchar_t*);
-__int64  __cdecl _wtoi64(const wchar_t*);
-__msvcrt_long __cdecl _wtol(const wchar_t*);
-
-size_t        __cdecl mbstowcs(wchar_t*,const char*,size_t);
-errno_t       __cdecl mbstowcs_s(size_t*,wchar_t*,size_t,const char*,size_t);
-int           __cdecl mbtowc(wchar_t*,const char*,size_t);
-float         __cdecl wcstof(const wchar_t*,wchar_t**);
-double        __cdecl wcstod(const wchar_t*,wchar_t**);
-__msvcrt_long __cdecl wcstol(const wchar_t*,wchar_t**,int);
-size_t        __cdecl wcstombs(char*,const wchar_t*,size_t);
-errno_t       __cdecl wcstombs_s(size_t*,char*,size_t,const wchar_t*,size_t);
-__msvcrt_ulong __cdecl wcstoul(const wchar_t*,wchar_t**,int);
-int           __cdecl wctomb(char*,wchar_t);
-#endif /* _WSTDLIB_DEFINED */
-
 #ifndef _WSTRING_DEFINED
 #define _WSTRING_DEFINED
 int      __cdecl _wcscoll_l(const wchar_t*,const wchar_t*,_locale_t);




More information about the wine-cvs mailing list