diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | config.h.in | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04946b9d..7d09547c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,11 +169,12 @@ if(NOT WIN32) endif() # C99 has restrict, but C++ does not, so we can only utilize __restrict. -set(RESTRICT_DECL ) check_cxx_source_compiles("int *__restrict foo; int main() { return 0; }" HAVE___RESTRICT) if(HAVE___RESTRICT) - set(RESTRICT_DECL "__restrict") + set(CPP_DEFS ${CPP_DEFS} RESTRICT=__restrict) +else() + set(CPP_DEFS ${CPP_DEFS} "RESTRICT=") endif() # Some systems may need libatomic for atomic functions to work diff --git a/config.h.in b/config.h.in index bd87f4fe..f7e1542e 100644 --- a/config.h.in +++ b/config.h.in @@ -2,9 +2,6 @@ #define AL_API ${EXPORT_DECL} #define ALC_API ${EXPORT_DECL} -/* Define a restrict macro for non-aliased pointers */ -#define RESTRICT ${RESTRICT_DECL} - /* Define if HRTF data is embedded in the library */ #cmakedefine ALSOFT_EMBED_HRTF_DATA |