Macro _tcstok takes two arguments, so in _UNICODE mode it has to expand to
two-argument _wcstok() function, instead of to three-argument wcstok()
function.
Also in C mode (as opposite of C++ mode), function wcstok() cannot be
called with just two arguments, so fix _wcstok_l macro to call _wcstok()
function.
---
mingw-w64-headers/crt/tchar.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-headers/crt/tchar.h b/mingw-w64-headers/crt/tchar.h
index 7a0084e271f1..e0ce3f4741e2 100644
--- a/mingw-w64-headers/crt/tchar.h
+++ b/mingw-w64-headers/crt/tchar.h
@@ -268,7 +268,7 @@ extern "C" {
#define _tcsrchr wcsrchr
#define _tcsspn wcsspn
#define _tcsstr wcsstr
-#define _tcstok wcstok
+#define _tcstok _wcstok
#define _tcstok_l _wcstok_l
#define _tcserror _wcserror
#define __tcserror __wcserror
@@ -477,7 +477,7 @@ extern "C" {
#define _wcsspnp(_cpc1,_cpc2) (!_cpc1 ? NULL :
((*((_cpc1)+wcsspn(_cpc1,_cpc2))) ? ((_cpc1)+wcsspn(_cpc1,_cpc2)) : NULL))
#define _wcsncpy_l(_Destination,_Source,_Count,_Locale)
(wcsncpy(_Destination,_Source,_Count))
#define _wcsncat_l(_Destination,_Source,_Count,_Locale)
(wcsncat(_Destination,_Source,_Count))
-#define _wcstok_l(_String,_Delimiters,_Locale) (wcstok(_String,_Delimiters))
+#define _wcstok_l(_String,_Delimiters,_Locale) (_wcstok(_String,_Delimiters))
#define _wcsnset_l(_Destination,_Value,_Count,_Locale)
(_wcsnset(_Destination,_Value,_Count))
#define _wcsset_l(_Destination,_Value,_Locale) (_wcsset(_Destination,_Value))
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public