diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c index 1810a3d459..765a7ad17d 100644 --- a/src/cpuinfo/SDL_cpuinfo.c +++ b/src/cpuinfo/SDL_cpuinfo.c @@ -42,7 +42,7 @@ #elif defined(__FreeBSD__) && defined(__powerpc__) #include #include -#elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP +#elif defined(SDL_ALTIVEC_BLITTERS) && HAVE_SETJMP #include #include #endif @@ -106,7 +106,7 @@ #define CPU_CFG2_LSX (1 << 6) #define CPU_CFG2_LASX (1 << 7) -#if SDL_ALTIVEC_BLITTERS && HAVE_SETJMP && !__MACOS__ && !__OpenBSD__ && !__FreeBSD__ +#if defined(SDL_ALTIVEC_BLITTERS) && HAVE_SETJMP && !__MACOS__ && !__OpenBSD__ && !__FreeBSD__ /* This is the brute force way of detecting instruction sets... the idea is borrowed from the libmpeg2 library - thanks! */ @@ -335,7 +335,7 @@ static int CPU_haveAltiVec(void) elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures)); altivec = cpufeatures & PPC_FEATURE_HAS_ALTIVEC; return altivec; -#elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP +#elif defined(SDL_ALTIVEC_BLITTERS) && HAVE_SETJMP void (*handler)(int sig); handler = signal(SIGILL, illegal_instruction); if (setjmp(jmpbuf) == 0) { diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c index 023151f7ae..d3e77b2209 100644 --- a/src/video/SDL_blit_N.c +++ b/src/video/SDL_blit_N.c @@ -45,7 +45,7 @@ enum blit_features BLIT_FEATURE_HAS_ARM_SIMD = 8 }; -#if SDL_ALTIVEC_BLITTERS +#ifdef SDL_ALTIVEC_BLITTERS #ifdef __MACOS__ #include static size_t @@ -3214,7 +3214,7 @@ static const struct blit_table normal_blit_1[] = { }; static const struct blit_table normal_blit_2[] = { -#if SDL_ALTIVEC_BLITTERS +#ifdef SDL_ALTIVEC_BLITTERS /* has-altivec */ { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, @@ -3281,7 +3281,7 @@ static const struct blit_table normal_blit_3[] = { }; static const struct blit_table normal_blit_4[] = { -#if SDL_ALTIVEC_BLITTERS +#ifdef SDL_ALTIVEC_BLITTERS /* has-altivec | dont-use-prefetch */ { 0x00000000, 0x00000000, 0x00000000, 4, 0x00000000, 0x00000000, 0x00000000, BLIT_FEATURE_HAS_ALTIVEC | BLIT_FEATURE_ALTIVEC_DONT_USE_PREFETCH, ConvertAltivec32to32_noprefetch, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, @@ -3431,7 +3431,7 @@ SDL_CalculateBlitN(SDL_Surface *surface) } else if (dstfmt->BytesPerPixel == 1) { return BlitNto1Key; } else { -#if SDL_ALTIVEC_BLITTERS +#ifdef SDL_ALTIVEC_BLITTERS if ((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4) && SDL_HasAltiVec()) { return Blit32to32KeyAltivec; } else