Daniel Lehman : include: Update wcstok declarations.
Alexandre Julliard
julliard at winehq.org
Mon Feb 24 15:23:53 CST 2020
Module: wine
Branch: master
Commit: 7aa1f6ee1c62b0cf39565dca14d71b405fd06203
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7aa1f6ee1c62b0cf39565dca14d71b405fd06203
Author: Daniel Lehman <dlehman25 at gmail.com>
Date: Thu Feb 20 22:40:24 2020 -0800
include: Update wcstok declarations.
Signed-off-by: Daniel Lehman <dlehman25 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/msvcrt/string.h | 16 +++++++++++++++-
include/msvcrt/wchar.h | 16 +++++++++++++++-
include/tchar.h | 2 +-
3 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h
index f8bc40fb2a..a8bf04d5b4 100644
--- a/include/msvcrt/string.h
+++ b/include/msvcrt/string.h
@@ -119,8 +119,22 @@ _ACRTIMP wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*);
_ACRTIMP wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor);
_ACRTIMP size_t __cdecl wcsspn(const wchar_t*,const wchar_t*);
_ACRTIMP wchar_t* __cdecl wcsstr(const wchar_t*,const wchar_t*);
-_ACRTIMP wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
+_ACRTIMP wchar_t* __cdecl wcstok_s(wchar_t*,const wchar_t*,wchar_t**);
_ACRTIMP size_t __cdecl wcsxfrm(wchar_t*,const wchar_t*,size_t);
+
+#ifdef _UCRT
+_ACRTIMP wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*,wchar_t**);
+static inline wchar_t* _wcstok(wchar_t* str, const wchar_t *delim) { return wcstok(str, delim, NULL); }
+# ifdef __cplusplus
+extern "C++" inline wchar_t* wcstok(wchar_t* str, const wchar_t *delim) { return wcstok(str, delim, NULL); }
+# elif defined(_CRT_NON_CONFORMING_WCSTOK)
+# define wcstok _wcstok
+# endif
+#else /* _UCRT */
+_ACRTIMP wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
+# define _wcstok wcstok
+#endif /* _UCRT */
+
#endif /* _WSTRING_DEFINED */
#ifdef __cplusplus
diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h
index ade970b6f3..6b30645dc0 100644
--- a/include/msvcrt/wchar.h
+++ b/include/msvcrt/wchar.h
@@ -140,8 +140,22 @@ wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*);
wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor);
size_t __cdecl wcsspn(const wchar_t*,const wchar_t*);
wchar_t* __cdecl wcsstr(const wchar_t*,const wchar_t*);
-wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
+wchar_t* __cdecl wcstok_s(wchar_t*,const wchar_t*,wchar_t**);
size_t __cdecl wcsxfrm(wchar_t*,const wchar_t*,size_t);
+
+#ifdef _UCRT
+wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*,wchar_t**);
+static inline wchar_t* _wcstok(wchar_t* str, const wchar_t *delim) { return wcstok(str, delim, NULL); }
+# ifdef __cplusplus
+extern "C++" inline wchar_t* wcstok(wchar_t* str, const wchar_t *delim) { return wcstok(str, delim, NULL); }
+# elif defined(_CRT_NON_CONFORMING_WCSTOK)
+# define wcstok _wcstok
+# endif
+#else /* _UCRT */
+wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
+# define _wcstok wcstok
+#endif /* _UCRT */
+
#endif /* _WSTRING_DEFINED */
wchar_t __cdecl btowc(int);
diff --git a/include/tchar.h b/include/tchar.h
index e14aaf3884..9fc4c72099 100644
--- a/include/tchar.h
+++ b/include/tchar.h
@@ -148,7 +148,7 @@ extern "C" {
#define _tcsspn WINE_tchar_routine(strspn, _mbsspn, wcsspn)
#define _tcsstr WINE_tchar_routine(strstr, _mbsstr, wcsstr)
#define _tcstod WINE_tchar_routine(strtod, strtod, wcstod)
-#define _tcstok WINE_tchar_routine(strtok, _mbstok, wcstok)
+#define _tcstok WINE_tchar_routine(strtok, _mbstok, _wcstok)
#define _tcstol WINE_tchar_routine(strtol, strtol, wcstol)
#define _tcstoul WINE_tchar_routine(strtoul, strtoul, wcstoul)
#define _tcsupr WINE_tchar_routine(_strupr, _mbsupr, _wcsupr)
More information about the wine-cvs
mailing list