From 0fa63324caf1375e94601da16f2b56389b807de3 Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Mon, 14 Apr 2003 20:43:22 +0000 Subject: [PATCH] Fixes bug - Mozilla fails to run due to missing StubNNN global data. r=dbradley bug=201490. patch submitted by jim@rrsl.rsmas.miami.edu --- .../src/md/unix/xptcstubs_asm_osf1_alpha.s | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s index 7e6f296fbe0d..3bef9b1bbf14 100644 --- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s +++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s @@ -28,6 +28,15 @@ SharedStubXv: ret $31,($26),1 .end SharedStub +/* + The C preprocessor doesn't handle # and ## if run with -std or -std0. + + If -std then __STDC__ is 0 [default] (K&R behavior) + If -std0 then __STDC__ is undefined (K&R behavior) + If -std1 then __STDC__ is 1 (ANSI preprocessor) +*/ + +#if __STDC__ #define STUB_ENTRY(n) ;\ .text ;\ .align 5 ;\ @@ -43,6 +52,24 @@ Stub##n##__14nsXPTCStubBaseXv: ;\ br $31,SharedStubXv ;\ .end Stub##n##__14nsXPTCStubBase \ +#else +#define STUB_ENTRY(n) ;\ + .text ;\ + .align 5 ;\ + .globl Stub/**/n/**/__14nsXPTCStubBase ;\ + .globl Stub/**/n/**/__14nsXPTCStubBaseXv ;\ + .ent Stub/**/n/**/__14nsXPTCStubBase ;\ +Stub/**/n/**/__14nsXPTCStubBase: ;\ + .frame $30,0,$26,0 ;\ + ldgp $29,0($27) ;\ + .prologue 1 ;\ +Stub/**/n/**/__14nsXPTCStubBaseXv: ;\ + lda $1,n ;\ + br $31,SharedStubXv ;\ + .end Stub/**/n/**/__14nsXPTCStubBase \ + +#endif + #define SENTINEL_ENTRY(n) \ #include "xptcstubsdef.inc"