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.
This commit is contained in:
Sam Lantinga 2013-10-20 21:56:15 -07:00
parent 4e8f81ab6e
commit 44dbed38ac
21 changed files with 63 additions and 76 deletions

View file

@ -617,7 +617,7 @@ SDL_bool SDL_SYS_JoystickAttached(SDL_Joystick *joystick)
return !joystick->closed && (joystick->hwdata->item != NULL);
}
static __inline__ void
static SDL_INLINE void
HandleHat(SDL_Joystick * stick, Uint8 hat, int axis, int value)
{
struct hwdata_hat *the_hat;
@ -643,14 +643,14 @@ HandleHat(SDL_Joystick * stick, Uint8 hat, int axis, int value)
}
}
static __inline__ void
static SDL_INLINE void
HandleBall(SDL_Joystick * stick, Uint8 ball, int axis, int value)
{
stick->hwdata->balls[ball].axis[axis] += value;
}
static __inline__ int
static SDL_INLINE int
AxisCorrect(SDL_Joystick * joystick, int which, int value)
{
struct axis_correct *correct;
@ -679,7 +679,7 @@ AxisCorrect(SDL_Joystick * joystick, int which, int value)
return value;
}
static __inline__ void
static SDL_INLINE void
PollAllValues(SDL_Joystick * joystick)
{
struct input_absinfo absinfo;
@ -717,7 +717,7 @@ PollAllValues(SDL_Joystick * joystick)
}
}
static __inline__ void
static SDL_INLINE void
HandleInputEvents(SDL_Joystick * joystick)
{
struct input_event events[32];