Skip to content

Commit

Permalink
Fixed bug 4103 - SDL_cpuinfo.h provokes warnings with -Wundef on non-…
Browse files Browse the repository at this point in the history
…x86 hosts

Felix Geyer

Forwarding from https://bugs.debian.org/892087 quoting verbatim:

The SDL2 header SDL_cpuinfo.h generates gcc warnings if the program using
it compiles with the -Wundef warning. (In particular, this means that QEMU
builds using it fail on at least sparc hosts, since QEMU dev builds
use both -Wundef and -Werror.).

/usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is not defined, evaluates to 0 [-Wundef]
 #if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
  • Loading branch information
slouken committed Mar 11, 2018
1 parent 0a5c106 commit 6d39e67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/SDL_cpuinfo.h
Expand Up @@ -51,7 +51,7 @@
#include <intrin.h>
#else
#ifdef __ALTIVEC__
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
#include <altivec.h>
#undef pixel
#undef bool
Expand All @@ -60,7 +60,7 @@
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h>
#endif
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
#include <immintrin.h>
#else
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
Expand Down

0 comments on commit 6d39e67

Please sign in to comment.