summaryrefslogtreecommitdiff
path: root/www/firefox/patches/patch-xm
blob: 5ec641e821c883b4a7624754f8ccd84de88868a6 (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
47
48
49
$NetBSD: patch-xm,v 1.3 2013/05/23 13:12:13 ryoon Exp $

NetBSD/ppc xptcall support code. Originally from pkgsrc/www/mozilla.

--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig	2013-01-04 23:44:47.000000000 +0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
@@ -5,9 +5,9 @@
 
 // Platform specific code to invoke XPCOM methods on native objects
 
-// The purpose of XPTC_InvokeByIndex() is to map a platform
+// The purpose of NS_InvokeByIndex_P() is to map a platform
 // indepenpent call to the platform ABI. To do that,
-// XPTC_InvokeByIndex() has to determine the method to call via vtable
+// NS_InvokeByIndex_P() has to determine the method to call via vtable
 // access. The parameters for the method are read from the
 // nsXPTCVariant* and prepared for the native ABI.  For the Linux/PPC
 // ABI this means that the first 8 integral and floating point
@@ -69,8 +69,10 @@ invoke_copy_to_stack(uint32_t* d,
                 if ((uint32_t) d & 4) d++; // doubles are 8-byte aligned on stack
                 *((double*) d) = s->val.d;
                 d += 2;
+#if __GXX_ABI_VERSION < 100
 		if (gpr < GPR_COUNT)
 		    gpr += 2;
+#endif
             }
         }
         else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
@@ -79,8 +81,10 @@ invoke_copy_to_stack(uint32_t* d,
             else {
                 *((float*) d) = s->val.f;
 		d += 1;
+#if __GXX_ABI_VERSION < 100
 		if (gpr < GPR_COUNT)
 		    gpr += 1;
+#endif
 	    }
         }
         else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
@@ -107,6 +111,6 @@ invoke_copy_to_stack(uint32_t* d,
 }
 
 extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
+EXPORT_XPCOM_API(nsresult)
+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
                    uint32_t paramCount, nsXPTCVariant* params);