Commit c3ab0456 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Fixed gcc warnings for apps using SDL headers with -Wundef flag.

Fixes Bugzilla #1216.

Thanks to Dimitris Zenios for the patch!
parent 8b1cf3db
...@@ -53,7 +53,7 @@ assert can have unique static variables associated with it. ...@@ -53,7 +53,7 @@ assert can have unique static variables associated with it.
/* Don't include intrin.h here because it contains C++ code */ /* Don't include intrin.h here because it contains C++ code */
extern void __cdecl __debugbreak(void); extern void __cdecl __debugbreak(void);
#define SDL_TriggerBreakpoint() __debugbreak() #define SDL_TriggerBreakpoint() __debugbreak()
#elif (defined(__GNUC__) && ((__i386__) || (__x86_64__))) #elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
#elif defined(HAVE_SIGNAL_H) #elif defined(HAVE_SIGNAL_H)
#include <signal.h> #include <signal.h>
...@@ -63,7 +63,7 @@ extern void __cdecl __debugbreak(void); ...@@ -63,7 +63,7 @@ extern void __cdecl __debugbreak(void);
#define SDL_TriggerBreakpoint() #define SDL_TriggerBreakpoint()
#endif #endif
#if (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
# define SDL_FUNCTION __func__ # define SDL_FUNCTION __func__
#elif ((__GNUC__ >= 2) || defined(_MSC_VER)) #elif ((__GNUC__ >= 2) || defined(_MSC_VER))
# define SDL_FUNCTION __FUNCTION__ # define SDL_FUNCTION __FUNCTION__
......
...@@ -140,7 +140,7 @@ void _ReadWriteBarrier(void); ...@@ -140,7 +140,7 @@ void _ReadWriteBarrier(void);
/* Platform specific optimized versions of the atomic functions, /* Platform specific optimized versions of the atomic functions,
* you can disable these by defining SDL_DISABLE_ATOMIC_INLINE * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE
*/ */
#if SDL_ATOMIC_DISABLED #if defined(SDL_ATOMIC_DISABLED) && SDL_ATOMIC_DISABLED
#define SDL_DISABLE_ATOMIC_INLINE #define SDL_DISABLE_ATOMIC_INLINE
#endif #endif
#ifndef SDL_DISABLE_ATOMIC_INLINE #ifndef SDL_DISABLE_ATOMIC_INLINE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment