Description: Gut away broken endianness/word length detection.
 It caused build failures on half of Debian's release architectures WHILE
 BEING TOTALLY UNUSED!!!  And it was buggy, too -- for example, ARM is big
 endian while it was recognized as little endian (le versions of ARM are
 usually called ARMEL).
 .
 A non-enumerated CPU (like hppa or s390) or OS (kfreebsd) also caused build
 failures for no good reason.
 .
 If we'll need to known endianness in the future, please, check for it
 directly rather than maintaining a big and incomplete list of architectures.
Author: Adam Borowski <kilobyte@angband.pl>
Bug-Debian: http://bugs.debian.org/576552
Bug-Debian: http://bugs.debian.org/576618
Origin: upstream, git 05c1c913213b105c0de8b1d551732afbfb18a040
Forwarded: not-needed

--- crawl-0.6.0.orig/source/dbg-asrt.cc
+++ crawl-0.6.0/source/dbg-asrt.cc
@@ -478,11 +478,7 @@ static void _dump_ver_stuff(FILE* file)
     fprintf(file, "Platform: DOS" EOL);
 #endif // UNIX
 
-#if TARGET_CPU_BITS == 64
-    fprintf(file, "Bits: 64" EOL);
-#else
-    fprintf(file, "Bits: 32" EOL);
-#endif
+    fprintf(file, "Bits: %d\n", (int)sizeof(void*)*8);
 
 #ifdef USE_TILE
     fprintf(file, "Tiles: yes" EOL EOL);
--- crawl-0.6.0.orig/source/AppHdr.h
+++ crawl-0.6.0/source/AppHdr.h
@@ -59,11 +59,12 @@
 
 //
 // Define 'UNIX' if the target OS is UNIX-like.
+// Unknown OSes are assumed to be here.
 //
 #if defined(TARGET_OS_MACOSX) || defined(TARGET_OS_LINUX) || \
     defined(TARGET_OS_FREEBSD) || defined(TARGET_OS_NETBSD) || \
     defined(TARGET_OS_OPENBSD) || defined(TARGET_COMPILER_CYGWIN) || \
-    defined(TARGET_OS_SOLARIS)
+    defined(TARGET_OS_SOLARIS) || defined(TARGET_OS_UNKNOWN)
     #ifndef UNIX
     #define UNIX
     #endif
--- crawl-0.6.0.orig/source/platform.h
+++ crawl-0.6.0/source/platform.h
@@ -53,11 +53,6 @@
  * TARGET_COMPILER_ICC
  *  Intel C++ Compiler
  *
- * TARGET_BIG_ENDIAN
- *      Running on a big endian byte order architecture.
- * TARGET_LITTLE_ENDIAN
- *      Running on a little endian byte order architecture.
- *
  */
 
 #ifndef __included_cc_platform_detect_h
@@ -81,7 +76,6 @@
 #if defined (__arm__)
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_ARM
-#define TARGET_LITTLE_ENDIAN
 #endif
 #endif
 
@@ -90,7 +84,6 @@
 #if defined (__alpha) || defined (__alpha__)
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_ALPHA
-#define TARGET_LITTLE_ENDIAN /* How should bi-endianness be handled? */
 #endif
 #endif
 
@@ -99,7 +92,6 @@
 #if defined (__sparc) || defined (__sparc__)
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_SPARC
-#define TARGET_BIG_ENDIAN
 #endif
 #endif
 
@@ -108,11 +100,9 @@
 #if defined (__MIPSEL__)
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_MIPS
-#define TARGET_LIDDLE_ENDIAN
 #elif defined (__mips__)
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_MIPS
-#define TARGET_BIG_ENDIAN
 #endif
 #endif
 
@@ -120,11 +110,6 @@
 #if !defined (PROCESSOR_DETECTED)
 #if defined (_ARCH_PPC) || defined (__ppc__) || defined (__ppc64__) || defined (__PPC) || defined (powerpc) || defined (__PPC__) || defined (__powerpc64__) || defined (__powerpc64)
 #define PROCESSOR_DETECTED
-#if defined (__ppc64__) || defined (__powerpc64__) || defined (__powerpc64)
-#define TARGET_CPU_PPC 64
-#else
-#define TARGET_CPU_PPC 32
-#endif
 #define TARGET_BIG_ENDIAN
 #endif
 #endif
@@ -135,7 +120,6 @@
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_X64
 #define TARGET_CPU_X86_64
-#define TARGET_LITTLE_ENDIAN
 #endif
 #endif
 
@@ -144,7 +128,6 @@
 #if defined (__i386__) || defined (__i386) || defined (i386) || defined (_X86_) || defined (_M_IX86)
 #define PROCESSOR_DETECTED
 #define TARGET_CPU_X86
-#define TARGET_LITTLE_ENDIAN
 #endif
 #endif
 
@@ -275,34 +258,17 @@
 #endif
 #endif
 
-#if defined (_LP64) || defined (__LP64__) || defined (_M_X64) || defined(_M_IA64)
-#define TARGET_CPU_BITS 64
-#else
-#define TARGET_CPU_BITS 32
-#endif
+//#if !defined (PROCESSOR_DETECTED)
+//#error "Could not detect target CPU."
+//#endif
 
-#if defined (TARGET_CPU_PPC)
-#if TARGET_CPU_PPC == 32
-#define TARGET_CPU_BITS 32
-#elif TARGET_CPU_PPC == 64
-#define TARGET_CPU_BITS 64
-#endif
-#endif
-
-#if !defined (PROCESSOR_DETECTED)
-#error "Could not detect target CPU."
-#endif
-
-#if !defined (COMPILER_DETECTED)
-#error "Could not detect target compiler."
-#endif
+//#if !defined (COMPILER_DETECTED)
+//#error "Could not detect target compiler."
+//#endif
 
 #if !defined (OS_DETECTED)
-#error "Could not detect target OS."
-#endif
-
-#if !defined (TARGET_CPU_BITS)
-#error "Could not detect 32-bit/64-bit architecture."
+#define TARGET_OS_UNKNOWN
+//#error "Could not detect target OS."
 #endif
 
 /* ICC on Windows uses VC includes, etc */
