From 748a46846984b408135b2e1c1093db31f9296543 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 16 Jan 2005 14:01:44 +0000
Subject: [PATCH] added code for hardware platform detection (__INTEL__,
 __POWERPC__, ... which were not set correctly before); added __IA64__

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/cppconst.tex |  1 +
 include/wx/platform.h      | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/docs/latex/wx/cppconst.tex b/docs/latex/wx/cppconst.tex
index 263a443b5e..b3f0fbe711 100644
--- a/docs/latex/wx/cppconst.tex
+++ b/docs/latex/wx/cppconst.tex
@@ -104,6 +104,7 @@ compiler used.
 \begin{twocollist}\itemsep=0pt
 \twocolitem{\_\_ALPHA\_\_}{DEC Alpha architecture}
 \twocolitem{\_\_INTEL\_\_}{Intel i386 or compatible}
+\twocolitem{\_\_IA64\_\_}{Intel 64 bit architecture}
 \twocolitem{\_\_POWERPC\_\_}{Motorola Power PC}
 \end{twocollist}
 
diff --git a/include/wx/platform.h b/include/wx/platform.h
index bd30bf68f2..7d82a9cef5 100644
--- a/include/wx/platform.h
+++ b/include/wx/platform.h
@@ -223,6 +223,35 @@
 #   endif
 #endif
 
+/*
+   Hardware platform detection.
+
+   VC++ defines _M_xxx symbols.
+ */
+#if defined(_M_IX86) || defined(i386) || defined(__i386) || defined(__i386__)
+    #ifndef __INTEL__
+        #define __INTEL__
+    #endif
+#endif /* x86 */
+
+#if defined(_M_IA64)
+    #ifndef __IA64__
+        #define __IA64__
+    #endif
+#endif /* ia64 */
+
+#if defined(_M_MPPC) || defined(__PPC__)
+    #ifndef __POWERPC__
+        #define __POWERPC__
+    #endif
+#endif /* alpha */
+
+#if defined(_M_ALPHA) || defined(__AXP__)
+    #ifndef __ALPHA__
+        #define __ALPHA__
+    #endif
+#endif /* alpha */
+
 /*
    Include wx/setup.h for the Unix platform defines generated by configure and
    the library compilation options
-- 
2.50.0

