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:
parent
4e8f81ab6e
commit
44dbed38ac
21 changed files with 63 additions and 76 deletions
|
@ -46,7 +46,7 @@
|
|||
#define _PATH_DEV_AUDIO "/dev/audio"
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
static SDL_INLINE void
|
||||
test_device(const char *fname, int flags, int (*test) (int fd),
|
||||
SDL_AddAudioDevice addfn)
|
||||
{
|
||||
|
|
|
@ -241,25 +241,25 @@ ALSA_WaitDevice(_THIS)
|
|||
tmp = ptr[3]; ptr[3] = ptr[5]; ptr[5] = tmp; \
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
static SDL_INLINE void
|
||||
swizzle_alsa_channels_6_64bit(_THIS)
|
||||
{
|
||||
SWIZ6(Uint64);
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
static SDL_INLINE void
|
||||
swizzle_alsa_channels_6_32bit(_THIS)
|
||||
{
|
||||
SWIZ6(Uint32);
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
static SDL_INLINE void
|
||||
swizzle_alsa_channels_6_16bit(_THIS)
|
||||
{
|
||||
SWIZ6(Uint16);
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
static SDL_INLINE void
|
||||
swizzle_alsa_channels_6_8bit(_THIS)
|
||||
{
|
||||
SWIZ6(Uint8);
|
||||
|
@ -272,7 +272,7 @@ swizzle_alsa_channels_6_8bit(_THIS)
|
|||
* Called right before feeding this->hidden->mixbuf to the hardware. Swizzle
|
||||
* channels from Windows/Mac order to the format alsalib will want.
|
||||
*/
|
||||
static __inline__ void
|
||||
static SDL_INLINE void
|
||||
swizzle_alsa_channels(_THIS)
|
||||
{
|
||||
if (this->spec.channels == 6) {
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#if (PA_API_VERSION < 12)
|
||||
/** Return non-zero if the passed state is one of the connected states */
|
||||
static __inline__ int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
|
||||
static SDL_INLINE int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
|
||||
return
|
||||
x == PA_CONTEXT_CONNECTING ||
|
||||
x == PA_CONTEXT_AUTHORIZING ||
|
||||
|
@ -57,7 +57,7 @@ static __inline__ int PA_CONTEXT_IS_GOOD(pa_context_state_t x) {
|
|||
x == PA_CONTEXT_READY;
|
||||
}
|
||||
/** Return non-zero if the passed state is one of the connected states */
|
||||
static __inline__ int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
|
||||
static SDL_INLINE int PA_STREAM_IS_GOOD(pa_stream_state_t x) {
|
||||
return
|
||||
x == PA_STREAM_CREATING ||
|
||||
x == PA_STREAM_READY;
|
||||
|
@ -322,7 +322,7 @@ PULSEAUDIO_CloseDevice(_THIS)
|
|||
}
|
||||
|
||||
|
||||
static __inline__ int
|
||||
static SDL_INLINE int
|
||||
squashVersion(const int major, const int minor, const int patch)
|
||||
{
|
||||
return ((major & 0xFF) << 16) | ((minor & 0xFF) << 8) | (patch & 0xFF);
|
||||
|
|
|
@ -83,7 +83,7 @@ uint32_t qsa_playback_devices;
|
|||
QSA_Device qsa_capture_device[QSA_MAX_DEVICES];
|
||||
uint32_t qsa_capture_devices;
|
||||
|
||||
static inline int
|
||||
static SDL_INLINE int
|
||||
QSA_SetError(const char *fn, int status)
|
||||
{
|
||||
return SDL_SetError("QSA: %s() failed: %s", fn, snd_strerror(status));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue