forked from Mirror/frr
build: remove deprecated AC_WORDS_BIGENDIAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
6fc9987217
commit
19083e4f75
17
configure.ac
17
configure.ac
|
@ -973,7 +973,7 @@ dnl -------------------------
|
|||
dnl Check other header files.
|
||||
dnl -------------------------
|
||||
AC_CHECK_HEADERS([stropts.h sys/ksym.h \
|
||||
linux/version.h asm/types.h])
|
||||
linux/version.h asm/types.h endian.h sys/endian.h])
|
||||
|
||||
ac_stdatomic_ok=false
|
||||
AC_DEFINE([FRR_AUTOCONF_ATOMIC], [1], [did autoconf checks for atomic funcs])
|
||||
|
@ -1266,11 +1266,6 @@ if test "$enable_realms" = "yes"; then
|
|||
esac
|
||||
fi
|
||||
|
||||
dnl -------------------------------
|
||||
dnl Endian-ness check
|
||||
dnl -------------------------------
|
||||
AC_WORDS_BIGENDIAN
|
||||
|
||||
dnl ---------------
|
||||
dnl other functions
|
||||
dnl ---------------
|
||||
|
@ -2203,8 +2198,14 @@ AC_TRY_COMPILE([#include <netinet/in.h>], [
|
|||
dnl --------------------------------------
|
||||
dnl checking for be32dec existence or not
|
||||
dnl --------------------------------------
|
||||
AC_CHECK_DECLS([be32enc, be32dec], [], [],
|
||||
[#include <sys/endian.h>])
|
||||
AC_CHECK_DECLS([be32enc, be32dec], [], [], [
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
dnl --------------------------------------
|
||||
dnl checking for clock_time monotonic struct and call
|
||||
|
|
|
@ -35,8 +35,6 @@ static inline uint32_t be32dec(const void *pp)
|
|||
return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8)
|
||||
+ ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
|
||||
}
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_BE32ENC
|
||||
|
@ -49,8 +47,6 @@ static inline void be32enc(void *pp, uint32_t x)
|
|||
p[1] = (x >> 16) & 0xff;
|
||||
p[0] = (x >> 24) & 0xff;
|
||||
}
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
24
lib/zebra.h
24
lib/zebra.h
|
@ -68,6 +68,12 @@
|
|||
#include <limits.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
/* machine dependent includes */
|
||||
#ifdef HAVE_LINUX_VERSION_H
|
||||
|
@ -280,22 +286,10 @@ struct in_pktinfo {
|
|||
#define HAVE_IP_HDRINCL_BSD_ORDER
|
||||
#endif
|
||||
|
||||
/* Define BYTE_ORDER, if not defined. Useful for compiler conditional
|
||||
* code, rather than preprocessor conditional.
|
||||
* Not all the world has this BSD define.
|
||||
*/
|
||||
/* autoconf macros for this are deprecated, just find endian.h */
|
||||
#ifndef BYTE_ORDER
|
||||
#define BIG_ENDIAN 4321 /* least-significant byte first (vax, pc) */
|
||||
#define LITTLE_ENDIAN 1234 /* most-significant byte first (IBM, net) */
|
||||
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */
|
||||
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else /* !WORDS_BIGENDIAN */
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
||||
#endif /* ndef BYTE_ORDER */
|
||||
#error please locate an endian.h file appropriate to your platform
|
||||
#endif
|
||||
|
||||
/* For old definition. */
|
||||
#ifndef IN6_ARE_ADDR_EQUAL
|
||||
|
|
Loading…
Reference in a new issue