_uitoa does not exist

(manual backport of commit 08e338f45c)
This commit is contained in:
Anonymous Maarten
2026-05-25 13:35:46 +02:00
committed by Ozkan Sezer
parent 1df9ae4338
commit 430cacdb44
6 changed files with 7 additions and 19 deletions

View File

@@ -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

6
configure vendored
View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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)