aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/backends/oss.cpp10
-rw-r--r--CMakeLists.txt38
-rw-r--r--OpenAL32/Include/alMain.h2
-rw-r--r--common/math_defs.h22
-rw-r--r--config.h.in12
5 files changed, 1 insertions, 83 deletions
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index 4f320b69..9baa7346 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -114,16 +114,6 @@ void ALCossListPopulate(std::vector<DevMap> *devlist, int type)
#else
-#ifndef HAVE_STRNLEN
-size_t my_strnlen(const char *str, size_t maxlen)
-{
- const char *end = static_cast<const char*>(memchr(str, 0, maxlen));
- if(!end) return maxlen;
- return end - str;
-}
-#define strnlen my_strnlen
-#endif
-
void ALCossListAppend(std::vector<DevMap> *list, const char *handle, size_t hlen, const char *path, size_t plen)
{
#ifdef ALC_OSS_DEVNODE_TRUC
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38858fa3..aa85e34b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -603,9 +603,6 @@ CHECK_SYMBOL_EXISTS(aligned_alloc stdlib.h HAVE_ALIGNED_ALLOC)
CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN)
CHECK_SYMBOL_EXISTS(_aligned_malloc malloc.h HAVE__ALIGNED_MALLOC)
CHECK_SYMBOL_EXISTS(proc_pidpath libproc.h HAVE_PROC_PIDPATH)
-CHECK_SYMBOL_EXISTS(lrintf math.h HAVE_LRINTF)
-CHECK_SYMBOL_EXISTS(cbrtf math.h HAVE_CBRTF)
-CHECK_SYMBOL_EXISTS(copysignf math.h HAVE_COPYSIGNF)
IF(HAVE_FLOAT_H)
CHECK_SYMBOL_EXISTS(_controlfp float.h HAVE__CONTROLFP)
@@ -633,41 +630,6 @@ IF(NOT HAVE_STRNCASECMP)
SET(CPP_DEFS ${CPP_DEFS} strncasecmp=_strnicmp)
ENDIF()
-CHECK_SYMBOL_EXISTS(strnlen string.h HAVE_STRNLEN)
-CHECK_SYMBOL_EXISTS(snprintf stdio.h HAVE_SNPRINTF)
-IF(NOT HAVE_SNPRINTF)
- CHECK_FUNCTION_EXISTS(_snprintf HAVE__SNPRINTF)
- IF(NOT HAVE__SNPRINTF)
- MESSAGE(FATAL_ERROR "No snprintf function found, please report!")
- ENDIF()
-
- SET(CPP_DEFS ${CPP_DEFS} snprintf=_snprintf)
-ENDIF()
-
-CHECK_SYMBOL_EXISTS(isfinite math.h HAVE_ISFINITE)
-IF(NOT HAVE_ISFINITE)
- CHECK_FUNCTION_EXISTS(finite HAVE_FINITE)
- IF(NOT HAVE_FINITE)
- CHECK_FUNCTION_EXISTS(_finite HAVE__FINITE)
- IF(NOT HAVE__FINITE)
- MESSAGE(FATAL_ERROR "No isfinite function found, please report!")
- ENDIF()
- SET(CPP_DEFS ${CPP_DEFS} isfinite=_finite)
- ELSE()
- SET(CPP_DEFS ${CPP_DEFS} isfinite=finite)
- ENDIF()
-ENDIF()
-
-CHECK_SYMBOL_EXISTS(isnan math.h HAVE_ISNAN)
-IF(NOT HAVE_ISNAN)
- CHECK_FUNCTION_EXISTS(_isnan HAVE__ISNAN)
- IF(NOT HAVE__ISNAN)
- MESSAGE(FATAL_ERROR "No isnan function found, please report!")
- ENDIF()
-
- SET(CPP_DEFS ${CPP_DEFS} isnan=_isnan)
-ENDIF()
-
# Check if we have Windows headers
SET(OLD_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 53831ccf..a79b6962 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -281,7 +281,7 @@ inline ALint fastf2i(ALfloat f)
* libc call, while MSVC's implementation is horribly slow, so always fall
* back to a normal integer conversion for them.
*/
-#elif defined(HAVE_LRINTF) && !defined(_MSC_VER) && !defined(__clang__)
+#elif !defined(_MSC_VER) && !defined(__clang__)
return lrintf(f);
diff --git a/common/math_defs.h b/common/math_defs.h
index 3e8dbe76..513570f0 100644
--- a/common/math_defs.h
+++ b/common/math_defs.h
@@ -32,28 +32,6 @@ static const union msvc_inf_hack {
#define HUGE_VALF (msvc_inf_union.f)
#endif
-#ifndef HAVE_CBRTF
-static inline float my_cbrtf(float f)
-{
- return powf(f, 1.0f/3.0f);
-}
-#define cbrtf my_cbrtf
-#endif
-
-#ifndef HAVE_COPYSIGNF
-static inline float my_copysignf(float x, float y)
-{
- union {
- float f;
- unsigned int u;
- } ux = { x }, uy = { y };
- ux.u &= 0x7fffffffu;
- ux.u |= (uy.u&0x80000000u);
- return ux.f;
-}
-#define copysignf my_copysignf
-#endif
-
#define DEG2RAD(x) ((float)(x) * (float)(M_PI/180.0))
#define RAD2DEG(x) ((float)(x) * (float)(180.0/M_PI))
diff --git a/config.h.in b/config.h.in
index 7895dc88..5a85faea 100644
--- a/config.h.in
+++ b/config.h.in
@@ -89,18 +89,6 @@
/* Define if we have the stat function */
#cmakedefine HAVE_STAT
-/* Define if we have the lrintf function */
-#cmakedefine HAVE_LRINTF
-
-/* Define if we have the cbrtf function */
-#cmakedefine HAVE_CBRTF
-
-/* Define if we have the copysignf function */
-#cmakedefine HAVE_COPYSIGNF
-
-/* Define if we have the strnlen function */
-#cmakedefine HAVE_STRNLEN
-
/* Define if we have the __int64 type */
#cmakedefine HAVE___INT64