Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed gcc warnings for apps using SDL headers with -Wundef flag.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #1216.

Thanks to Dimitris Zenios for the patch!
  • Loading branch information
icculus committed Jun 6, 2011
1 parent 005c6dc commit ba09f99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/SDL_assert.h
Expand Up @@ -53,7 +53,7 @@ assert can have unique static variables associated with it.
/* Don't include intrin.h here because it contains C++ code */
extern void __cdecl __debugbreak(void);
#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" )
#elif defined(HAVE_SIGNAL_H)
#include <signal.h>
Expand All @@ -63,7 +63,7 @@ extern void __cdecl __debugbreak(void);
#define SDL_TriggerBreakpoint()
#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__
#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
# define SDL_FUNCTION __FUNCTION__
Expand Down
2 changes: 1 addition & 1 deletion include/SDL_atomic.h
Expand Up @@ -140,7 +140,7 @@ void _ReadWriteBarrier(void);
/* Platform specific optimized versions of the atomic functions,
* 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
#endif
#ifndef SDL_DISABLE_ATOMIC_INLINE
Expand Down

0 comments on commit ba09f99

Please sign in to comment.