diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2021-04-21 12:23:14 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-04-21 15:42:37 +0200 |
| commit | 19083e4f7570ff5a4c22fd24b3945c5606eb0c84 (patch) | |
| tree | ef3fbfd7da49161aa9f93162e1a12a2a027db5eb /lib/zebra.h | |
| parent | 6fc998721798be8a240e301871d93747f0a21e7c (diff) | |
build: remove deprecated AC_WORDS_BIGENDIAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/zebra.h')
| -rw-r--r-- | lib/zebra.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index 33364f1471..26c0fe05b5 100644 --- a/lib/zebra.h +++ b/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 |
