From f50706ea524f96270c84b6b9bed07785e684b344 Mon Sep 17 00:00:00 2001
From: panne <unknown>
Date: Fri, 16 Jul 1999 08:57:05 +0000
Subject: [PATCH] [project @ 1999-07-16 08:56:41 by panne] More small
 portability changes:    * For older GHCs use IOBase instead of PrelIOBase   
 * Never use commas in SLIT. cpp IS a hack for Haskell...

---
 ghc/compiler/nativeGen/PprMach.lhs | 8 ++++++--
 ghc/compiler/rename/RnMonad.lhs    | 4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ghc/compiler/nativeGen/PprMach.lhs b/ghc/compiler/nativeGen/PprMach.lhs
index 700700e2f5c0..766c2b32e47b 100644
--- a/ghc/compiler/nativeGen/PprMach.lhs
+++ b/ghc/compiler/nativeGen/PprMach.lhs
@@ -819,8 +819,12 @@ pprInstr (FUNBEGIN clab)
     where
 	pp_lab = pprCLabel_asm clab
 
-	pp_ldgp  = ptext SLIT(":\n\tldgp $29,0($27)\n")
-	pp_frame = ptext SLIT("..ng:\n\t.frame $30,4240,$26,0\n\t.prologue 1")
+        -- NEVER use commas within those string literals, cpp will ruin your day
+	pp_ldgp  = hcat [ ptext SLIT(":\n\tldgp $29"), char ',', ptext SLIT("0($27)\n") ]
+	pp_frame = hcat [ ptext SLIT("..ng:\n\t.frame $30"), char ',',
+                          ptext SLIT("4240"), char ',',
+                          ptext SLIT("$26"), char ',',
+                          ptext SLIT("0\n\t.prologue 1") ]
 
 pprInstr (FUNEND clab)
   = (<>) (ptext SLIT("\t.align 4\n\t.end ")) (pprCLabel_asm clab)
diff --git a/ghc/compiler/rename/RnMonad.lhs b/ghc/compiler/rename/RnMonad.lhs
index fae50f335f5c..5494fe397442 100644
--- a/ghc/compiler/rename/RnMonad.lhs
+++ b/ghc/compiler/rename/RnMonad.lhs
@@ -20,7 +20,11 @@ module RnMonad(
 
 #include "HsVersions.h"
 
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 302
 import PrelIOBase	( fixIO )	-- Should be in GlaExts
+#else
+import IOBase		( fixIO )
+#endif
 import IOExts		( IORef, newIORef, readIORef, writeIORef, unsafePerformIO )
 	
 import HsSyn		
-- 
GitLab