aboutsummaryrefslogtreecommitdiff
path: root/ports/glib/fix-arm-builds.patch
blob: 257ee75c6b35c9091aabc835a22e2b995993af35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff --git a/gio/tests/plugin_resources.c b/gio/tests/plugin_resources.c
index 4c1b0214b..bbfc7ae07 100644
--- a/gio/tests/plugin_resources.c
+++ b/gio/tests/plugin_resources.c
@@ -80,13 +80,13 @@ GResource *_g_plugin_get_resource (void)
  */
 
 /* We need to account for differences between the mangling of symbols
- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed
- * with an underscore but symbols on x64 are not.
+ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
+ * with an underscore but symbols on x64/ARM/ARM64 are not.
  */
-#ifdef _WIN64
-#define G_MSVC_SYMBOL_PREFIX ""
-#else
+#ifdef _M_IX86
 #define G_MSVC_SYMBOL_PREFIX "_"
+#else
+#define G_MSVC_SYMBOL_PREFIX ""
 #endif
 
 #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
diff --git a/glib/gconstructor.h b/glib/gconstructor.h
index dccb0314c..fa1139302 100644
--- a/glib/gconstructor.h
+++ b/glib/gconstructor.h
@@ -40,13 +40,13 @@
  */
 
 /* We need to account for differences between the mangling of symbols
- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed
- * with an underscore but symbols on x64 are not.
+ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
+ * with an underscore but symbols on x64/ARM/ARM64 are not.
  */
-#ifdef _WIN64
-#define G_MSVC_SYMBOL_PREFIX ""
-#else
+#ifdef _M_IX86
 #define G_MSVC_SYMBOL_PREFIX "_"
+#else
+#define G_MSVC_SYMBOL_PREFIX ""
 #endif
 
 #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)