We don't need to check for snprintf() anymore, we don't use it.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 24 Nov 2013 23:36:15 -0500
changeset 80900098d4459b7a
parent 8089 de8b6fdf6544
child 8091 a65f28a04224
We don't need to check for snprintf() anymore, we don't use it.

SDL_snprintf() is built on vsnprintf() where available.
CMakeLists.txt
configure.in
include/SDL_config.h.cmake
include/SDL_config_android.h
include/SDL_config_iphoneos.h
include/SDL_config_macosx.h
include/SDL_config_pandora.h
include/SDL_config_psp.h
include/SDL_config_wiz.h
premake/Linux/SDL_config_premake.h
premake/Xcode-iOS/SDL_config_premake.h
premake/Xcode/Xcode3/SDL_config_premake.h
premake/Xcode/Xcode4/SDL_config_premake.h
premake/config/SDL_config_cygwin.template.h
premake/config/SDL_config_iphoneos.template.h
premake/config/SDL_config_linux.template.h
premake/config/SDL_config_macosx.template.h
     1.1 --- a/CMakeLists.txt	Sun Nov 24 23:35:38 2013 -0500
     1.2 +++ b/CMakeLists.txt	Sun Nov 24 23:36:15 2013 -0500
     1.3 @@ -503,14 +503,13 @@
     1.4      check_c_source_compiles("#include <sys/types.h>
     1.5                               #include <sys/mman.h>
     1.6                               int main() { }" HAVE_MPROTECT)
     1.7 -    # FIXME: we don't care if you have snprintf, etc, any more. We only care if you have vsnprintf. Clean this up.
     1.8      foreach(_FN
     1.9              strtod malloc calloc realloc free getenv setenv putenv unsetenv
    1.10              qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
    1.11              strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
    1.12              _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
    1.13              atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
    1.14 -            vsscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp
    1.15 +            vsscanf vsnprintf fseeko fseeko64 sigaction setjmp
    1.16              nanosleep sysconf sysctlbyname
    1.17              )
    1.18        string(TOUPPER ${_FN} _UPPER)
     2.1 --- a/configure.in	Sun Nov 24 23:35:38 2013 -0500
     2.2 +++ b/configure.in	Sun Nov 24 23:36:15 2013 -0500
     2.3 @@ -268,8 +268,7 @@
     2.4          AC_DEFINE(HAVE_MPROTECT, 1, [ ])
     2.5          ]),
     2.6      )
     2.7 -    dnl FIXME: we don't care if you have snprintf, etc, any more. We only care if you have vsnprintf. Clean this up.
     2.8 -    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf snprintf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname)
     2.9 +    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname)
    2.10  
    2.11      AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
    2.12      AC_CHECK_FUNCS(atan atan2 acos asin ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt)
     3.1 --- a/include/SDL_config.h.cmake	Sun Nov 24 23:35:38 2013 -0500
     3.2 +++ b/include/SDL_config.h.cmake	Sun Nov 24 23:36:15 2013 -0500
     3.3 @@ -125,7 +125,6 @@
     3.4  #cmakedefine HAVE__STRNICMP 1
     3.5  #cmakedefine HAVE_STRNCASECMP 1
     3.6  #cmakedefine HAVE_VSSCANF 1
     3.7 -#cmakedefine HAVE_SNPRINTF 1
     3.8  #cmakedefine HAVE_VSNPRINTF 1
     3.9  #cmakedefine HAVE_M_PI 1
    3.10  #cmakedefine HAVE_ATAN 1
     4.1 --- a/include/SDL_config_android.h	Sun Nov 24 23:35:38 2013 -0500
     4.2 +++ b/include/SDL_config_android.h	Sun Nov 24 23:36:15 2013 -0500
     4.3 @@ -82,7 +82,6 @@
     4.4  #define HAVE_STRCASECMP 1
     4.5  #define HAVE_STRNCASECMP 1
     4.6  #define HAVE_VSSCANF 1
     4.7 -#define HAVE_SNPRINTF   1
     4.8  #define HAVE_VSNPRINTF  1
     4.9  #define HAVE_M_PI   1
    4.10  #define HAVE_ATAN   1
     5.1 --- a/include/SDL_config_iphoneos.h	Sun Nov 24 23:35:38 2013 -0500
     5.2 +++ b/include/SDL_config_iphoneos.h	Sun Nov 24 23:36:15 2013 -0500
     5.3 @@ -80,7 +80,6 @@
     5.4  #define HAVE_STRCASECMP 1
     5.5  #define HAVE_STRNCASECMP 1
     5.6  #define HAVE_VSSCANF 1
     5.7 -#define HAVE_SNPRINTF   1
     5.8  #define HAVE_VSNPRINTF  1
     5.9  #define HAVE_M_PI   1
    5.10  #define HAVE_ATAN   1
     6.1 --- a/include/SDL_config_macosx.h	Sun Nov 24 23:35:38 2013 -0500
     6.2 +++ b/include/SDL_config_macosx.h	Sun Nov 24 23:36:15 2013 -0500
     6.3 @@ -83,7 +83,6 @@
     6.4  #define HAVE_STRCASECMP 1
     6.5  #define HAVE_STRNCASECMP 1
     6.6  #define HAVE_VSSCANF 1
     6.7 -#define HAVE_SNPRINTF   1
     6.8  #define HAVE_VSNPRINTF  1
     6.9  #define HAVE_CEIL   1
    6.10  #define HAVE_COPYSIGN   1
     7.1 --- a/include/SDL_config_pandora.h	Sun Nov 24 23:35:38 2013 -0500
     7.2 +++ b/include/SDL_config_pandora.h	Sun Nov 24 23:36:15 2013 -0500
     7.3 @@ -82,7 +82,6 @@
     7.4  #define HAVE_STRCASECMP 1
     7.5  #define HAVE_STRNCASECMP 1
     7.6  #define HAVE_VSSCANF 1
     7.7 -#define HAVE_SNPRINTF 1
     7.8  #define HAVE_VSNPRINTF 1
     7.9  #define HAVE_M_PI 1
    7.10  #define HAVE_CEIL 1
     8.1 --- a/include/SDL_config_psp.h	Sun Nov 24 23:35:38 2013 -0500
     8.2 +++ b/include/SDL_config_psp.h	Sun Nov 24 23:36:15 2013 -0500
     8.3 @@ -80,7 +80,6 @@
     8.4  #define HAVE_STRCASECMP 1
     8.5  #define HAVE_STRNCASECMP 1
     8.6  #define HAVE_VSSCANF 1
     8.7 -#define HAVE_SNPRINTF   1
     8.8  #define HAVE_VSNPRINTF  1
     8.9  #define HAVE_M_PI   1
    8.10  #define HAVE_ATAN   1
     9.1 --- a/include/SDL_config_wiz.h	Sun Nov 24 23:35:38 2013 -0500
     9.2 +++ b/include/SDL_config_wiz.h	Sun Nov 24 23:36:15 2013 -0500
     9.3 @@ -76,7 +76,6 @@
     9.4  #define HAVE_STRCASECMP 1
     9.5  #define HAVE_STRNCASECMP 1
     9.6  #define HAVE_VSSCANF 1
     9.7 -#define HAVE_SNPRINTF 1
     9.8  #define HAVE_VSNPRINTF 1
     9.9  #define HAVE_M_PI 1
    9.10  #define HAVE_CEIL 1
    10.1 --- a/premake/Linux/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    10.2 +++ b/premake/Linux/SDL_config_premake.h	Sun Nov 24 23:36:15 2013 -0500
    10.3 @@ -129,7 +129,6 @@
    10.4  /* #undef HAVE__STRNICMP */
    10.5  #define HAVE_STRNCASECMP 1
    10.6  #define HAVE_VSSCANF 1
    10.7 -#define HAVE_SNPRINTF 1
    10.8  #define HAVE_VSNPRINTF 1
    10.9  #define HAVE_M_PI /**/
   10.10  #define HAVE_ATAN 1
    11.1 --- a/premake/Xcode-iOS/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    11.2 +++ b/premake/Xcode-iOS/SDL_config_premake.h	Sun Nov 24 23:36:15 2013 -0500
    11.3 @@ -80,7 +80,6 @@
    11.4  #define HAVE_STRCASECMP 1
    11.5  #define HAVE_STRNCASECMP 1
    11.6  #define HAVE_VSSCANF 1
    11.7 -#define HAVE_SNPRINTF   1
    11.8  #define HAVE_VSNPRINTF  1
    11.9  #define HAVE_M_PI   1
   11.10  #define HAVE_ATAN   1
    12.1 --- a/premake/Xcode/Xcode3/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    12.2 +++ b/premake/Xcode/Xcode3/SDL_config_premake.h	Sun Nov 24 23:36:15 2013 -0500
    12.3 @@ -86,7 +86,6 @@
    12.4  #define HAVE_STRCASECMP 1
    12.5  #define HAVE_STRNCASECMP 1
    12.6  #define HAVE_VSSCANF 1
    12.7 -#define HAVE_SNPRINTF   1
    12.8  #define HAVE_VSNPRINTF  1
    12.9  #define HAVE_CEIL   1
   12.10  #define HAVE_COPYSIGN   1
    13.1 --- a/premake/Xcode/Xcode4/SDL_config_premake.h	Sun Nov 24 23:35:38 2013 -0500
    13.2 +++ b/premake/Xcode/Xcode4/SDL_config_premake.h	Sun Nov 24 23:36:15 2013 -0500
    13.3 @@ -86,7 +86,6 @@
    13.4  #define HAVE_STRCASECMP 1
    13.5  #define HAVE_STRNCASECMP 1
    13.6  #define HAVE_VSSCANF 1
    13.7 -#define HAVE_SNPRINTF   1
    13.8  #define HAVE_VSNPRINTF  1
    13.9  #define HAVE_CEIL   1
   13.10  #define HAVE_COPYSIGN   1
    14.1 --- a/premake/config/SDL_config_cygwin.template.h	Sun Nov 24 23:35:38 2013 -0500
    14.2 +++ b/premake/config/SDL_config_cygwin.template.h	Sun Nov 24 23:36:15 2013 -0500
    14.3 @@ -125,7 +125,6 @@
    14.4  /* #undef HAVE__STRNICMP */
    14.5  #define HAVE_STRNCASECMP 1
    14.6  #define HAVE_VSSCANF 1
    14.7 -#define HAVE_SNPRINTF 1
    14.8  #define HAVE_VSNPRINTF 1
    14.9  #define HAVE_M_PI /**/
   14.10  #define HAVE_ATAN 1
    15.1 --- a/premake/config/SDL_config_iphoneos.template.h	Sun Nov 24 23:35:38 2013 -0500
    15.2 +++ b/premake/config/SDL_config_iphoneos.template.h	Sun Nov 24 23:36:15 2013 -0500
    15.3 @@ -80,7 +80,6 @@
    15.4  #define HAVE_STRCASECMP 1
    15.5  #define HAVE_STRNCASECMP 1
    15.6  #define HAVE_VSSCANF 1
    15.7 -#define HAVE_SNPRINTF   1
    15.8  #define HAVE_VSNPRINTF  1
    15.9  #define HAVE_M_PI   1
   15.10  #define HAVE_ATAN   1
    16.1 --- a/premake/config/SDL_config_linux.template.h	Sun Nov 24 23:35:38 2013 -0500
    16.2 +++ b/premake/config/SDL_config_linux.template.h	Sun Nov 24 23:36:15 2013 -0500
    16.3 @@ -129,7 +129,6 @@
    16.4  /* #undef HAVE__STRNICMP */
    16.5  #define HAVE_STRNCASECMP 1
    16.6  #define HAVE_VSSCANF 1
    16.7 -#define HAVE_SNPRINTF 1
    16.8  #define HAVE_VSNPRINTF 1
    16.9  #define HAVE_M_PI /**/
   16.10  #define HAVE_ATAN 1
    17.1 --- a/premake/config/SDL_config_macosx.template.h	Sun Nov 24 23:35:38 2013 -0500
    17.2 +++ b/premake/config/SDL_config_macosx.template.h	Sun Nov 24 23:36:15 2013 -0500
    17.3 @@ -86,7 +86,6 @@
    17.4  #define HAVE_STRCASECMP 1
    17.5  #define HAVE_STRNCASECMP 1
    17.6  #define HAVE_VSSCANF 1
    17.7 -#define HAVE_SNPRINTF   1
    17.8  #define HAVE_VSNPRINTF  1
    17.9  #define HAVE_CEIL   1
   17.10  #define HAVE_COPYSIGN   1