mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
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 Check other header files.
|
||||||
dnl -------------------------
|
dnl -------------------------
|
||||||
AC_CHECK_HEADERS([stropts.h sys/ksym.h \
|
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_stdatomic_ok=false
|
||||||
AC_DEFINE([FRR_AUTOCONF_ATOMIC], [1], [did autoconf checks for atomic funcs])
|
AC_DEFINE([FRR_AUTOCONF_ATOMIC], [1], [did autoconf checks for atomic funcs])
|
||||||
|
@ -1266,11 +1266,6 @@ if test "$enable_realms" = "yes"; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl -------------------------------
|
|
||||||
dnl Endian-ness check
|
|
||||||
dnl -------------------------------
|
|
||||||
AC_WORDS_BIGENDIAN
|
|
||||||
|
|
||||||
dnl ---------------
|
dnl ---------------
|
||||||
dnl other functions
|
dnl other functions
|
||||||
dnl ---------------
|
dnl ---------------
|
||||||
|
@ -2203,8 +2198,14 @@ AC_TRY_COMPILE([#include <netinet/in.h>], [
|
||||||
dnl --------------------------------------
|
dnl --------------------------------------
|
||||||
dnl checking for be32dec existence or not
|
dnl checking for be32dec existence or not
|
||||||
dnl --------------------------------------
|
dnl --------------------------------------
|
||||||
AC_CHECK_DECLS([be32enc, be32dec], [], [],
|
AC_CHECK_DECLS([be32enc, be32dec], [], [], [
|
||||||
[#include <sys/endian.h>])
|
#ifdef HAVE_SYS_ENDIAN_H
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ENDIAN_H
|
||||||
|
#include <endian.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
dnl --------------------------------------
|
dnl --------------------------------------
|
||||||
dnl checking for clock_time monotonic struct and call
|
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)
|
return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8)
|
||||||
+ ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
|
+ ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#include <sys/endian.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !HAVE_DECL_BE32ENC
|
#if !HAVE_DECL_BE32ENC
|
||||||
|
@ -49,8 +47,6 @@ static inline void be32enc(void *pp, uint32_t x)
|
||||||
p[1] = (x >> 16) & 0xff;
|
p[1] = (x >> 16) & 0xff;
|
||||||
p[0] = (x >> 24) & 0xff;
|
p[0] = (x >> 24) & 0xff;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#include <sys/endian.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
24
lib/zebra.h
24
lib/zebra.h
|
@ -68,6 +68,12 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdbool.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 */
|
/* machine dependent includes */
|
||||||
#ifdef HAVE_LINUX_VERSION_H
|
#ifdef HAVE_LINUX_VERSION_H
|
||||||
|
@ -280,22 +286,10 @@ struct in_pktinfo {
|
||||||
#define HAVE_IP_HDRINCL_BSD_ORDER
|
#define HAVE_IP_HDRINCL_BSD_ORDER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define BYTE_ORDER, if not defined. Useful for compiler conditional
|
/* autoconf macros for this are deprecated, just find endian.h */
|
||||||
* code, rather than preprocessor conditional.
|
|
||||||
* Not all the world has this BSD define.
|
|
||||||
*/
|
|
||||||
#ifndef BYTE_ORDER
|
#ifndef BYTE_ORDER
|
||||||
#define BIG_ENDIAN 4321 /* least-significant byte first (vax, pc) */
|
#error please locate an endian.h file appropriate to your platform
|
||||||
#define LITTLE_ENDIAN 1234 /* most-significant byte first (IBM, net) */
|
#endif
|
||||||
#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 */
|
|
||||||
|
|
||||||
/* For old definition. */
|
/* For old definition. */
|
||||||
#ifndef IN6_ARE_ADDR_EQUAL
|
#ifndef IN6_ARE_ADDR_EQUAL
|
||||||
|
|
Loading…
Reference in a new issue