فهرست منبع

_uitoa does not exist

(manual backport of commit 08e338f45c583ad0af3169bf2cc31260b1a5d91b)
Anonymous Maarten 20 ساعت پیش
والد
کامیت
430cacdb44
6فایلهای تغییر یافته به همراه7 افزوده شده و 19 حذف شده
  1. 1 1
      CMakeLists.txt
  2. 0 6
      configure
  3. 1 1
      configure.ac
  4. 0 1
      include/SDL_config.h.cmake
  5. 0 1
      include/SDL_config.h.in
  6. 5 9
      src/stdlib/SDL_string.c

+ 1 - 1
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

+ 0 - 6
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

+ 1 - 1
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)

+ 0 - 1
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

+ 0 - 1
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

+ 5 - 9
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)