Use _Exit() when available
authorSam Lantinga <slouken@libsdl.org>
Tue, 23 Apr 2019 07:59:31 -0700
changeset 127149b7633bd0aa0
parent 12713 8ed803255020
child 12715 96bb89d176ba
Use _Exit() when available
CMakeLists.txt
configure
configure.ac
include/SDL_config.h.cmake
include/SDL_config.h.in
src/SDL_assert.c
     1.1 --- a/CMakeLists.txt	Sun Apr 07 23:01:07 2019 +1000
     1.2 +++ b/CMakeLists.txt	Tue Apr 23 07:59:31 2019 -0700
     1.3 @@ -699,7 +699,7 @@
     1.4              _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
     1.5              atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
     1.6              vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
     1.7 -            nanosleep sysconf sysctlbyname getauxval poll
     1.8 +            nanosleep sysconf sysctlbyname getauxval poll _Exit
     1.9              )
    1.10        string(TOUPPER ${_FN} _UPPER)
    1.11        set(_HAVEVAR "HAVE_${_UPPER}")
     2.1 --- a/configure	Sun Apr 07 23:01:07 2019 +1000
     2.2 +++ b/configure	Tue Apr 23 07:59:31 2019 -0700
     2.3 @@ -651,6 +651,7 @@
     2.4  SDL_STATIC_LIBS
     2.5  SDL_LIBS
     2.6  SDL_CFLAGS
     2.7 +INSTALL_SDL2_CONFIG
     2.8  LIBUSB_LIBS
     2.9  LIBUSB_CFLAGS
    2.10  FCITX_LIBS
    2.11 @@ -896,6 +897,7 @@
    2.12  enable_backgrounding_signal
    2.13  enable_foregrounding_signal
    2.14  enable_render_d3d
    2.15 +enable_sdl2_config
    2.16  '
    2.17        ac_precious_vars='build_alias
    2.18  host_alias
    2.19 @@ -1684,6 +1686,7 @@
    2.20                            number to use for magic foregrounding signal or 'no'
    2.21                            [[default=no]]
    2.22    --enable-render-d3d     enable the Direct3D render driver [[default=yes]]
    2.23 +  --enable-sdl2-config    Install sdl2-config [default=yes]
    2.24  
    2.25  Optional Packages:
    2.26    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    2.27 @@ -16969,7 +16972,7 @@
    2.28  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    2.29  fi
    2.30  
    2.31 -    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _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 fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll
    2.32 +    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _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 fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit
    2.33  do :
    2.34    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
    2.35  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
    2.36 @@ -25165,6 +25168,30 @@
    2.37          ;;
    2.38  esac
    2.39  
    2.40 +# Check whether to install sdl2-config
    2.41 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install sdl2-config" >&5
    2.42 +$as_echo_n "checking whether to install sdl2-config... " >&6; }
    2.43 +# Check whether --enable-sdl2-config was given.
    2.44 +if test "${enable_sdl2_config+set}" = set; then :
    2.45 +  enableval=$enable_sdl2_config; case "${enableval}" in
    2.46 +        yes) enable_sdl2_config="TRUE" ;;
    2.47 +        no) enable_sdl2_config="FALSE" ;;
    2.48 +        *) as_fn_error $? "bad value '${enableval}' for --enable-sdl2-config" "$LINENO" 5 ;;
    2.49 +    esac
    2.50 +else
    2.51 +  enable_sdl2_config="TRUE"
    2.52 +fi
    2.53 +
    2.54 +if test "$enable_sdl2_config" = "TRUE"; then
    2.55 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    2.56 +$as_echo "yes" >&6; }
    2.57 +else
    2.58 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    2.59 +$as_echo "no" >&6; }
    2.60 +fi
    2.61 +INSTALL_SDL2_CONFIG=$enable_sdl2_config
    2.62 +
    2.63 +
    2.64  # Verify that we have all the platform specific files we need
    2.65  
    2.66  if test x$have_joystick != xyes; then
     3.1 --- a/configure.ac	Sun Apr 07 23:01:07 2019 +1000
     3.2 +++ b/configure.ac	Tue Apr 23 07:59:31 2019 -0700
     3.3 @@ -335,7 +335,7 @@
     3.4          AC_DEFINE(HAVE_MPROTECT, 1, [ ])
     3.5          ]),
     3.6      )
     3.7 -    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _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 fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll)
     3.8 +    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _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 fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
     3.9  
    3.10      AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
    3.11      AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
     4.1 --- a/include/SDL_config.h.cmake	Sun Apr 07 23:01:07 2019 +1000
     4.2 +++ b/include/SDL_config.h.cmake	Tue Apr 23 07:59:31 2019 -0700
     4.3 @@ -184,6 +184,7 @@
     4.4  #cmakedefine HAVE_SEM_TIMEDWAIT 1
     4.5  #cmakedefine HAVE_GETAUXVAL 1
     4.6  #cmakedefine HAVE_POLL 1
     4.7 +#cmakedefine HAVE__EXIT 1
     4.8  
     4.9  #elif __WIN32__
    4.10  #cmakedefine HAVE_STDARG_H 1
     5.1 --- a/include/SDL_config.h.in	Sun Apr 07 23:01:07 2019 +1000
     5.2 +++ b/include/SDL_config.h.in	Tue Apr 23 07:59:31 2019 -0700
     5.3 @@ -189,6 +189,7 @@
     5.4  #undef HAVE_SEM_TIMEDWAIT
     5.5  #undef HAVE_GETAUXVAL
     5.6  #undef HAVE_POLL
     5.7 +#undef HAVE__EXIT
     5.8  
     5.9  #else
    5.10  #define HAVE_STDARG_H   1
     6.1 --- a/src/SDL_assert.c	Sun Apr 07 23:01:07 2019 +1000
     6.2 +++ b/src/SDL_assert.c	Tue Apr 23 07:59:31 2019 -0700
     6.3 @@ -136,8 +136,12 @@
     6.4      emscripten_force_exit(exitcode);  /* this should "kill" the app. */
     6.5      exit(exitcode);
     6.6  #else
     6.7 +#ifdef HAVE__EXIT /* Upper case _Exit() */
     6.8 +    _Exit(exitcode);
     6.9 +#else
    6.10      _exit(exitcode);
    6.11  #endif
    6.12 +#endif
    6.13  }
    6.14  
    6.15