mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r15275) -Fix: SDL adds _GNU_SOURCE to the defined macros even when the compiler doesn't provide the functions promised when that define exists...
This commit is contained in:
parent
562299d809
commit
450b9b7900
@ -1205,7 +1205,8 @@ make_cflags_and_ldflags() {
|
|||||||
|
|
||||||
if [ -n "$sdl_config" ]; then
|
if [ -n "$sdl_config" ]; then
|
||||||
CFLAGS="$CFLAGS -DWITH_SDL"
|
CFLAGS="$CFLAGS -DWITH_SDL"
|
||||||
CFLAGS="$CFLAGS `$sdl_config --cflags`"
|
# SDL must not add _GNU_SOURCE as it breaks many platforms
|
||||||
|
CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's~-D_GNU_SOURCE[^ ]*~~'`"
|
||||||
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
|
if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
|
||||||
if [ "$enable_static" != "0" ]; then
|
if [ "$enable_static" != "0" ]; then
|
||||||
LIBS="$LIBS `$sdl_config --static-libs`"
|
LIBS="$LIBS `$sdl_config --static-libs`"
|
||||||
|
@ -145,11 +145,6 @@
|
|||||||
#include <malloc.h> // alloca()
|
#include <malloc.h> // alloca()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MINGW32__) && defined(_GNU_SOURCE)
|
|
||||||
/* For some weird reasons, SDL defines _GNU_SOURCE */
|
|
||||||
#undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user