mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-29 16:25:22 +00:00
Fix -Wdeprecated-declarations warnings
An alternative could be to define _CRT_SECURE_NO_WARNINGS
This commit is contained in:
committed by
Anonymous Maarten
parent
6b4ae68460
commit
33c9f1a70a
@@ -1139,8 +1139,8 @@ if(SDL_LIBC)
|
||||
_Exit exp expf
|
||||
fabs fabsf floor floorf fmod fmodf fopen64 fseeko fseeko64
|
||||
getenv
|
||||
_i64toa index itoa
|
||||
log log10 log10f logf lround lroundf _ltoa
|
||||
_i64toa _i64toa_s index itoa _itoa_s
|
||||
log log10 log10f logf lround lroundf _ltoa _ltoa_s
|
||||
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 _uitoa _ultoa _wcsdup
|
||||
_copysign _fseeki64 _strrev _ui64toa _ui64toa_s _uitoa _ultoa _ultoa_s _wcsdup
|
||||
)
|
||||
else()
|
||||
list(APPEND symbols_to_check
|
||||
|
||||
@@ -106,13 +106,18 @@
|
||||
#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,7 +1155,10 @@ static const char ntoa_table[] = {
|
||||
|
||||
char *SDL_itoa(int value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE_ITOA
|
||||
#ifdef HAVE__ITOA_S
|
||||
(void)_ltoa_s(value, string, 12, radix);
|
||||
return string;
|
||||
#elif defined(HAVE_ITOA)
|
||||
return itoa(value, string, radix);
|
||||
#else
|
||||
return SDL_ltoa((long)value, string, radix);
|
||||
@@ -1173,7 +1176,10 @@ char *SDL_uitoa(unsigned int value, char *string, int radix)
|
||||
|
||||
char *SDL_ltoa(long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__LTOA
|
||||
#ifdef HAVE__LTOA_S
|
||||
(void)_ltoa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__LTOA)
|
||||
return _ltoa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
@@ -1191,7 +1197,10 @@ char *SDL_ltoa(long value, char *string, int radix)
|
||||
|
||||
char *SDL_ultoa(unsigned long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__ULTOA
|
||||
#ifdef HAVE__ULTOA_S
|
||||
(void)_ultoa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__ULTOA)
|
||||
return _ultoa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
@@ -1215,7 +1224,10 @@ char *SDL_ultoa(unsigned long value, char *string, int radix)
|
||||
|
||||
char *SDL_lltoa(long long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__I64TOA
|
||||
#ifdef HAVE__I64TOA_S
|
||||
(void)_i64toa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__I64TOA)
|
||||
return _i64toa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
@@ -1233,7 +1245,10 @@ char *SDL_lltoa(long long value, char *string, int radix)
|
||||
|
||||
char *SDL_ulltoa(unsigned long long value, char *string, int radix)
|
||||
{
|
||||
#ifdef HAVE__UI64TOA
|
||||
#ifdef HAVE__UI64TOA_S
|
||||
(void)_ui64toa_s(value, string, 64, radix);
|
||||
return string;
|
||||
#elif defined(HAVE__UI64TOA)
|
||||
return _ui64toa(value, string, radix);
|
||||
#else
|
||||
char *bufp = string;
|
||||
|
||||
Reference in New Issue
Block a user