You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mplayer/mplayer-cpudetect.patch

45 lines
1.5 KiB

Index: cpudetect.c
===================================================================
--- cpudetect.c (wersja 36298)
+++ cpudetect.c (wersja 36300)
@@ -56,7 +56,7 @@
#if CONFIG_RUNTIME_CPUDETECT
/* I believe this code works. However, it has only been used on a PII and PIII */
-#if defined(__linux__) && defined(_POSIX_SOURCE) && !ARCH_X86_64
+#if defined(__linux__) && !ARCH_X86_64
static void sigill_handler_sse( int signal, struct sigcontext sc )
{
mp_msg(MSGT_CPUDETECT,MSGL_V, "SIGILL, " );
@@ -75,7 +75,7 @@
gCpuCaps.hasSSE=0;
}
-#endif /* __linux__ && _POSIX_SOURCE */
+#endif /* __linux__ */
#if (defined(__MINGW32__) || defined(__CYGWIN__)) && !ARCH_X86_64
LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep)
@@ -177,7 +177,6 @@
mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
}
#elif defined(__linux__)
-#if defined(_POSIX_SOURCE)
struct sigaction saved_sigill;
/* Save the original signal handlers.
@@ -210,13 +209,6 @@
*/
mp_msg(MSGT_CPUDETECT,MSGL_V, "Tests of OS support for SSE %s\n", gCpuCaps.hasSSE ? "passed." : "failed!" );
#else
- /* We can't use POSIX signal handling to test the availability of
- * SSE, so we disable it by default.
- */
- mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, disabling to be safe.\n" );
- gCpuCaps.hasSSE=0;
-#endif /* _POSIX_SOURCE */
-#else
/* Do nothing on other platforms for now.
*/
mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, leaving disabled.\n" );