Fix configure build with MinGW 5.3.0
Provide our own wcsnlen() declaration as the function is detected by configure but is not declared in MinGW headers. Closes #17762.
This commit is contained in:
@@ -221,6 +221,13 @@ extern unsigned long android_wcstoul(const wchar_t *nptr, wchar_t **endptr, int
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WCSNLEN
|
#ifdef HAVE_WCSNLEN
|
||||||
|
/*
|
||||||
|
When using MinGW, wcsnlen() is not declared, but is still found by
|
||||||
|
configure -- just declare it in this case as it seems better to use it
|
||||||
|
if it's available (see https://sourceforge.net/p/mingw/bugs/2332/)
|
||||||
|
*/
|
||||||
|
wxDECL_FOR_MINGW32_ALWAYS(size_t, wcsnlen, (const wchar_t*, size_t))
|
||||||
|
|
||||||
#define wxCRT_StrnlenW wcsnlen
|
#define wxCRT_StrnlenW wcsnlen
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user