--- defines.h.orig	2005-08-02 14:27:25.000000000 -0700
+++ defines.h	2005-08-02 16:08:22.000000000 -0700
@@ -102,6 +102,16 @@
 #endif
 #endif
 
+#if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)
+/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
+   result in a different endian.  Instead trust __BIG_ENDIAN__ and
+   __LITTLE_ENDIAN__ which are set correctly by -arch. */
+#undef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
+#define WORDS_BIGENDIAN
+#endif
+#endif
+
 #ifdef __NeXT__
 /* NextStep, OpenStep, Rhapsody */
 #ifndef S_IRUSR
@@ -155,13 +165,6 @@
 #ifndef S_ISREG
 #define S_ISREG(mode)  (((mode) & (0170000)) == (0100000))
 #endif
-/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
-   result in a different endian.  Instead trust __BIG_ENDIAN__ and
-   __LITTLE_ENDIAN__ which are set correctly by -arch. */
-#undef WORDS_BIGENDIAN
-#ifdef __BIG_ENDIAN__
-#define WORDS_BIGENDIAN
-#endif
 #ifndef __APPLE__
 /* NextStep, OpenStep (but not Rhapsody) */
 #ifndef GETPGRP_VOID
