Enable alloca on mingw/cygwin builds:

This effectively reverts commit 391d73e37b26614e2e343ca8e9d4334e07380896
Fixes https://github.com/libsdl-org/SDL/issues/5234
This commit is contained in:
Ozkan Sezer 2022-01-17 20:56:24 +03:00
parent 33dadbf137
commit a575e2cf5e
2 changed files with 2 additions and 10 deletions

View File

@ -855,9 +855,7 @@ if(SDL_LIBC)
string(TOUPPER ${_FN} _UPPER) string(TOUPPER ${_FN} _UPPER)
set(HAVE_${_UPPER} 1) set(HAVE_${_UPPER} 1)
endforeach() endforeach()
if(NOT CYGWIN AND NOT MINGW) set(HAVE_ALLOCA 1)
set(HAVE_ALLOCA 1)
endif()
set(HAVE_M_PI 1) set(HAVE_M_PI 1)
target_compile_definitions(sdl-build-options INTERFACE "-D_USE_MATH_DEFINES") # needed for M_PI target_compile_definitions(sdl-build-options INTERFACE "-D_USE_MATH_DEFINES") # needed for M_PI
set(STDC_HEADERS 1) set(STDC_HEADERS 1)

View File

@ -318,13 +318,7 @@ dnl Check for typedefs, structures, etc.
dnl Check for defines dnl Check for defines
AC_CHECK_DEFINE(M_PI, math.h) AC_CHECK_DEFINE(M_PI, math.h)
case "$host" in AC_FUNC_ALLOCA
*-*-cygwin* | *-*-mingw*)
;;
*)
AC_FUNC_ALLOCA
;;
esac
dnl Checks for library functions. dnl Checks for library functions.
AC_FUNC_MEMCMP AC_FUNC_MEMCMP