]> git.sesse.net Git - vlc/commitdiff
Win32: assume the OS support what the processor supports
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 12 Jan 2010 22:18:27 +0000 (00:18 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 12 Jan 2010 22:18:27 +0000 (00:18 +0200)
We cannot use SIGILL, so we have to trust CPUID.
Maybe there is a Win32 API to query the kernel support?

src/misc/cpu.c

index a11a62876dca94f2f306b715574f8921e919a284..b09debb2fdbe4f1764d5379e5ee485ad03668a56 100644 (file)
@@ -70,7 +70,7 @@ static bool check_OS_capability( const char *psz_capability, pid_t pid )
     return false;
 }
 
-#  define check_capability(name, flag, code)  \
+#  define check_capability(name, flag, code)   \
      do {                                      \
         pid_t pid = fork();                    \
         if( pid == 0 )                         \
@@ -84,7 +84,10 @@ static bool check_OS_capability( const char *psz_capability, pid_t pid )
      } while(0)
 
 # else /* WIN32 */
-# define check_capability(name, flag, code) (void)0
+#  define check_capability(name, flag, code)   \
+     do {                                      \
+        i_capabilities |= (flag);              \
+     } while(0)
 # endif
 #endif