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:
+1
-1
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user