Fixed bug 3761 - Windows non-MinGW cmake build defines HAVE_WCSLCPY and HAVE_WCSLCAT
authorSam Lantinga <slouken@libsdl.org>
Mon, 21 Aug 2017 11:25:04 -0700
changeset 11337d9f24e95e8ba
parent 11336 5893a480c519
child 11338 fed4345ff3f2
Fixed bug 3761 - Windows non-MinGW cmake build defines HAVE_WCSLCPY and HAVE_WCSLCAT

Tom Seddon

https://github.com/SDL-mirror/SDL/commit/0f0ad62237fabb58d5811fe6fa59e5e5aa0e2fb5 (git head at the time of writing); Visual Studio 2015, toolset v140, Platform 10.0.14393.0, building for x64

Windows non-MinGW cmake build sets defines implying wcslcpy and wcslcat are available, but Windows doesn't have these functions.

Ryan C. Gordon

That's weird, these are the exact two functions that Emscripten incorrectly believed it had until we upgraded the buildbot's emsdk install.

Not sure what's up with this, but it's possibly not a MingW-specific thing!
CMakeLists.txt
configure
configure.in
     1.1 --- a/CMakeLists.txt	Mon Aug 21 11:19:38 2017 -0700
     1.2 +++ b/CMakeLists.txt	Mon Aug 21 11:25:04 2017 -0700
     1.3 @@ -627,7 +627,7 @@
     1.4      set(HAVE_SIGNAL_H 1)
     1.5      foreach(_FN
     1.6              malloc calloc realloc free qsort abs memset memcpy memmove memcmp
     1.7 -            wcslen wcslcpy wcslcat wcscmp
     1.8 +            wcslen wcscmp
     1.9              strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
    1.10              _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
    1.11              _stricmp _strnicmp sscanf atan atan2 acos asin ceil copysign cos
     2.1 --- a/configure	Mon Aug 21 11:19:38 2017 -0700
     2.2 +++ b/configure	Mon Aug 21 11:25:04 2017 -0700
     2.3 @@ -16631,7 +16631,7 @@
     2.4  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     2.5  fi
     2.6  
     2.7 -    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcscmp strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll
     2.8 +    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll
     2.9  do :
    2.10    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
    2.11  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
     3.1 --- a/configure.in	Mon Aug 21 11:19:38 2017 -0700
     3.2 +++ b/configure.in	Mon Aug 21 11:25:04 2017 -0700
     3.3 @@ -268,7 +268,7 @@
     3.4          AC_DEFINE(HAVE_MPROTECT, 1, [ ])
     3.5          ]),
     3.6      )
     3.7 -    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcscmp strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll)
     3.8 +    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll)
     3.9  
    3.10      AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
    3.11      AC_CHECK_FUNCS(atan atan2 acos asin ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt sqrtf tan tanf)