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 a11a628..b09debb 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