summaryrefslogtreecommitdiffstats
path: root/cpudetect.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-01-31 04:52:15 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-01-31 04:52:15 +0200
commitccf4d9e96cd7aa8506e6632d2a7352ec89b2b9e3 (patch)
treea5f3a6d636e96f05bb52f0b2407107a7f0c8b443 /cpudetect.c
parent03aa64687fc109c5f2346a3c191b70698b333509 (diff)
parent0e77da241da8b911c96a0e22898e84d7f7b74678 (diff)
downloadmpv-ccf4d9e96cd7aa8506e6632d2a7352ec89b2b9e3.tar.bz2
mpv-ccf4d9e96cd7aa8506e6632d2a7352ec89b2b9e3.tar.xz
Merge svn changes up to r28403
Diffstat (limited to 'cpudetect.c')
-rw-r--r--cpudetect.c61
1 files changed, 20 insertions, 41 deletions
diff --git a/cpudetect.c b/cpudetect.c
index fee0c8fc1f..5992ccb5bb 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -18,27 +18,17 @@ CpuCaps gCpuCaps;
#include <sys/param.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
-#endif
-
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
#include <sys/types.h>
#include <sys/sysctl.h>
-#endif
-
-#ifdef __linux__
+#elif defined(__linux__)
#include <signal.h>
-#endif
-
-#if defined(__MINGW32__) || defined(__CYGWIN__)
+#elif defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h>
-#endif
-
-#ifdef __OS2__
+#elif defined(__OS2__)
#define INCL_DOS
#include <os2.h>
-#endif
-
-#ifdef __AMIGAOS4__
+#elif defined(__AMIGAOS4__)
#include <proto/exec.h>
#endif
@@ -228,11 +218,11 @@ void GetCpuCaps( CpuCaps *caps)
if(caps->hasSSE2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE2 supported but disabled\n");
caps->hasSSE2=0;
#endif
-#if !HAVE_3DNOW
+#if !HAVE_AMD3DNOW
if(caps->has3DNow) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNow supported but disabled\n");
caps->has3DNow=0;
#endif
-#if !HAVE_3DNOWEXT
+#if !HAVE_AMD3DNOWEXT
if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n");
caps->has3DNowExt=0;
#endif
@@ -475,7 +465,7 @@ static void check_os_katmai_support( void )
#ifdef __APPLE__
#include <sys/sysctl.h>
-#elif __AMIGAOS4__
+#elif defined(__AMIGAOS4__)
/* nothing */
#else
#include <signal.h>
@@ -529,7 +519,7 @@ void GetCpuCaps( CpuCaps *caps)
if (has_vu != 0)
caps->hasAltiVec = 1;
}
-#elif __AMIGAOS4__
+#elif defined(__AMIGAOS4__)
ULONG result = 0;
GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
@@ -558,48 +548,37 @@ void GetCpuCaps( CpuCaps *caps)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"AltiVec %sfound\n", (caps->hasAltiVec ? "" : "not "));
#endif /* HAVE_ALTIVEC */
-#if ARCH_IA64
+if (ARCH_IA64)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Intel Itanium\n");
-#endif
-#if ARCH_SPARC
+if (ARCH_SPARC)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Sun Sparc\n");
-#endif
-#if ARCH_ARM
+if (ARCH_ARM)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: ARM\n");
-#endif
-#if ARCH_PPC
+if (ARCH_PPC)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: PowerPC\n");
-#endif
-#if ARCH_ALPHA
+if (ARCH_ALPHA)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Digital Alpha\n");
-#endif
-#if ARCH_SGI_MIPS
+if (ARCH_SGI_MIPS)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: SGI MIPS\n");
-#endif
-#if ARCH_PA_RISC
+if (ARCH_PA_RISC)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Hewlett-Packard PA-RISC\n");
-#endif
-#if ARCH_S390
+if (ARCH_S390)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: IBM S/390\n");
-#endif
-#if ARCH_S390X
+if (ARCH_S390X)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: IBM S/390X\n");
-#endif
-#if ARCH_VAX
+if (ARCH_VAX)
mp_msg(MSGT_CPUDETECT,MSGL_INFO, "CPU: Digital VAX\n" );
-#endif
-#if ARCH_XTENSA
+if (ARCH_XTENSA)
mp_msg(MSGT_CPUDETECT,MSGL_INFO, "CPU: Tensilica Xtensa\n" );
-#endif
}
#endif /* !ARCH_X86 */