Message349312
I wasn't aware that CPython builds for MSYS2 out of the box, since it's a POSIX-on-Windows platform like Cygwin. Apparently there are patches that enable it to build, since MSYS2 has Python available.
For Windows, WCSTOK expands to wcstok_s, which takes a context pointer that allows concurrently parsing multiple strings in a single thread. The old function lacks this parameter and instead uses a per-thread static buffer. They're declared as follows:
wchar_t *wcstok(wchar_t *strToken, const wchar_t *strDelimit);
wchar_t *wcstok_s(wchar_t *str, const wchar_t *delimiters,
wchar_t **context);
Otherwise the WCSTOK macro expands to wcstok, which assumes that POSIX systems use the standard definition [1]:
wchar_t *wcstok(wchar_t *restrict ws1, const wchar_t *restrict ws2,
wchar_t **restrict ptr);
Apparently the version of wcstok declared in your build environment takes only two arguments, like the old insecure function in Windows:
wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,
const wchar_t * __restrict__ _Delim)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcstok.html |
|
| Date |
User |
Action |
Args |
| 2019-08-09 19:53:33 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, eamanu, vengelson |
| 2019-08-09 19:53:33 | eryksun | set | messageid: <[email protected]> |
| 2019-08-09 19:53:33 | eryksun | link | issue37801 messages |
| 2019-08-09 19:53:32 | eryksun | create | |
|