Commit a5e0d298 authored by Mark Karpilovskij's avatar Mark Karpilovskij Committed by Daniel Salzman

libknot/endian: remove obsolete beNNtoh support for glibc < 2.9

parent b0ed3f0d
......@@ -488,10 +488,6 @@ AC_CHECK_FUNCS([clock_gettime gettimeofday fgetln getline madvise malloc_trim po
AC_CHECK_FUNC([vasprintf], [], [
AC_MSG_ERROR([vasprintf support in the libc is required])])
# Check for be64toh function
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <endian.h>]], [[return be64toh(0);]])],
[AC_DEFINE(HAVE_BE64TOH, 1, [Define to 1 if you have the 'be64toh' function.])])
# Check for cpu_set_t/cpuset_t compatibility
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[cpu_set_t set; CPU_ZERO(&set);]])],
[AC_DEFINE(HAVE_CPUSET_LINUX, 1, [Define if Linux-like cpu_set_t exists.])])
......
......@@ -27,25 +27,6 @@
#if defined(__linux__) || defined(__gnu_hurd__) || \
(defined(__FreeBSD_kernel__) && defined(__GLIBC__))
# include <endian.h>
# ifndef be64toh
# include <arpa/inet.h>
# include <byteswap.h>
# if BYTE_ORDER == LITTLE_ENDIAN
# define be16toh(x) ntohs(x)
# define be32toh(x) ntohl(x)
# define be64toh(x) bswap_64 (x)
# define le16toh(x) (x)
# define le32toh(x) (x)
# define le64toh(x) (x)
# else
# define be16toh(x) (x)
# define be32toh(x) (x)
# define be64toh(x) (x)
# define le16toh(x) ntohs(x)
# define le32toh(x) ntohl(x)
# define le64toh(x) bswap_64 (x)
# endif
# endif
#elif defined(__FreeBSD__) || defined(__NetBSD__)
# include <sys/endian.h>
#elif defined(__OpenBSD__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment