On Mon, 13 Feb 2023, Martin Storsjö wrote:

This was fixed in wchar.h in 7a2c4749ecbd8d99e0f0b6bcc2737dd36e4a2341
in 2021, but this function can be declared by either string.h or
wchar.h - thus fix the other case to be consistent too.

Signed-off-by: Martin Storsjö <[email protected]>
---
mingw-w64-headers/crt/string.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/mingw-w64-headers/crt/string.h b/mingw-w64-headers/crt/string.h
index afcaf0b4f..c160c3c9b 100644
--- a/mingw-w64-headers/crt/string.h
+++ b/mingw-w64-headers/crt/string.h
@@ -144,7 +144,11 @@ extern "C" {
  _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
  size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
  _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t 
*_SubStr);
+#if defined(_UCRT)
+  wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,const wchar_t * 
__restrict__ _Delim,wchar_t **_Ptr) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+#else
  wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,const wchar_t * 
__restrict__ _Delim) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
+#endif
  _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
  _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
  _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
--
2.34.1

Ping

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to