#ifndef __i386__
#undef __i386__
#endif
+
+// Take care not to define both __i386__ and __x86_64__ on those systems with
+// 64 bit kernel and 32 bit userland:
+#ifndef __x86_64__
+#ifndef __i386__
+#undef __x86_64__
+#endif
+#endif
+
#ifndef __m68k__
#undef __m68k__
#endif
+
// NB: GCC def's __mips__ both on big-endian and little-endian systems.
#ifndef __mips__
#undef __mips__
#endif
+
#ifndef __mipsel__
#undef __mipsel__
#endif
+
#ifndef __mips64__
#undef __mips64__
#endif
+
#ifndef __sparc__
#undef __sparc__
#endif
+
#ifndef __sparc64__
#undef __sparc64__
#endif
+
#ifndef __alpha__
#undef __alpha__
#endif
+
#ifndef __hppa__
#undef __hppa__
#endif
+
#ifndef __arm__
#undef __arm__
#endif
+
#ifndef __rs6000__
#undef __rs6000__
#endif
+
#ifndef __m88k__
#undef __m88k__
#endif
+
#ifndef __convex__
#undef __convex__
#endif
+
#ifndef __ia64__
#undef __ia64__
#endif
-#ifndef __x86_64__
-#undef __x86_64__
-#endif
+
#ifndef __s390__
#undef __s390__
#endif