diff cpudetect.c @ 27727:48c1ae64255b

Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__. This avoids a pointless indirection that only obscures what is really done.
author diego
date Mon, 13 Oct 2008 16:23:55 +0000
parents 5b7f52928bcd
children 08d18fe9da52
line wrap: on
line diff
--- a/cpudetect.c	Mon Oct 13 16:06:15 2008 +0000
+++ b/cpudetect.c	Mon Oct 13 16:23:55 2008 +0000
@@ -29,7 +29,7 @@
 #include <signal.h>
 #endif
 
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
 #include <windows.h>
 #endif
 
@@ -314,7 +314,7 @@
 }
 #endif /* __linux__ && _POSIX_SOURCE */
 
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
 LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep)
 {
    if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){
@@ -325,7 +325,7 @@
    }
    return EXCEPTION_CONTINUE_SEARCH;
 }
-#endif /* WIN32 */
+#endif /* defined(__MINGW32__) || defined(__CYGWIN__) */
 
 #ifdef __OS2__
 ULONG _System os2_sig_handler_sse( PEXCEPTIONREPORTRECORD       p1,
@@ -395,7 +395,7 @@
    gCpuCaps.hasSSE = 0;
    mp_msg(MSGT_CPUDETECT,MSGL_WARN, "No OS support for SSE, disabling to be safe.\n" );
 #endif
-#elif defined(WIN32)
+#elif defined(__MINGW32__) || defined(__CYGWIN__)
    LPTOP_LEVEL_EXCEPTION_FILTER exc_fil;
    if ( gCpuCaps.hasSSE ) {
       mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );