include/begin_code.h
changeset 7860 2b0bcdea3a79
parent 7771 4434498bf4b9
child 7872 ca36ab2a8179
     1.1 --- a/include/begin_code.h	Sun Oct 20 21:34:38 2013 -0700
     1.2 +++ b/include/begin_code.h	Sun Oct 20 21:56:15 2013 -0700
     1.3 @@ -99,49 +99,36 @@
     1.4  #endif
     1.5  #endif /* Compiler needs structure packing set */
     1.6  
     1.7 -#ifndef __inline__
     1.8 +#ifndef SDL_INLINE
     1.9  /* Set up compiler-specific options for inlining functions */
    1.10 -#ifndef SDL_INLINE_OKAY
    1.11 -/* Add any special compiler-specific cases here */
    1.12  #if defined(_MSC_VER) || defined(__BORLANDC__) || \
    1.13      defined(__DMC__) || defined(__SC__) || \
    1.14      defined(__WATCOMC__) || defined(__LCC__) || \
    1.15      defined(__DECC)
    1.16 -#ifndef __inline__
    1.17 -#define __inline__  __inline
    1.18 +#define SDL_INLINE  __inline
    1.19 +#else
    1.20 +#define SDL_INLINE inline
    1.21 +#endif /* Visual C++ */
    1.22 +#endif /* SDL_INLINE not defined */
    1.23 +
    1.24 +/* If inlining isn't supported, remove SDL_INLINE, turning static
    1.25 +   inlined functions into static functions (potentially resulting in
    1.26 +   code bloat in all files which include the offending header files)
    1.27 +*/
    1.28 +#if __STRICT_ANSI__
    1.29 +#undef SDL_INLINE
    1.30 +#define SDL_INLINE
    1.31  #endif
    1.32 -#define SDL_INLINE_OKAY 1
    1.33 -#else
    1.34 -#if !defined(__MRC__) && !defined(_SGI_SOURCE)
    1.35 -#ifndef __inline__
    1.36 -#define __inline__ inline
    1.37 -#endif
    1.38 -#define SDL_INLINE_OKAY 1
    1.39 -#endif /* Not a funky compiler */
    1.40 -#endif /* Visual C++ */
    1.41 -#endif /* SDL_INLINE_OKAY */
    1.42 -
    1.43 -/* If inlining isn't supported, remove "__inline__", turning static
    1.44 -   inlined functions into static functions (resulting in code bloat
    1.45 -   in all files which include the offending header files)
    1.46 -*/
    1.47 -#if !SDL_INLINE_OKAY || __STRICT_ANSI__
    1.48 -#ifdef __inline__
    1.49 -#undef __inline__
    1.50 -#endif
    1.51 -#define __inline__
    1.52 -#endif
    1.53 -#endif /* __inline__ not defined */
    1.54  
    1.55  #ifndef SDL_FORCE_INLINE
    1.56  #if defined(_MSC_VER)
    1.57  #define SDL_FORCE_INLINE __forceinline
    1.58  #elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )
    1.59 -#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__
    1.60 +#define SDL_FORCE_INLINE __attribute__((always_inline)) static SDL_INLINE
    1.61  #else
    1.62 -#define SDL_FORCE_INLINE static __inline__
    1.63 +#define SDL_FORCE_INLINE static SDL_INLINE
    1.64  #endif
    1.65 -#endif
    1.66 +#endif /* SDL_FORCE_INLINE not defined */
    1.67  
    1.68  /* Apparently this is needed by several Windows compilers */
    1.69  #if !defined(__MACH__)