Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
authorSam Lantinga <slouken@libsdl.org>
Sun, 20 Oct 2013 21:56:15 -0700
changeset 78602b0bcdea3a79
parent 7859 af63b63e7aac
child 7861 29d012c8f2a9
Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings

Andreas Ertelt

The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/4434498bf4b9 / https://bugzilla.libsdl.org/show_bug.cgi?id=2121)

The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple

warning: always_inline function might not be inlinable [-Wattributes]

as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
include/begin_code.h
src/atomic/SDL_atomic.c
src/audio/SDL_audiodev.c
src/audio/alsa/SDL_alsa_audio.c
src/audio/pulseaudio/SDL_pulseaudio.c
src/audio/qsa/SDL_qsa_audio.c
src/cpuinfo/SDL_cpuinfo.c
src/events/SDL_events.c
src/joystick/linux/SDL_sysjoystick.c
src/joystick/psp/SDL_sysjoystick.c
src/render/opengles/SDL_render_gles.c
src/video/SDL_blit_copy.c
src/video/SDL_surface.c
src/video/SDL_video.c
src/video/bwindow/SDL_bframebuffer.cc
src/video/bwindow/SDL_bmodes.cc
src/video/bwindow/SDL_bopengl.cc
src/video/bwindow/SDL_bwindow.cc
src/video/directfb/SDL_DirectFB_render.c
src/video/directfb/SDL_DirectFB_video.h
src/video/x11/SDL_x11messagebox.c
     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__)
     2.1 --- a/src/atomic/SDL_atomic.c	Sun Oct 20 21:34:38 2013 -0700
     2.2 +++ b/src/atomic/SDL_atomic.c	Sun Oct 20 21:56:15 2013 -0700
     2.3 @@ -55,7 +55,7 @@
     2.4  
     2.5  static SDL_SpinLock locks[32];
     2.6  
     2.7 -static __inline__ void
     2.8 +static SDL_INLINE void
     2.9  enterLock(void *a)
    2.10  {
    2.11      uintptr_t index = ((((uintptr_t)a) >> 3) & 0x1f);
    2.12 @@ -63,7 +63,7 @@
    2.13      SDL_AtomicLock(&locks[index]);
    2.14  }
    2.15  
    2.16 -static __inline__ void
    2.17 +static SDL_INLINE void
    2.18  leaveLock(void *a)
    2.19  {
    2.20      uintptr_t index = ((((uintptr_t)a) >> 3) & 0x1f);
     3.1 --- a/src/audio/SDL_audiodev.c	Sun Oct 20 21:34:38 2013 -0700
     3.2 +++ b/src/audio/SDL_audiodev.c	Sun Oct 20 21:56:15 2013 -0700
     3.3 @@ -46,7 +46,7 @@
     3.4  #define _PATH_DEV_AUDIO "/dev/audio"
     3.5  #endif
     3.6  
     3.7 -static inline void
     3.8 +static SDL_INLINE void
     3.9  test_device(const char *fname, int flags, int (*test) (int fd),
    3.10              SDL_AddAudioDevice addfn)
    3.11  {
     4.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Sun Oct 20 21:34:38 2013 -0700
     4.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Sun Oct 20 21:56:15 2013 -0700
     4.3 @@ -241,25 +241,25 @@
     4.4          tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \
     4.5      }
     4.6  
     4.7 -static __inline__ void
     4.8 +static SDL_INLINE void
     4.9  swizzle_alsa_channels_6_64bit(_THIS)
    4.10  {
    4.11      SWIZ6(Uint64);
    4.12  }
    4.13  
    4.14 -static __inline__ void
    4.15 +static SDL_INLINE void
    4.16  swizzle_alsa_channels_6_32bit(_THIS)
    4.17  {
    4.18      SWIZ6(Uint32);
    4.19  }
    4.20  
    4.21 -static __inline__ void
    4.22 +static SDL_INLINE void
    4.23  swizzle_alsa_channels_6_16bit(_THIS)
    4.24  {
    4.25      SWIZ6(Uint16);
    4.26  }
    4.27  
    4.28 -static __inline__ void
    4.29 +static SDL_INLINE void
    4.30  swizzle_alsa_channels_6_8bit(_THIS)
    4.31  {
    4.32      SWIZ6(Uint8);
    4.33 @@ -272,7 +272,7 @@
    4.34   * Called right before feeding this->hidden->mixbuf to the hardware. Swizzle
    4.35   *  channels from Windows/Mac order to the format alsalib will want.
    4.36   */
    4.37 -static __inline__ void
    4.38 +static SDL_INLINE void
    4.39  swizzle_alsa_channels(_THIS)
    4.40  {
    4.41      if (this->spec.channels == 6) {
     5.1 --- a/src/audio/pulseaudio/SDL_pulseaudio.c	Sun Oct 20 21:34:38 2013 -0700
     5.2 +++ b/src/audio/pulseaudio/SDL_pulseaudio.c	Sun Oct 20 21:56:15 2013 -0700
     5.3 @@ -49,7 +49,7 @@
     5.4  
     5.5  #if (PA_API_VERSION < 12)
     5.6  /** Return non-zero if the passed state is one of the connected states */
     5.7 -static __inline__ int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
     5.8 +static SDL_INLINE int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
     5.9      return
    5.10          x == PA_CONTEXT_CONNECTING ||
    5.11          x == PA_CONTEXT_AUTHORIZING ||
    5.12 @@ -57,7 +57,7 @@
    5.13          x == PA_CONTEXT_READY;
    5.14  }
    5.15  /** Return non-zero if the passed state is one of the connected states */
    5.16 -static __inline__ int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
    5.17 +static SDL_INLINE int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
    5.18      return
    5.19          x == PA_STREAM_CREATING ||
    5.20          x == PA_STREAM_READY;
    5.21 @@ -322,7 +322,7 @@
    5.22  }
    5.23  
    5.24  
    5.25 -static __inline__ int
    5.26 +static SDL_INLINE int
    5.27  squashVersion(const int major, const int minor, const int patch)
    5.28  {
    5.29      return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF);
     6.1 --- a/src/audio/qsa/SDL_qsa_audio.c	Sun Oct 20 21:34:38 2013 -0700
     6.2 +++ b/src/audio/qsa/SDL_qsa_audio.c	Sun Oct 20 21:56:15 2013 -0700
     6.3 @@ -83,7 +83,7 @@
     6.4  QSA_Device qsa_capture_device[QSA_MAX_DEVICES];
     6.5  uint32_t qsa_capture_devices;
     6.6  
     6.7 -static inline int
     6.8 +static SDL_INLINE int
     6.9  QSA_SetError(const char *fn, int status)
    6.10  {
    6.11      return SDL_SetError("QSA: %s() failed: %s", fn, snd_strerror(status));
     7.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Sun Oct 20 21:34:38 2013 -0700
     7.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Sun Oct 20 21:56:15 2013 -0700
     7.3 @@ -68,7 +68,7 @@
     7.4  }
     7.5  #endif /* HAVE_SETJMP */
     7.6  
     7.7 -static __inline__ int
     7.8 +static SDL_INLINE int
     7.9  CPU_haveCPUID(void)
    7.10  {
    7.11      int has_CPUID = 0;
    7.12 @@ -192,7 +192,7 @@
    7.13      a = b = c = d = 0
    7.14  #endif
    7.15  
    7.16 -static __inline__ int
    7.17 +static SDL_INLINE int
    7.18  CPU_getCPUIDFeatures(void)
    7.19  {
    7.20      int features = 0;
    7.21 @@ -206,7 +206,7 @@
    7.22      return features;
    7.23  }
    7.24  
    7.25 -static __inline__ int
    7.26 +static SDL_INLINE int
    7.27  CPU_haveRDTSC(void)
    7.28  {
    7.29      if (CPU_haveCPUID()) {
    7.30 @@ -215,7 +215,7 @@
    7.31      return 0;
    7.32  }
    7.33  
    7.34 -static __inline__ int
    7.35 +static SDL_INLINE int
    7.36  CPU_haveAltiVec(void)
    7.37  {
    7.38      volatile int altivec = 0;
    7.39 @@ -242,7 +242,7 @@
    7.40      return altivec;
    7.41  }
    7.42  
    7.43 -static __inline__ int
    7.44 +static SDL_INLINE int
    7.45  CPU_haveMMX(void)
    7.46  {
    7.47      if (CPU_haveCPUID()) {
    7.48 @@ -251,7 +251,7 @@
    7.49      return 0;
    7.50  }
    7.51  
    7.52 -static __inline__ int
    7.53 +static SDL_INLINE int
    7.54  CPU_have3DNow(void)
    7.55  {
    7.56      if (CPU_haveCPUID()) {
    7.57 @@ -266,7 +266,7 @@
    7.58      return 0;
    7.59  }
    7.60  
    7.61 -static __inline__ int
    7.62 +static SDL_INLINE int
    7.63  CPU_haveSSE(void)
    7.64  {
    7.65      if (CPU_haveCPUID()) {
    7.66 @@ -275,7 +275,7 @@
    7.67      return 0;
    7.68  }
    7.69  
    7.70 -static __inline__ int
    7.71 +static SDL_INLINE int
    7.72  CPU_haveSSE2(void)
    7.73  {
    7.74      if (CPU_haveCPUID()) {
    7.75 @@ -284,7 +284,7 @@
    7.76      return 0;
    7.77  }
    7.78  
    7.79 -static __inline__ int
    7.80 +static SDL_INLINE int
    7.81  CPU_haveSSE3(void)
    7.82  {
    7.83      if (CPU_haveCPUID()) {
    7.84 @@ -299,7 +299,7 @@
    7.85      return 0;
    7.86  }
    7.87  
    7.88 -static __inline__ int
    7.89 +static SDL_INLINE int
    7.90  CPU_haveSSE41(void)
    7.91  {
    7.92      if (CPU_haveCPUID()) {
    7.93 @@ -314,7 +314,7 @@
    7.94      return 0;
    7.95  }
    7.96  
    7.97 -static __inline__ int
    7.98 +static SDL_INLINE int
    7.99  CPU_haveSSE42(void)
   7.100  {
   7.101      if (CPU_haveCPUID()) {
     8.1 --- a/src/events/SDL_events.c	Sun Oct 20 21:34:38 2013 -0700
     8.2 +++ b/src/events/SDL_events.c	Sun Oct 20 21:56:15 2013 -0700
     8.3 @@ -83,7 +83,7 @@
     8.4  } SDL_EventQ = { NULL, SDL_TRUE };
     8.5  
     8.6  
     8.7 -static __inline__ SDL_bool
     8.8 +static SDL_INLINE SDL_bool
     8.9  SDL_ShouldPollJoystick()
    8.10  {
    8.11  #if !SDL_JOYSTICK_DISABLED
     9.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Sun Oct 20 21:34:38 2013 -0700
     9.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Sun Oct 20 21:56:15 2013 -0700
     9.3 @@ -617,7 +617,7 @@
     9.4      return !joystick->closed && (joystick->hwdata->item != NULL);
     9.5  }
     9.6  
     9.7 -static __inline__ void
     9.8 +static SDL_INLINE void
     9.9  HandleHat(SDL_Joystick * stick, Uint8 hat, int axis, int value)
    9.10  {
    9.11      struct hwdata_hat *the_hat;
    9.12 @@ -643,14 +643,14 @@
    9.13      }
    9.14  }
    9.15  
    9.16 -static __inline__ void
    9.17 +static SDL_INLINE void
    9.18  HandleBall(SDL_Joystick * stick, Uint8 ball, int axis, int value)
    9.19  {
    9.20      stick->hwdata->balls[ball].axis[axis] += value;
    9.21  }
    9.22  
    9.23  
    9.24 -static __inline__ int
    9.25 +static SDL_INLINE int
    9.26  AxisCorrect(SDL_Joystick * joystick, int which, int value)
    9.27  {
    9.28      struct axis_correct *correct;
    9.29 @@ -679,7 +679,7 @@
    9.30      return value;
    9.31  }
    9.32  
    9.33 -static __inline__ void
    9.34 +static SDL_INLINE void
    9.35  PollAllValues(SDL_Joystick * joystick)
    9.36  {
    9.37      struct input_absinfo absinfo;
    9.38 @@ -717,7 +717,7 @@
    9.39      }
    9.40  }
    9.41  
    9.42 -static __inline__ void
    9.43 +static SDL_INLINE void
    9.44  HandleInputEvents(SDL_Joystick * joystick)
    9.45  {
    9.46      struct input_event events[32];
    10.1 --- a/src/joystick/psp/SDL_sysjoystick.c	Sun Oct 20 21:34:38 2013 -0700
    10.2 +++ b/src/joystick/psp/SDL_sysjoystick.c	Sun Oct 20 21:56:15 2013 -0700
    10.3 @@ -60,7 +60,7 @@
    10.4  static point d = { 128, 32767 };
    10.5  
    10.6  /* simple linear interpolation between two points */
    10.7 -static __inline__ void lerp (point *dest, point *a, point *b, float t)
    10.8 +static SDL_INLINE void lerp (point *dest, point *a, point *b, float t)
    10.9  {
   10.10      dest->x = a->x + (b->x - a->x)*t;
   10.11      dest->y = a->y + (b->y - a->y)*t;
    11.1 --- a/src/render/opengles/SDL_render_gles.c	Sun Oct 20 21:34:38 2013 -0700
    11.2 +++ b/src/render/opengles/SDL_render_gles.c	Sun Oct 20 21:56:15 2013 -0700
    11.3 @@ -414,7 +414,7 @@
    11.4      }
    11.5  }
    11.6  
    11.7 -static __inline__ int
    11.8 +static SDL_INLINE int
    11.9  power_of_2(int input)
   11.10  {
   11.11      int value = 1;
    12.1 --- a/src/video/SDL_blit_copy.c	Sun Oct 20 21:34:38 2013 -0700
    12.2 +++ b/src/video/SDL_blit_copy.c	Sun Oct 20 21:56:15 2013 -0700
    12.3 @@ -27,7 +27,7 @@
    12.4  
    12.5  #ifdef __SSE__
    12.6  /* This assumes 16-byte aligned src and dst */
    12.7 -static __inline__ void
    12.8 +static SDL_INLINE void
    12.9  SDL_memcpySSE(Uint8 * dst, const Uint8 * src, int len)
   12.10  {
   12.11      int i;
   12.12 @@ -56,7 +56,7 @@
   12.13  #ifdef _MSC_VER
   12.14  #pragma warning(disable:4799)
   12.15  #endif
   12.16 -static __inline__ void
   12.17 +static SDL_INLINE void
   12.18  SDL_memcpyMMX(Uint8 * dst, const Uint8 * src, int len)
   12.19  {
   12.20      const int remain = (len & 63);
    13.1 --- a/src/video/SDL_surface.c	Sun Oct 20 21:34:38 2013 -0700
    13.2 +++ b/src/video/SDL_surface.c	Sun Oct 20 21:56:15 2013 -0700
    13.3 @@ -951,7 +951,7 @@
    13.4  /*
    13.5   * Create a surface on the stack for quick blit operations
    13.6   */
    13.7 -static __inline__ SDL_bool
    13.8 +static SDL_INLINE SDL_bool
    13.9  SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format,
   13.10                           void * pixels, int pitch, SDL_Surface * surface,
   13.11                           SDL_PixelFormat * format, SDL_BlitMap * blitmap)
    14.1 --- a/src/video/SDL_video.c	Sun Oct 20 21:34:38 2013 -0700
    14.2 +++ b/src/video/SDL_video.c	Sun Oct 20 21:56:15 2013 -0700
    14.3 @@ -2382,7 +2382,7 @@
    14.4      }
    14.5  }
    14.6  
    14.7 -static __inline__ SDL_bool
    14.8 +static SDL_INLINE SDL_bool
    14.9  isAtLeastGL3(const char *verstr)
   14.10  {
   14.11      return ( verstr && (SDL_atoi(verstr) >= 3) );
    15.1 --- a/src/video/bwindow/SDL_bframebuffer.cc	Sun Oct 20 21:34:38 2013 -0700
    15.2 +++ b/src/video/bwindow/SDL_bframebuffer.cc	Sun Oct 20 21:56:15 2013 -0700
    15.3 @@ -37,11 +37,11 @@
    15.4  
    15.5  int32 BE_UpdateOnce(SDL_Window *window);
    15.6  
    15.7 -static inline SDL_BWin *_ToBeWin(SDL_Window *window) {
    15.8 +static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
    15.9  	return ((SDL_BWin*)(window->driverdata));
   15.10  }
   15.11  
   15.12 -static inline SDL_BApp *_GetBeApp() {
   15.13 +static SDL_INLINE SDL_BApp *_GetBeApp() {
   15.14  	return ((SDL_BApp*)be_app);
   15.15  }
   15.16  
    16.1 --- a/src/video/bwindow/SDL_bmodes.cc	Sun Oct 20 21:34:38 2013 -0700
    16.2 +++ b/src/video/bwindow/SDL_bmodes.cc	Sun Oct 20 21:56:15 2013 -0700
    16.3 @@ -48,15 +48,15 @@
    16.4  };
    16.5  #endif
    16.6  
    16.7 -static inline SDL_BWin *_ToBeWin(SDL_Window *window) {
    16.8 +static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
    16.9  	return ((SDL_BWin*)(window->driverdata));
   16.10  }
   16.11  
   16.12 -static inline SDL_BApp *_GetBeApp() {
   16.13 +static SDL_INLINE SDL_BApp *_GetBeApp() {
   16.14  	return ((SDL_BApp*)be_app);
   16.15  }
   16.16  
   16.17 -static inline display_mode * _ExtractBMode(SDL_DisplayMode *mode) {
   16.18 +static SDL_INLINE display_mode * _ExtractBMode(SDL_DisplayMode *mode) {
   16.19  #if WRAP_BMODE
   16.20  	return ((SDL_DisplayModeData*)mode->driverdata)->bmode;
   16.21  #else
    17.1 --- a/src/video/bwindow/SDL_bopengl.cc	Sun Oct 20 21:34:38 2013 -0700
    17.2 +++ b/src/video/bwindow/SDL_bopengl.cc	Sun Oct 20 21:56:15 2013 -0700
    17.3 @@ -37,11 +37,11 @@
    17.4  
    17.5  #define BGL_FLAGS BGL_RGB | BGL_DOUBLE
    17.6  
    17.7 -static inline SDL_BWin *_ToBeWin(SDL_Window *window) {
    17.8 +static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
    17.9  	return ((SDL_BWin*)(window->driverdata));
   17.10  }
   17.11  
   17.12 -static inline SDL_BApp *_GetBeApp() {
   17.13 +static SDL_INLINE SDL_BApp *_GetBeApp() {
   17.14  	return ((SDL_BApp*)be_app);
   17.15  }
   17.16  
    18.1 --- a/src/video/bwindow/SDL_bwindow.cc	Sun Oct 20 21:34:38 2013 -0700
    18.2 +++ b/src/video/bwindow/SDL_bwindow.cc	Sun Oct 20 21:56:15 2013 -0700
    18.3 @@ -31,11 +31,11 @@
    18.4  extern "C" {
    18.5  #endif
    18.6  
    18.7 -static inline SDL_BWin *_ToBeWin(SDL_Window *window) {
    18.8 +static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
    18.9  	return ((SDL_BWin*)(window->driverdata));
   18.10  }
   18.11  
   18.12 -static inline SDL_BApp *_GetBeApp() {
   18.13 +static SDL_INLINE SDL_BApp *_GetBeApp() {
   18.14  	return ((SDL_BApp*)be_app);
   18.15  }
   18.16  
    19.1 --- a/src/video/directfb/SDL_DirectFB_render.c	Sun Oct 20 21:34:38 2013 -0700
    19.2 +++ b/src/video/directfb/SDL_DirectFB_render.c	Sun Oct 20 21:56:15 2013 -0700
    19.3 @@ -167,7 +167,7 @@
    19.4  #endif
    19.5  } DirectFB_TextureData;
    19.6  
    19.7 -static __inline__ void
    19.8 +static SDL_INLINE void
    19.9  SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr)
   19.10  {
   19.11      dr->x = sr->x;
   19.12 @@ -175,7 +175,7 @@
   19.13      dr->h = sr->h;
   19.14      dr->w = sr->w;
   19.15  }
   19.16 -static __inline__ void
   19.17 +static SDL_INLINE void
   19.18  SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr)
   19.19  {
   19.20      dr->x = sr->x;
   19.21 @@ -211,7 +211,7 @@
   19.22  #endif
   19.23  }
   19.24  
   19.25 -static inline IDirectFBSurface *get_dfb_surface(SDL_Window *window)
   19.26 +static SDL_INLINE IDirectFBSurface *get_dfb_surface(SDL_Window *window)
   19.27  {
   19.28      SDL_SysWMinfo wm_info;
   19.29      SDL_memset(&wm_info, 0, sizeof(SDL_SysWMinfo));
   19.30 @@ -222,7 +222,7 @@
   19.31      return wm_info.info.dfb.surface;
   19.32  }
   19.33  
   19.34 -static inline IDirectFBWindow *get_dfb_window(SDL_Window *window)
   19.35 +static SDL_INLINE IDirectFBWindow *get_dfb_window(SDL_Window *window)
   19.36  {
   19.37      SDL_SysWMinfo wm_info;
   19.38      SDL_memset(&wm_info, 0, sizeof(SDL_SysWMinfo));
    20.1 --- a/src/video/directfb/SDL_DirectFB_video.h	Sun Oct 20 21:34:38 2013 -0700
    20.2 +++ b/src/video/directfb/SDL_DirectFB_video.h	Sun Oct 20 21:56:15 2013 -0700
    20.3 @@ -88,7 +88,7 @@
    20.4  
    20.5  #define SDL_DFB_DEBUG(x...) SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, x)
    20.6  
    20.7 -static inline DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int src_line) {
    20.8 +static SDL_INLINE DFBResult sdl_dfb_check(DFBResult ret, const char *src_file, int src_line) {
    20.9      if (ret != DFB_OK) {
   20.10          SDL_DFB_LOG("%s (%d):%s", src_file, src_line, DirectFBErrorString (ret) );
   20.11          SDL_SetError("%s:%s", SDL_DFB_CONTEXT, DirectFBErrorString (ret) );
    21.1 --- a/src/video/x11/SDL_x11messagebox.c	Sun Oct 20 21:34:38 2013 -0700
    21.2 +++ b/src/video/x11/SDL_x11messagebox.c	Sun Oct 20 21:56:15 2013 -0700
    21.3 @@ -112,7 +112,7 @@
    21.4  } SDL_MessageBoxDataX11;
    21.5  
    21.6  /* Maximum helper for ints. */
    21.7 -static __inline__ int
    21.8 +static SDL_INLINE int
    21.9  IntMax( int a, int b )
   21.10  {
   21.11      return ( a > b  ) ? a : b;