minor updates to libc function checks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b66a814..5d244f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -779,7 +779,7 @@ if(LIBC)
set(HAVE_SIGNAL_H 1)
foreach(_FN
malloc calloc realloc free qsort abs memset memcpy memmove memcmp
- wcslen wcsdup wcsstr wcscmp wcsncmp _wcsicmp _wcsnicmp
+ wcslen _wcsdup wcsdup wcsstr wcscmp wcsncmp _wcsicmp _wcsnicmp
strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
_stricmp _strnicmp sscanf
@@ -818,10 +818,10 @@ if(LIBC)
foreach(_FN
strtod malloc calloc realloc free getenv setenv putenv unsetenv
qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
- _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa
- _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
+ _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r
+ itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
- wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
+ wcscmp _wcsdup wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp
sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 _Exit
)
diff --git a/configure b/configure
index da4ee6e..8b1c1c2 100755
--- a/configure
+++ b/configure
@@ -17070,7 +17070,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
- for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r 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 elf_aux_info poll _Exit
+ for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r 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 elf_aux_info poll _Exit
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -22886,7 +22886,7 @@ int
main ()
{
- accentmap_t accTable;
+ accentmap_t accTable;
ioctl(0, KDENABIO, 1);
;
diff --git a/configure.ac b/configure.ac
index 107563d..7d119ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,7 +345,7 @@ if test x$enable_libc = xyes; then
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
]),
)
- AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r 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 elf_aux_info poll _Exit)
+ AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r 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 elf_aux_info poll _Exit)
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
@@ -2670,7 +2670,7 @@ CheckInputKBIO()
#include <sys/kbio.h>
#include <sys/ioctl.h>
],[
- accentmap_t accTable;
+ accentmap_t accTable;
ioctl(0, KDENABIO, 1);
],[
use_input_kbio=yes
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 977050d..751b89a 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -96,6 +96,7 @@
#cmakedefine HAVE_WCSLEN 1
#cmakedefine HAVE_WCSLCPY 1
#cmakedefine HAVE_WCSLCAT 1
+#cmakedefine HAVE__WCSDUP 1
#cmakedefine HAVE_WCSDUP 1
#cmakedefine HAVE_WCSSTR 1
#cmakedefine HAVE_WCSCMP 1
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index eb2b417..4deee1a 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -100,6 +100,7 @@
#undef HAVE_WCSLEN
#undef HAVE_WCSLCPY
#undef HAVE_WCSLCAT
+#undef HAVE__WCSDUP
#undef HAVE_WCSDUP
#undef HAVE_WCSSTR
#undef HAVE_WCSCMP
diff --git a/include/SDL_config_os2.h b/include/SDL_config_os2.h
index 1d830f2..075753f 100644
--- a/include/SDL_config_os2.h
+++ b/include/SDL_config_os2.h
@@ -105,14 +105,22 @@
#define HAVE_WCSCMP 1
#define HAVE__WCSICMP 1
#define HAVE__WCSNICMP 1
+#define HAVE_WCSLEN 1
+#define HAVE_WCSLCPY 1
+#define HAVE_WCSLCAT 1
+/* #undef HAVE_WCSDUP */
+#define HAVE__WCSDUP 1
+#define HAVE_WCSSTR 1
+#define HAVE_WCSCMP 1
+#define HAVE_WCSNCMP 1
#define HAVE_STRLEN 1
#define HAVE_STRLCPY 1
#define HAVE_STRLCAT 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
#define HAVE__STRLWR 1
-#define HAVE_INDEX 1
-#define HAVE_RINDEX 1
+/* #undef HAVE_INDEX */
+/* #undef HAVE_RINDEX */
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
@@ -129,15 +137,6 @@
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
-#define HAVE_WCSLEN 1
-#define HAVE_WCSLCPY 1
-#define HAVE_WCSLCAT 1
-/* #undef HAVE_WCSDUP */
-#define HAVE__WCSDUP 1
-/* #define wcsdup _wcsdup */
-#define HAVE_WCSSTR 1
-#define HAVE_WCSCMP 1
-#define HAVE_WCSNCMP 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRICMP 1
diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
index 0d8171f..4f41f11 100644
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -133,6 +133,7 @@ typedef unsigned int uintptr_t;
#define HAVE__STRNICMP 1
#define HAVE__WCSICMP 1
#define HAVE__WCSNICMP 1
+#define HAVE__WCSDUP 1
#define HAVE_ACOS 1
#define HAVE_ACOSF 1
#define HAVE_ASIN 1
diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c
index 0ba007e..f3fdfb3 100644
--- a/src/hidapi/libusb/hid.c
+++ b/src/hidapi/libusb/hid.c
@@ -33,6 +33,10 @@
#ifdef SDL_JOYSTICK_HIDAPI
+#if defined(HAVE__WCSDUP) && !defined(HAVE_WCSDUP)
+#define wcsdup _wcsdup
+#endif
+
#include <libusb.h>
#include <locale.h> /* setlocale */