#diff -urN bytesex.h bytesex.h
--- bytesex.h	2003-08-31 19:23:48.000000000 +0200
+++ bytesex.h	2004-11-28 00:56:01.000000000 +0100
@@ -7,19 +7,14 @@
 #ifndef ARS_BYTESEX_H
 #define ARS_BYTESEX_H
 
-#if 	defined(__i386__) \
-	|| defined(__alpha__) \
-	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
-#define BYTE_ORDER_LITTLE_ENDIAN
-#elif 	defined(__mc68000__) \
-	|| defined (__sparc__) \
-	|| defined (__sparc) \
-	|| defined (__PPC__) \
-	|| defined (__BIG_ENDIAN__) \
-	|| (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
-#define BYTE_ORDER_BIG_ENDIAN
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define BYTE_ORDER_LITTLE_ENDIAN
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define BYTE_ORDER_BIG_ENDIAN
 #else
-# error can not find the byte order for this architecture, fix bytesex.h
+# error unknown byte order
 #endif
 
 #endif /* ARS_BYTESEX_H */


