include/begin_code.h
changeset 7771 4434498bf4b9
parent 7665 4c0a6cfe27a0
child 7860 2b0bcdea3a79
     1.1 --- a/include/begin_code.h	Mon Sep 30 22:16:14 2013 -0700
     1.2 +++ b/include/begin_code.h	Mon Sep 30 22:35:32 2013 -0700
     1.3 @@ -99,11 +99,9 @@
     1.4  #endif
     1.5  #endif /* Compiler needs structure packing set */
     1.6  
     1.7 +#ifndef __inline__
     1.8  /* Set up compiler-specific options for inlining functions */
     1.9  #ifndef SDL_INLINE_OKAY
    1.10 -#ifdef __GNUC__
    1.11 -#define SDL_INLINE_OKAY
    1.12 -#else
    1.13  /* Add any special compiler-specific cases here */
    1.14  #if defined(_MSC_VER) || defined(__BORLANDC__) || \
    1.15      defined(__DMC__) || defined(__SC__) || \
    1.16 @@ -112,31 +110,34 @@
    1.17  #ifndef __inline__
    1.18  #define __inline__  __inline
    1.19  #endif
    1.20 -#define SDL_INLINE_OKAY
    1.21 +#define SDL_INLINE_OKAY 1
    1.22  #else
    1.23  #if !defined(__MRC__) && !defined(_SGI_SOURCE)
    1.24  #ifndef __inline__
    1.25  #define __inline__ inline
    1.26  #endif
    1.27 -#define SDL_INLINE_OKAY
    1.28 +#define SDL_INLINE_OKAY 1
    1.29  #endif /* Not a funky compiler */
    1.30  #endif /* Visual C++ */
    1.31 -#endif /* GNU C */
    1.32  #endif /* SDL_INLINE_OKAY */
    1.33  
    1.34  /* If inlining isn't supported, remove "__inline__", turning static
    1.35     inlined functions into static functions (resulting in code bloat
    1.36     in all files which include the offending header files)
    1.37  */
    1.38 -#ifndef SDL_INLINE_OKAY
    1.39 +#if !SDL_INLINE_OKAY || __STRICT_ANSI__
    1.40 +#ifdef __inline__
    1.41 +#undef __inline__
    1.42 +#endif
    1.43  #define __inline__
    1.44  #endif
    1.45 +#endif /* __inline__ not defined */
    1.46  
    1.47  #ifndef SDL_FORCE_INLINE
    1.48  #if defined(_MSC_VER)
    1.49  #define SDL_FORCE_INLINE __forceinline
    1.50  #elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
    1.51 -#define SDL_FORCE_INLINE __attribute__((always_inline)) static inline
    1.52 +#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
    1.53  #else
    1.54  #define SDL_FORCE_INLINE static __inline__
    1.55  #endif