diff --git a/CMakeLists.txt b/CMakeLists.txt index ff79c018a4..8e5fb1c5bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1098,7 +1098,7 @@ if(SDL_LIBC) strtod malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r - itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull + itoa _ltoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr wcscmp _wcsdup wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp diff --git a/configure b/configure index 11c32a77e3..62f76d98fd 100755 --- a/configure +++ b/configure @@ -19610,12 +19610,6 @@ if test "x$ac_cv_func__ltoa" = xyes then : printf "%s\n" "#define HAVE__LTOA 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "_uitoa" "ac_cv_func__uitoa" -if test "x$ac_cv_func__uitoa" = xyes -then : - printf "%s\n" "#define HAVE__UITOA 1" >>confdefs.h - fi ac_fn_c_check_func "$LINENO" "_ultoa" "ac_cv_func__ultoa" if test "x$ac_cv_func__ultoa" = xyes diff --git a/configure.ac b/configure.ac index 90ef45247b..2fb84384fd 100644 --- a/configure.ac +++ b/configure.ac @@ -359,7 +359,7 @@ dnl Checks for library functions. AC_DEFINE(HAVE_MPROTECT, 1, [ ]) ],[]), ) - AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp 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 strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction sigtimedwait setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll memfd_create posix_fallocate _Exit) + AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp 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 _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction sigtimedwait setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll memfd_create posix_fallocate _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) diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake index 4468abbbb9..dbee3c7bce 100644 --- a/include/SDL_config.h.cmake +++ b/include/SDL_config.h.cmake @@ -123,7 +123,6 @@ #cmakedefine HAVE_STRTOK_R 1 #cmakedefine HAVE_ITOA 1 #cmakedefine HAVE__LTOA 1 -#cmakedefine HAVE__UITOA 1 #cmakedefine HAVE__ULTOA 1 #cmakedefine HAVE_STRTOL 1 #cmakedefine HAVE_STRTOUL 1 diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index be9b3955bb..d28c696745 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -126,7 +126,6 @@ #undef HAVE_STRTOK_R #undef HAVE_ITOA #undef HAVE__LTOA -#undef HAVE__UITOA #undef HAVE__ULTOA #undef HAVE_STRTOL #undef HAVE_STRTOUL diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index 00d5c49af4..7a83bd54da 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -773,6 +773,11 @@ static const char ntoa_table[] = { }; #endif /* ntoa() conversion table */ +char *SDL_uitoa(unsigned int value, char *string, int radix) +{ + return SDL_ultoa((unsigned long)value, string, radix); +} + char *SDL_itoa(int value, char *string, int radix) { #ifdef HAVE_ITOA @@ -782,15 +787,6 @@ char *SDL_itoa(int value, char *string, int radix) #endif /* HAVE_ITOA */ } -char *SDL_uitoa(unsigned int value, char *string, int radix) -{ -#ifdef HAVE__UITOA - return _uitoa(value, string, radix); -#else - return SDL_ultoa((unsigned long)value, string, radix); -#endif /* HAVE__UITOA */ -} - char *SDL_ltoa(long value, char *string, int radix) { #if defined(HAVE__LTOA)