75b5986
--- shapelib-1.2.10/contrib/my_nan.h.orig	2005-02-13 12:04:41.484914852 +0000
75b5986
+++ shapelib-1.2.10/contrib/my_nan.h	2005-02-13 12:07:03.306704589 +0000
75b5986
@@ -21,16 +21,18 @@
75b5986
 
75b5986
 #define	_GNU_NAN_H	1
75b5986
 
75b5986
+#include <endian.h>
75b5986
 
75b5986
 /* hacked to define NAN on Solaris 2.7 if it wasn't defined  */
75b5986
 
75b5986
 /* IEEE Not A Number.  */
75b5986
 
75b5986
-#ifdef _BIG_ENDIAN
75b5986
+#if __BYTE_ORDER == __BIG_ENDIAN
75b5986
 #  define	__nan_bytes		{ 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }
75b5986
-#endif
75b5986
-#ifdef _LITTLE_ENDIAN
75b5986
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
75b5986
 #  define	__nan_bytes		{ 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
75b5986
+#else
75b5986
+#error No endianness?
75b5986
 #endif
75b5986
 
75b5986
 #ifdef	__GNUC__