mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-26 06:48:34 +00:00
Revert "SDL_itoa(): use _itoa_s(), not _ltoa_s()"
This reverts commitae07e32269. This reverts commit33c9f1a70a.
This commit is contained in:
committed by
Anonymous Maarten
parent
5e1d8b8a6f
commit
55388abb34
@@ -1139,8 +1139,8 @@ if(SDL_LIBC)
|
||||
_Exit exp expf
|
||||
fabs fabsf floor floorf fmod fmodf fopen64 fseeko fseeko64
|
||||
getenv
|
||||
_i64toa _i64toa_s index itoa _itoa_s
|
||||
log log10 log10f logf lround lroundf _ltoa _ltoa_s
|
||||
_i64toa index itoa
|
||||
log log10 log10f logf lround lroundf _ltoa
|
||||
malloc memcmp memcpy memmove memset modf modff
|
||||
pow powf putenv
|
||||
rindex round roundf
|
||||
@@ -1154,7 +1154,7 @@ if(SDL_LIBC)
|
||||
)
|
||||
if(WINDOWS OR CYGWIN)
|
||||
list(APPEND symbols_to_check
|
||||
_copysign _fseeki64 _strrev _ui64toa _ui64toa_s _uitoa _ultoa _ultoa_s _wcsdup
|
||||
_copysign _fseeki64 _strrev _ui64toa _uitoa _ultoa _wcsdup
|
||||
)
|
||||
else()
|
||||
list(APPEND symbols_to_check
|
||||
|
||||
@@ -106,18 +106,13 @@
|
||||
#cmakedefine HAVE_STRNSTR 1
|
||||
#cmakedefine HAVE_STRTOK_R 1
|
||||
#cmakedefine HAVE_ITOA 1
|
||||
#cmakedefine HAVE__ITOA_S 1
|
||||
#cmakedefine HAVE__LTOA 1
|
||||
#cmakedefine HAVE__LTOA_S 1
|
||||
#cmakedefine HAVE__UITOA 1
|
||||
#cmakedefine HAVE__ULTOA 1
|
||||
#cmakedefine HAVE__ULTOA_S 1
|
||||
#cmakedefine HAVE_STRTOL 1
|
||||
#cmakedefine HAVE_STRTOUL 1
|
||||
#cmakedefine HAVE__I64TOA 1
|
||||
#cmakedefine HAVE__I64TOA_S 1
|
||||
#cmakedefine HAVE__UI64TOA 1
|
||||
#cmakedefine HAVE__UI64TOA_S 1
|
||||
#cmakedefine HAVE_STRTOLL 1
|
||||
#cmakedefine HAVE_STRTOULL 1
|
||||
#cmakedefine HAVE_STRTOD 1
|
||||
|
||||
@@ -1155,10 +1155,7 @@ static const char ntoa_table[] = {
|
||||
|
||||
char *SDL_itoa(int value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__ITOA_S
|
||||
(void)_itoa_s(value, string, 12, radix);
|
||||
return string;
|
||||
#elif defined(HAVE_ITOA)
|
||||
#ifdef HAVE_ITOA
|
||||
return itoa(value, string, radix);
|
||||
#else
|
||||
return SDL_ltoa((long)value, string, radix);
|
||||
@@ -1176,10 +1173,7 @@ char *SDL_uitoa(unsigned int value, char *string, int radix)
|
||||
|
||||
char *SDL_ltoa(long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__LTOA_S
|
||||
(void)_ltoa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__LTOA)
|
||||
#ifdef HAVE__LTOA
|
||||
return _ltoa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
@@ -1197,10 +1191,7 @@ char *SDL_ltoa(long value, char *string, int radix)
|
||||
|
||||
char *SDL_ultoa(unsigned long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__ULTOA_S
|
||||
(void)_ultoa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__ULTOA)
|
||||
#ifdef HAVE__ULTOA
|
||||
return _ultoa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
@@ -1224,10 +1215,7 @@ char *SDL_ultoa(unsigned long value, char *string, int radix)
|
||||
|
||||
char *SDL_lltoa(long long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__I64TOA_S
|
||||
(void)_i64toa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__I64TOA)
|
||||
#ifdef HAVE__I64TOA
|
||||
return _i64toa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
@@ -1245,10 +1233,7 @@ char *SDL_lltoa(long long value, char *string, int radix)
|
||||
|
||||
char *SDL_ulltoa(unsigned long long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__UI64TOA_S
|
||||
(void)_ui64toa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__UI64TOA)
|
||||
#ifdef HAVE__UI64TOA
|
||||
return _ui64toa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
|
||||
Reference in New Issue
Block a user