comparison src/cpuinfo/SDL_cpuinfo.c @ 1487:dc6b59e925a2

Cleaning up warnings on MacOS X
author Sam Lantinga <slouken@libsdl.org>
date Thu, 09 Mar 2006 06:33:21 +0000
parents e3242177fe4a
children 96d8c3fec479
comparison
equal deleted inserted replaced
1486:9d77fc9d0ace 1487:dc6b59e925a2
24 /* CPU feature detection for SDL */ 24 /* CPU feature detection for SDL */
25 25
26 #include "SDL.h" 26 #include "SDL.h"
27 #include "SDL_cpuinfo.h" 27 #include "SDL_cpuinfo.h"
28 28
29 #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP 29 #ifdef __MACOSX__
30 #include <sys/sysctl.h> /* For AltiVec check */
31 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
30 #include <signal.h> 32 #include <signal.h>
31 #include <setjmp.h> 33 #include <setjmp.h>
32 #endif
33
34 #ifdef __MACOSX__
35 #include <sys/sysctl.h> /* For AltiVec check */
36 #endif 34 #endif
37 35
38 #define CPU_HAS_RDTSC 0x00000001 36 #define CPU_HAS_RDTSC 0x00000001
39 #define CPU_HAS_MMX 0x00000002 37 #define CPU_HAS_MMX 0x00000002
40 #define CPU_HAS_MMXEXT 0x00000004 38 #define CPU_HAS_MMXEXT 0x00000004
42 #define CPU_HAS_3DNOWEXT 0x00000020 40 #define CPU_HAS_3DNOWEXT 0x00000020
43 #define CPU_HAS_SSE 0x00000040 41 #define CPU_HAS_SSE 0x00000040
44 #define CPU_HAS_SSE2 0x00000080 42 #define CPU_HAS_SSE2 0x00000080
45 #define CPU_HAS_ALTIVEC 0x00000100 43 #define CPU_HAS_ALTIVEC 0x00000100
46 44
47 #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP 45 #if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOSX__
48 /* This is the brute force way of detecting instruction sets... 46 /* This is the brute force way of detecting instruction sets...
49 the idea is borrowed from the libmpeg2 library - thanks! 47 the idea is borrowed from the libmpeg2 library - thanks!
50 */ 48 */
51 static jmp_buf jmpbuf; 49 static jmp_buf jmpbuf;
52 static void illegal_instruction(int sig) 50 static void illegal_instruction(int sig)