]> git.sesse.net Git - vlc/blobdiff - src/misc/cpu.c
win32: move single instance back-end to separate interface
[vlc] / src / misc / cpu.c
index f9927ac3d5de254e4e12f860f51147bc7dc14e8d..eca79b5911178ec05fd82c46f7c368b4c7d83ff7 100644 (file)
@@ -38,7 +38,7 @@
 
 #ifndef __linux__
 #include <sys/types.h>
-#ifndef WIN32
+#ifndef _WIN32
 #include <unistd.h>
 #include <sys/wait.h>
 #include <signal.h>
@@ -63,7 +63,7 @@ static uint32_t cpu_flags;
 
 #if defined (__i386__) || defined (__x86_64__) || defined (__powerpc__) \
  || defined (__ppc__) || defined (__ppc64__) || defined (__powerpc64__)
-# if !defined (WIN32) && !defined (__OS2__)
+# if !defined (_WIN32) && !defined (__OS2__)
 static bool vlc_CPU_check (const char *name, void (*func) (void))
 {
     pid_t pid = fork();
@@ -99,7 +99,7 @@ VLC_SSE static void SSE_test (void)
     asm volatile ("xorps %%xmm0,%%xmm0\n" : : : "xmm0", "xmm1");
 }
 #endif
-#if defined (CAN_COMPILE_3DNOW) && !defined (__3dNOW__)
+#if defined (CAN_COMPILE_3DNOW)
 VLC_MMX static void ThreeD_Now_test (void)
 {
     asm volatile ("pfadd %%mm0,%%mm0\n" "femms\n" : : : "mm0");
@@ -113,7 +113,7 @@ static void Altivec_test (void)
 }
 #endif
 
-#else /* WIN32 || __OS2__ */
+#else /* _WIN32 || __OS2__ */
 # define vlc_CPU_check(name, func) (1)
 #endif
 #endif
@@ -222,10 +222,10 @@ void vlc_CPU_init (void)
     /* list these additional capabilities */
     cpuid( 0x80000001 );
 
-# if defined (CAN_COMPILE_3DNOW)
+# if defined (CAN_COMPILE_3DNOW) && !defined (__3dNOW__)
     if ((i_edx & 0x80000000) && vlc_CPU_check ("3D Now!", ThreeD_Now_test))
-        i_capabilities |= CPU_CAPABILITY_3DNOW;
 # endif
+        i_capabilities |= VLC_CPU_3dNOW;
 
     if( b_amd && ( i_edx & 0x00400000 ) )
         i_capabilities |= VLC_CPU_MMXEXT;
@@ -271,7 +271,7 @@ unsigned vlc_CPU (void)
 {
 /* On Windows and OS/2,
  * initialized from DllMain() and _DLL_InitTerm() respectively, instead */
-#if !defined(WIN32) && !defined(__OS2__)
+#if !defined(_WIN32) && !defined(__OS2__)
     static pthread_once_t once = PTHREAD_ONCE_INIT;
     pthread_once (&once, vlc_CPU_init);
 #endif