Use BYTE_ORDER, BIG_ and LITTLE_ENDIAN instead of their

underscore-prefixed aliases, which are not available on -stable. There I
was proud of myself for testing on i386, alpha, and panther, and still
missing a -stable incompatibility :-\

Submitted by:	Voodai, Lars Erik Gullerud, Ivajlo Nikolov (so far)
This commit is contained in:
Mikhail Teterin 2002-11-06 12:44:10 +00:00
parent c92490ee1b
commit 6ef5c2e707
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=69577

View file

@ -6,9 +6,9 @@
-// #define USE_BIG_ENDIAN 1
+
+#include <machine/endian.h>
+#if _BYTE_ORDER == _BIG_ENDIAN
+#if BYTE_ORDER == BIG_ENDIAN
+# define USE_BIG_ENDIAN 1
+#elif _BYTE_ORDER != _LITTLE_ENDIAN
+#elif BYTE_ORDER != LITTLE_ENDIAN
+# error "Unexpected BYTE_ORDER on this architecture"
+#endif