Patch 1471883: --enable-universalsdk on Mac OS X
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 8df7f9b..886b336 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -846,9 +846,22 @@
 /* Define to profile with the Pentium timestamp counter */
 #undef WITH_TSC
 
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
+
+ /* Define to 1 if your processor stores words with the most significant byte
+    first (like Motorola and SPARC, unlike Intel and VAX). 
+
+    The block below does compile-time checking for endianness on platforms
+    that use GCC and therefore allows compiling fat binaries on OSX by using 
+    '-arch ppc -arch i386' as the compile flags. The phrasing was choosen
+    such that the configure-result is used on systems that don't use GCC.
+  */
+#ifdef __BIG_ENDIAN__
+#define WORDS_BIGENDIAN 1
+#else
+#ifndef __LITTLE_ENDIAN__
 #undef WORDS_BIGENDIAN
+#endif
+#endif
 
 /* Define to 1 if on AIX 3.
    System headers sometimes define this.