summaryrefslogtreecommitdiff
path: root/src/cpuinfo/SDL_cpuinfo.c
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2013-10-20 21:56:15 -0700
committerSam Lantinga <slouken@libsdl.org>2013-10-20 21:56:15 -0700
commite7b498cf26431cd7d17e67e929e71ed274cae6e9 (patch)
tree6d03ede3a35ac0320a6f7c076290e473f12f2ab6 /src/cpuinfo/SDL_cpuinfo.c
parent2ff88d48c7d07b10c32df71e2f93cf24c45d15d9 (diff)
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.
Diffstat (limited to 'src/cpuinfo/SDL_cpuinfo.c')
-rw-r--r--src/cpuinfo/SDL_cpuinfo.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 2b81f91174..f9b764026f 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -68,7 +68,7 @@ illegal_instruction(int sig)
}
#endif /* HAVE_SETJMP */
-static __inline__ int
+static SDL_INLINE int
CPU_haveCPUID(void)
{
int has_CPUID = 0;
@@ -192,7 +192,7 @@ done:
a = b = c = d = 0
#endif
-static __inline__ int
+static SDL_INLINE int
CPU_getCPUIDFeatures(void)
{
int features = 0;
@@ -206,7 +206,7 @@ CPU_getCPUIDFeatures(void)
return features;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveRDTSC(void)
{
if (CPU_haveCPUID()) {
@@ -215,7 +215,7 @@ CPU_haveRDTSC(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveAltiVec(void)
{
volatile int altivec = 0;
@@ -242,7 +242,7 @@ CPU_haveAltiVec(void)
return altivec;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveMMX(void)
{
if (CPU_haveCPUID()) {
@@ -251,7 +251,7 @@ CPU_haveMMX(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_have3DNow(void)
{
if (CPU_haveCPUID()) {
@@ -266,7 +266,7 @@ CPU_have3DNow(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveSSE(void)
{
if (CPU_haveCPUID()) {
@@ -275,7 +275,7 @@ CPU_haveSSE(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveSSE2(void)
{
if (CPU_haveCPUID()) {
@@ -284,7 +284,7 @@ CPU_haveSSE2(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveSSE3(void)
{
if (CPU_haveCPUID()) {
@@ -299,7 +299,7 @@ CPU_haveSSE3(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveSSE41(void)
{
if (CPU_haveCPUID()) {
@@ -314,7 +314,7 @@ CPU_haveSSE41(void)
return 0;
}
-static __inline__ int
+static SDL_INLINE int
CPU_haveSSE42(void)
{
if (CPU_haveCPUID()) {