Tweaked byte order determination for Solaris systems.

git-svn-id: file:///home/mbr/svn/fwknop/trunk@74 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
Damien Stuart
2009-03-15 14:37:35 +00:00
parent 7f0e7a9a35
commit b82f0e99dd
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ AC_PROG_LIBTOOL
# Checks for header files.
#
AC_HEADER_STDC
AC_CHECK_HEADERS([ctype.h endian.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/endian.h sys/socket.h sys/time.h termios.h unistd.h])
AC_CHECK_HEADERS([ctype.h endian.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/byteorder.h sys/endian.h sys/socket.h sys/time.h termios.h unistd.h])
# Type checks.
#
+9
View File
@@ -63,6 +63,15 @@
#elif HAVE_SYS_ENDIAN_H /* FreeBSD has a sys/endian.h */
#include <sys/endian.h>
#define BYTEORDER _BYTE_ORDER
#elif HAVE_SYS_BYTEORDER_H /* Solaris (v10 at least) seems to have this */
#include <sys/byteorder.h>
#if defined(_BIG_ENDIAN)
#define BYTEORDER 4321
#elif defined(_LITTLE_ENDIAN)
#define BYTEORDER 1234
#else
#error unable to determine BYTEORDER
#endif
#endif
/* Convenient macros for wrapping sections in 'extern "C" {' constructs.