Changeset - r10936:35f9e4bedea8
[Not reviewed]
master
0 2 0
rubidium - 15 years ago 2009-01-25 22:51:59
rubidium@openttd.org
(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...
2 files changed with 2 insertions and 6 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -1202,13 +1202,14 @@ make_cflags_and_ldflags() {
 
			fi
 
		fi
 
	fi
 

	
 
	if [ -n "$sdl_config" ]; then
 
		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 [ "$enable_static" != "0" ]; then
 
				LIBS="$LIBS `$sdl_config --static-libs`"
 
			else
 
				LIBS="$LIBS `$sdl_config --libs`"
 
			fi
src/stdafx.h
Show inline comments
 
@@ -142,17 +142,12 @@
 
#endif /* __WATCOMC__ */
 

	
 
#if defined(__MINGW32__) || defined(__CYGWIN__)
 
	#include <malloc.h> // alloca()
 
#endif
 

	
 
#if defined(__MINGW32__) && defined(_GNU_SOURCE)
 
	/* For some weird reasons, SDL defines _GNU_SOURCE */
 
	#undef _GNU_SOURCE
 
#endif
 

	
 
#if defined(WIN32)
 
	#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
 
#endif
 

	
 
/* Stuff for MSVC */
 
#if defined(_MSC_VER)
0 comments (0 inline, 0 general)