Check for TARGET_* defines in addition to compiler specific arch defines.
authorJonathan Chambers <joncham@gmail.com>
Wed, 7 Mar 2012 02:49:43 +0000 (21:49 -0500)
committerJonathan Chambers <joncham@gmail.com>
Wed, 7 Mar 2012 02:49:43 +0000 (21:49 -0500)
mono/metadata/mono-config.c
mono/utils/mono-membar.h

index e73b23ab258c325e5a9b03058204f070a39b91f3..729cec4a821e1be1fe499d1625abbbd4c7433655 100644 (file)
@@ -33,7 +33,7 @@
 #define CONFIG_OS "netbsd"
 #elif defined(__OpenBSD__)
 #define CONFIG_OS "openbsd"
-#elif defined(__WIN32__)
+#elif defined(__WIN32__) || defined(TARGET_WIN32)
 #define CONFIG_OS "windows"
 #elif defined(_IBMR2)
 #define CONFIG_OS "aix"
 #endif
 
 #ifndef CONFIG_CPU
-#if defined(__i386__)
+#if defined(__i386__) || defined(TARGET_X86)
 #define CONFIG_CPU "x86"
 #define CONFIG_WORDSIZE "32"
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(TARGET_AMD64)
 #define CONFIG_CPU "x86-64"
 #define CONFIG_WORDSIZE "64"
 #elif defined(sparc) || defined(__sparc__)
index 0bd56dbeaa697c4d4a37344808309d163bfab099..80dfd2f5995d60fcb017755c97b397c169b9309e 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <glib.h>
 
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(TARGET_AMD64)
 #ifndef _MSC_VER
 static inline void mono_memory_barrier (void)
 {
@@ -48,7 +48,7 @@ static inline void mono_memory_write_barrier (void)
        _WriteBarrier ();
 }
 #endif
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(TARGET_X86)
 #ifndef _MSC_VER
 static inline void mono_memory_barrier (void)
 {