From a9fac129696731bb307a72e8ae6c95e474587221 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 18 Jun 2013 14:33:39 -0700 Subject: [PATCH] Work around some problems with KDevelop's parser --- Alc/mixer_sse.c | 7 +++++++ config.h.in | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/Alc/mixer_sse.c b/Alc/mixer_sse.c index 95893277..f929469c 100644 --- a/Alc/mixer_sse.c +++ b/Alc/mixer_sse.c @@ -1,6 +1,13 @@ #include "config.h" #ifdef HAVE_XMMINTRIN_H +#ifdef IN_IDE_PARSER +/* KDevelop's parser won't recognize these defines that get added by the -msse + * switch used to compile this source. Without them, xmmintrin.h fails to + * declare anything. */ +#define __MMX__ +#define __SSE__ +#endif #include #endif diff --git a/config.h.in b/config.h.in index 1e068ad0..9fee8bd5 100644 --- a/config.h.in +++ b/config.h.in @@ -5,6 +5,12 @@ /* Define to the library version */ #define ALSOFT_VERSION "${LIB_VERSION}" +#ifdef IN_IDE_PARSER +/* KDevelop's parser doesn't recognize the C99-standard restrict keyword, but + * recent versions (at least 4.5.1) do recognize GCC's __restrict. */ +#define restrict __restrict +#endif + /* Define any available alignment declaration */ #define ALIGN(x) ${ALIGN_DECL} #ifdef __MINGW32__