aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2024-02-27 18:29:24 +0000
committerCory Fields <cory-nospam-@coryfields.com>2024-02-28 13:42:38 +0000
commit432b18ca8d0654318a8d882b28b20af2cb2d2e5d (patch)
treec3ff23d3ca9195fa94b4a5ad757ac2e2682e63d5 /configure.ac
parent297367b3bb062c57142747719ac9bf2e12717ce9 (diff)
serialization: detect byteswap builtins without autoconf tests
Rather than a complicated set of tests to decide which bswap functions to use, always prefer the compiler built-ins when available. These builtins and fallbacks can all be removed once we're using c++23, which adds std::byteswap.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 1 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 50e6870dd9..882bd01075 100644
--- a/configure.ac
+++ b/configure.ac
@@ -975,7 +975,7 @@ if test "$TARGET_OS" = "darwin"; then
AX_CHECK_LINK_FLAG([-Wl,-fixup_chains], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [$LDFLAG_WERROR])
fi
-AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
+AC_CHECK_HEADERS([endian.h sys/endian.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])
AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
[#include <sys/types.h>
@@ -997,11 +997,6 @@ AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, b
#include <sys/endian.h>
#endif])
-AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
- [#if HAVE_BYTESWAP_H
- #include <byteswap.h>
- #endif])
-
AC_MSG_CHECKING([for __builtin_clzl])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
(void) __builtin_clzl(0);