From b085f4969f95106b94075cb309fe3e5335266624 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Wed, 17 Aug 2005 03:40:16 +0000
Subject: [PATCH] Change ## to the traditional /**/ so that we can compile
 CMUCL on Tiger (10.4) with gcc (4.x) or Jaguar (10.2) gcc (3.x).  Not the
 best solution, but I think gcc 4 doesn't handle ## the same as gcc 3.  But
 this allows using the default gcc on both platforms to compile CMUCL.

---
 lisp/linux-stubs.S  | 22 +++++++++++-----------
 lisp/ppc-assem.S    | 12 ++++++------
 lisp/ppc-lispregs.h |  2 +-
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/lisp/linux-stubs.S b/lisp/linux-stubs.S
index fb53f821f..586513057 100644
--- a/lisp/linux-stubs.S
+++ b/lisp/linux-stubs.S
@@ -1,6 +1,6 @@
 /*	linux-stubs.S
 
-	$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/linux-stubs.S,v 1.19 2005/02/07 00:47:45 rtoy Exp $
+	$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/linux-stubs.S,v 1.20 2005/08/17 03:40:16 rtoy Rel $
 
 	These are needed because the locations of the
 	libraries are filled in by ld.so at runtime.
@@ -10,19 +10,19 @@
 
 #define doe(fct) \
 .text						@\
-.globl  ldso_stub___ ## fct			@\
-ldso_stub___ ## fct:				@\
-	b ldso_stub__ ## fct ## stub		@\
-.symbol_stub ldso_stub__ ## fct ## stub:	@\
-.indirect_symbol _ ## fct			@\
-	lis	r11,ha16(ldso_stub__ ## fct ## $lazy_ptr)	@\
-	lwz	r12,lo16(ldso_stub__ ## fct ## $lazy_ptr)(r11)	@\
+.globl  ldso_stub___/**/fct			@\
+ldso_stub___/**/fct:				@\
+	b ldso_stub__/**/fct/**/stub		@\
+.symbol_stub ldso_stub__/**/fct/**/stub:	@\
+.indirect_symbol _/**/fct			@\
+	lis	r11,ha16(ldso_stub__/**/fct/**/$lazy_ptr)	@\
+	lwz	r12,lo16(ldso_stub__/**/fct/**/$lazy_ptr)(r11)	@\
 	mtctr	r12				@\
-	addi	r11,r11,lo16(ldso_stub__ ## fct ## $lazy_ptr)	@\
+	addi	r11,r11,lo16(ldso_stub__/**/fct/**/$lazy_ptr)	@\
 	bctr					@\
 .lazy_symbol_pointer				@\
-ldso_stub__ ## fct ## $lazy_ptr:		@\
-	.indirect_symbol _ ## fct		@\
+ldso_stub__/**/fct/**/$lazy_ptr:		@\
+	.indirect_symbol _/**/fct		@\
 	.long dyld_stub_binding_helper
 
 #else
diff --git a/lisp/ppc-assem.S b/lisp/ppc-assem.S
index 45e25f958..e531a1a0c 100644
--- a/lisp/ppc-assem.S
+++ b/lisp/ppc-assem.S
@@ -7,7 +7,7 @@
 #if defined DARWIN
 #define FUNCDEF(x)	.text @ \
 			.align 3 @ \
-_##x:
+_/**/x:
 #define GFUNCDEF(x)	.globl _/**/x @ \
 	FUNCDEF(x)
 #else
@@ -56,8 +56,8 @@ x:
 #if defined DARWIN
 #define FRAME_SIZE(first_g,first_f,out_arg_words,savecr) \
 (NFPR_SAVE_BYTES(first_f)+ NGPR_SAVE_BYTES(first_g)+ FRAME_ARG_BYTES(out_arg_words))
-#define SAVE_FPR(n) stfd f##n,-8*(32- n)(r11)
-#define SAVE_GPR(n) stw r##n,-4*(32- n)(r11)
+#define SAVE_FPR(n) stfd f/**/n,-8*(32- n)(r11)
+#define SAVE_GPR(n) stw r/**/n,-4*(32- n)(r11)
 #define FULL_FRAME_SIZE FRAME_SIZE(FIRST_SAVE_GPR,FIRST_SAVE_FPR,8,1)
 #else
 #define FRAME_SIZE(first_g,first_f,out_arg_words,savecr) \
@@ -68,8 +68,8 @@ x:
 #endif
 	
 #if defined DARWIN
-#define RESTORE_FPR(n) lfd f##n,-8*(32- n)(r11)
-#define RESTORE_GPR(n) lwz r##n,-4*(32- n)(r11)
+#define RESTORE_FPR(n) lfd f/**/n,-8*(32- n)(r11)
+#define RESTORE_GPR(n) lwz r/**/n,-4*(32- n)(r11)
 #else
 #define RESTORE_FPR(n) lfd f##n,-8*(32-(r##n))(r11)
 #define RESTORE_GPR(n) lwz r##n,-4*(32-(r##n))(r11)
@@ -642,4 +642,4 @@ _function_end_breakpoint_end:
 	.byte	SC_OFFSET_HI(sc_DescriptorReg, reg_A0_NUM)
 	.align	4
 					
-#endif	
\ No newline at end of file
+#endif	
diff --git a/lisp/ppc-lispregs.h b/lisp/ppc-lispregs.h
index 14c8e036e..7e1371544 100644
--- a/lisp/ppc-lispregs.h
+++ b/lisp/ppc-lispregs.h
@@ -3,7 +3,7 @@
 
 #if defined DARWIN
 #if defined LANGUAGE_ASSEMBLY
-#define REG(num) r##num
+#define REG(num) r/**/num
 #else
 #define REG(num) num
 #endif
-- 
GitLab