Don't use config.h to define RESTRICT

This commit is contained in:
Chris Robinson
2020-09-01 06:01:14 -07:00
parent a6aefeccd8
commit eeba1a385c
2 changed files with 3 additions and 5 deletions
+3 -2
View File
@@ -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
-3
View File
@@ -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