aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-17 19:52:54 -0800
committerChris Robinson <[email protected]>2018-11-17 19:52:54 -0800
commitd10301c209a1194741d442a44cc4c0d819803144 (patch)
tree455d2093fd6ad5bc261ed208c7b70d44192717ed
parent1ac41d3ea03aed456a94187bf8e0381eeb4168e6 (diff)
Remove unused headers and checks
-rw-r--r--Alc/alconfig.cpp1
-rw-r--r--Alc/alu.cpp1
-rw-r--r--Alc/bformatdec.cpp1
-rw-r--r--Alc/mastering.cpp1
-rw-r--r--Alc/mixer/hrtf_inc.cpp1
-rw-r--r--Alc/panning.cpp1
-rw-r--r--Alc/ringbuffer.cpp1
-rw-r--r--CMakeLists.txt100
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h1
-rw-r--r--OpenAL32/Include/alMain.h2
-rw-r--r--OpenAL32/Include/alSource.h1
-rw-r--r--OpenAL32/Include/alu.h1
-rw-r--r--common/align.h18
-rw-r--r--common/atomic.h3
-rw-r--r--common/bool.h18
-rw-r--r--common/static_assert.h21
-rw-r--r--config.h.in18
17 files changed, 24 insertions, 166 deletions
diff --git a/Alc/alconfig.cpp b/Alc/alconfig.cpp
index 5198f830..73ea0458 100644
--- a/Alc/alconfig.cpp
+++ b/Alc/alconfig.cpp
@@ -46,7 +46,6 @@
#include "alMain.h"
#include "alconfig.h"
#include "compat.h"
-#include "bool.h"
namespace {
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index df857b80..3075f1ec 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -37,7 +37,6 @@
#include "mastering.h"
#include "uhjfilter.h"
#include "bformatdec.h"
-#include "static_assert.h"
#include "ringbuffer.h"
#include "filters/splitter.h"
diff --git a/Alc/bformatdec.cpp b/Alc/bformatdec.cpp
index 7d1e36ff..afa25461 100644
--- a/Alc/bformatdec.cpp
+++ b/Alc/bformatdec.cpp
@@ -9,7 +9,6 @@
#include "filters/splitter.h"
#include "alu.h"
-#include "bool.h"
#include "threads.h"
#include "almalloc.h"
diff --git a/Alc/mastering.cpp b/Alc/mastering.cpp
index 001aada1..131a0330 100644
--- a/Alc/mastering.cpp
+++ b/Alc/mastering.cpp
@@ -5,7 +5,6 @@
#include "mastering.h"
#include "alu.h"
#include "almalloc.h"
-#include "static_assert.h"
#include "math_defs.h"
diff --git a/Alc/mixer/hrtf_inc.cpp b/Alc/mixer/hrtf_inc.cpp
index 1f70242d..22715abc 100644
--- a/Alc/mixer/hrtf_inc.cpp
+++ b/Alc/mixer/hrtf_inc.cpp
@@ -4,7 +4,6 @@
#include "alSource.h"
#include "hrtf.h"
-#include "align.h"
#include "alu.h"
#include "defs.h"
diff --git a/Alc/panning.cpp b/Alc/panning.cpp
index 9bde25a0..a60b4d4d 100644
--- a/Alc/panning.cpp
+++ b/Alc/panning.cpp
@@ -30,7 +30,6 @@
#include "alAuxEffectSlot.h"
#include "alu.h"
#include "alconfig.h"
-#include "bool.h"
#include "ambdec.h"
#include "bformatdec.h"
#include "filters/splitter.h"
diff --git a/Alc/ringbuffer.cpp b/Alc/ringbuffer.cpp
index 72267bd0..9d20db6c 100644
--- a/Alc/ringbuffer.cpp
+++ b/Alc/ringbuffer.cpp
@@ -25,7 +25,6 @@
#include <limits.h>
#include "ringbuffer.h"
-#include "align.h"
#include "atomic.h"
#include "threads.h"
#include "almalloc.h"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e4c6d4b..2a9fdee6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -235,45 +235,6 @@ IF(HAVE_LIBLOG)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} log)
ENDIF()
-# Check if we have C99 bool
-CHECK_C_SOURCE_COMPILES(
-"int main(int argc, char *argv[])
- {
- volatile _Bool ret;
- ret = (argc > 1) ? 1 : 0;
- return ret ? -1 : 0;
- }"
-HAVE_C99_BOOL)
-
-# Check if we have C11 static_assert
-CHECK_C_SOURCE_COMPILES(
-"int main()
- {
- _Static_assert(sizeof(int) == sizeof(int), \"What\");
- return 0;
- }"
-HAVE_C11_STATIC_ASSERT)
-
-# Check if we have C11 alignas
-CHECK_C_SOURCE_COMPILES(
-"_Alignas(16) int foo;
- int main()
- {
- return 0;
- }"
-HAVE_C11_ALIGNAS)
-
-# Check if we have C11 _Atomic
-CHECK_C_SOURCE_COMPILES(
-"#include <stdatomic.h>
- int _Atomic foo = ATOMIC_VAR_INIT(0);
- int main()
- {
- atomic_fetch_add(&foo, 2);
- return 0;
- }"
-HAVE_C11_ATOMIC)
-
# Add definitions, compiler switches, etc.
INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/include" "${OpenAL_SOURCE_DIR}/common" "${OpenAL_BINARY_DIR}")
@@ -517,8 +478,6 @@ ENDIF()
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
int main() {return 0;}" HAVE_GCC_FORMAT)
-CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
-CHECK_INCLUDE_FILE(stdalign.h HAVE_STDALIGN_H)
CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILE(strings.h HAVE_STRINGS_H)
@@ -744,13 +703,10 @@ ENDIF()
SET(COMMON_OBJS
common/alcomplex.cpp
common/alcomplex.h
- common/align.h
common/almalloc.cpp
common/almalloc.h
common/atomic.h
- common/bool.h
common/math_defs.h
- common/static_assert.h
common/threads.cpp
common/threads.h
common/uintmap.h
@@ -861,15 +817,13 @@ CHECK_INCLUDE_FILE(xmmintrin.h HAVE_XMMINTRIN_H "${SSE_SWITCH}")
IF(HAVE_XMMINTRIN_H)
OPTION(ALSOFT_CPUEXT_SSE "Enable SSE support" ON)
IF(ALSOFT_CPUEXT_SSE)
- IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
- SET(HAVE_SSE 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse.cpp)
- IF(SSE_SWITCH)
- SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse.cpp PROPERTIES
- COMPILE_FLAGS "${SSE_SWITCH}")
- ENDIF()
- SET(CPU_EXTS "${CPU_EXTS}, SSE")
+ SET(HAVE_SSE 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse.cpp)
+ IF(SSE_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse.cpp PROPERTIES
+ COMPILE_FLAGS "${SSE_SWITCH}")
ENDIF()
+ SET(CPU_EXTS "${CPU_EXTS}, SSE")
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_SSE AND NOT HAVE_SSE)
@@ -881,15 +835,13 @@ CHECK_INCLUDE_FILE(emmintrin.h HAVE_EMMINTRIN_H "${SSE2_SWITCH}")
IF(HAVE_EMMINTRIN_H)
OPTION(ALSOFT_CPUEXT_SSE2 "Enable SSE2 support" ON)
IF(HAVE_SSE AND ALSOFT_CPUEXT_SSE2)
- IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
- SET(HAVE_SSE2 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse2.cpp)
- IF(SSE2_SWITCH)
- SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse2.cpp PROPERTIES
- COMPILE_FLAGS "${SSE2_SWITCH}")
- ENDIF()
- SET(CPU_EXTS "${CPU_EXTS}, SSE2")
+ SET(HAVE_SSE2 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse2.cpp)
+ IF(SSE2_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse2.cpp PROPERTIES
+ COMPILE_FLAGS "${SSE2_SWITCH}")
ENDIF()
+ SET(CPU_EXTS "${CPU_EXTS}, SSE2")
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_SSE2 AND NOT HAVE_SSE2)
@@ -901,15 +853,13 @@ CHECK_INCLUDE_FILE(pmmintrin.h HAVE_PMMINTRIN_H "${SSE3_SWITCH}")
IF(HAVE_EMMINTRIN_H)
OPTION(ALSOFT_CPUEXT_SSE3 "Enable SSE3 support" ON)
IF(HAVE_SSE2 AND ALSOFT_CPUEXT_SSE3)
- IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
- SET(HAVE_SSE3 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse3.cpp)
- IF(SSE2_SWITCH)
- SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse3.cpp PROPERTIES
- COMPILE_FLAGS "${SSE3_SWITCH}")
- ENDIF()
- SET(CPU_EXTS "${CPU_EXTS}, SSE3")
+ SET(HAVE_SSE3 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse3.cpp)
+ IF(SSE2_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse3.cpp PROPERTIES
+ COMPILE_FLAGS "${SSE3_SWITCH}")
ENDIF()
+ SET(CPU_EXTS "${CPU_EXTS}, SSE3")
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_SSE3 AND NOT HAVE_SSE3)
@@ -921,15 +871,13 @@ CHECK_INCLUDE_FILE(smmintrin.h HAVE_SMMINTRIN_H "${SSE4_1_SWITCH}")
IF(HAVE_SMMINTRIN_H)
OPTION(ALSOFT_CPUEXT_SSE4_1 "Enable SSE4.1 support" ON)
IF(HAVE_SSE2 AND ALSOFT_CPUEXT_SSE4_1)
- IF(ALIGN_DECL OR HAVE_C11_ALIGNAS)
- SET(HAVE_SSE4_1 1)
- SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse41.cpp)
- IF(SSE4_1_SWITCH)
- SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse41.cpp PROPERTIES
- COMPILE_FLAGS "${SSE4_1_SWITCH}")
- ENDIF()
- SET(CPU_EXTS "${CPU_EXTS}, SSE4.1")
+ SET(HAVE_SSE4_1 1)
+ SET(ALC_OBJS ${ALC_OBJS} Alc/mixer/mixer_sse41.cpp)
+ IF(SSE4_1_SWITCH)
+ SET_SOURCE_FILES_PROPERTIES(Alc/mixer/mixer_sse41.cpp PROPERTIES
+ COMPILE_FLAGS "${SSE4_1_SWITCH}")
ENDIF()
+ SET(CPU_EXTS "${CPU_EXTS}, SSE4.1")
ENDIF()
ENDIF()
IF(ALSOFT_REQUIRE_SSE4_1 AND NOT HAVE_SSE4_1)
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index 16de9a79..99060b74 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -5,7 +5,6 @@
#include "alEffect.h"
#include "atomic.h"
-#include "align.h"
#ifdef __cplusplus
extern "C" {
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index a79b6962..75cd0576 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -23,8 +23,6 @@
#include "inprogext.h"
#include "logging.h"
#include "polymorphism.h"
-#include "static_assert.h"
-#include "align.h"
#include "atomic.h"
#include "vector.h"
#include "almalloc.h"
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index f7749de3..53313fdd 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -1,7 +1,6 @@
#ifndef _AL_SOURCE_H_
#define _AL_SOURCE_H_
-#include "bool.h"
#include "alMain.h"
#include "alu.h"
#include "hrtf.h"
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 2dbd3107..78ec502d 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -14,7 +14,6 @@
#include "alBuffer.h"
#include "hrtf.h"
-#include "align.h"
#include "math_defs.h"
#include "filters/defs.h"
#include "filters/nfc.h"
diff --git a/common/align.h b/common/align.h
deleted file mode 100644
index 53a5806a..00000000
--- a/common/align.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef AL_ALIGN_H
-#define AL_ALIGN_H
-
-#if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS)
-#include <stdalign.h>
-#endif
-
-#if !defined(alignas) && !defined(__cplusplus)
-#if defined(HAVE_C11_ALIGNAS)
-#define alignas _Alignas
-#else
-/* NOTE: Our custom ALIGN macro can't take a type name like alignas can. For
- * maximum compatibility, only provide constant integer values to alignas. */
-#define alignas(_x) ALIGN(_x)
-#endif
-#endif
-
-#endif /* AL_ALIGN_H */
diff --git a/common/atomic.h b/common/atomic.h
index 4976149a..5838f8da 100644
--- a/common/atomic.h
+++ b/common/atomic.h
@@ -3,9 +3,6 @@
#include <atomic>
-#include "static_assert.h"
-#include "bool.h"
-
#ifdef __GNUC__
/* This helps cast away the const-ness of a pointer without accidentally
* changing the pointer type. This is necessary due to Clang's inability to use
diff --git a/common/bool.h b/common/bool.h
deleted file mode 100644
index eb1d9174..00000000
--- a/common/bool.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef AL_BOOL_H
-#define AL_BOOL_H
-
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-
-#if !defined(bool) && !defined(__cplusplus)
-#ifdef HAVE_C99_BOOL
-#define bool _Bool
-#else
-#define bool int
-#endif
-#define false 0
-#define true 1
-#endif
-
-#endif /* AL_BOOL_H */
diff --git a/common/static_assert.h b/common/static_assert.h
deleted file mode 100644
index 3a554fb5..00000000
--- a/common/static_assert.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef AL_STATIC_ASSERT_H
-#define AL_STATIC_ASSERT_H
-
-#include <assert.h>
-
-
-#if !defined(static_assert) && !defined(__cplusplus)
-#ifdef HAVE_C11_STATIC_ASSERT
-#define static_assert _Static_assert
-#else
-#define CTASTR2(_pre,_post) _pre##_post
-#define CTASTR(_pre,_post) CTASTR2(_pre,_post)
-#if defined(__COUNTER__)
-#define static_assert(_cond, _msg) typedef struct { int CTASTR(static_assert_failed_at_line_,__LINE__) : !!(_cond); } CTASTR(static_assertion_,__COUNTER__)
-#else
-#define static_assert(_cond, _msg) struct { int CTASTR(static_assert_failed_at_line_,__LINE__) : !!(_cond); }
-#endif
-#endif
-#endif
-
-#endif /* AL_STATIC_ASSERT_H */
diff --git a/config.h.in b/config.h.in
index 9714810c..6c83b7f5 100644
--- a/config.h.in
+++ b/config.h.in
@@ -95,18 +95,6 @@
/* Define to the size of a long long int type */
#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG}
-/* Define if we have C99 _Bool support */
-#cmakedefine HAVE_C99_BOOL
-
-/* Define if we have C11 _Static_assert support */
-#cmakedefine HAVE_C11_STATIC_ASSERT
-
-/* Define if we have C11 _Alignas support */
-#cmakedefine HAVE_C11_ALIGNAS
-
-/* Define if we have C11 _Atomic support */
-#cmakedefine HAVE_C11_ATOMIC
-
/* Define if we have GCC's destructor attribute */
#cmakedefine HAVE_GCC_DESTRUCTOR
@@ -116,12 +104,6 @@
/* Define if we have stdint.h */
#cmakedefine HAVE_STDINT_H
-/* Define if we have stdbool.h */
-#cmakedefine HAVE_STDBOOL_H
-
-/* Define if we have stdalign.h */
-#cmakedefine HAVE_STDALIGN_H
-
/* Define if we have windows.h */
#cmakedefine HAVE_WINDOWS_H