[project @ 2001-08-23 10:36:50 by sewardj]
authorsewardj <unknown>
Thu, 23 Aug 2001 10:36:50 +0000 (10:36 +0000)
committersewardj <unknown>
Thu, 23 Aug 2001 10:36:50 +0000 (10:36 +0000)
Globally-uniquify the names of some _wrap functions so that the
previously-undetected global namespace clashes don't cause an
assertion failure in Hash.c when compiled -DDEBUG when starting GHCi
with various hslibs packages.

ghc/lib/std/PrelHandle.hsc
ghc/lib/std/PrelIO.hsc
ghc/lib/std/PrelPosix.hsc

index 5862141..4a9dadc 100644 (file)
@@ -4,7 +4,7 @@
 #undef DEBUG
 
 -- -----------------------------------------------------------------------------
--- $Id: PrelHandle.hsc,v 1.15 2001/07/13 15:01:28 simonmar Exp $
+-- $Id: PrelHandle.hsc,v 1.16 2001/08/23 10:36:50 sewardj Exp $
 --
 -- (c) The University of Glasgow, 1994-2001
 --
@@ -441,10 +441,10 @@ flushWriteBuffer fd buf@Buffer{ bufBuf=b, bufRPtr=r, bufWPtr=w }  = do
      then flushWriteBuffer fd (buf{ bufRPtr = r + res' })
      else return buf{ bufRPtr=0, bufWPtr=0 }
 
-foreign import "write_wrap" unsafe
+foreign import "write_PrelHandle_wrap" unsafe
    write_off :: CInt -> RawBuffer -> Int -> CInt -> IO CInt
 #def inline \
-int write_wrap(int fd, void *ptr, HsInt off, int size) \
+int write_PrelHandle_wrap(int fd, void *ptr, HsInt off, int size) \
 { return write(fd, ptr + off, size); }
 
 
@@ -484,10 +484,10 @@ fillReadBufferLoop fd is_line buf b w size = do
             then fillReadBufferLoop fd is_line buf b (w+res') size
             else return buf{ bufRPtr=0, bufWPtr=w+res' }
  
-foreign import "read_wrap" unsafe
+foreign import "read_PrelHandle_wrap" unsafe
    read_off :: FD -> RawBuffer -> Int -> CInt -> IO CInt
 #def inline \
-int read_wrap(int fd, void *ptr, HsInt off, int size) \
+int read_PrelHandle_wrap(int fd, void *ptr, HsInt off, int size) \
 { return read(fd, ptr + off, size); }
 
 -- ---------------------------------------------------------------------------
index eb7d849..e289596 100644 (file)
@@ -3,7 +3,7 @@
 #undef DEBUG_DUMP
 
 -- -----------------------------------------------------------------------------
--- $Id: PrelIO.hsc,v 1.10 2001/08/17 11:08:01 simonmar Exp $
+-- $Id: PrelIO.hsc,v 1.11 2001/08/23 10:36:50 sewardj Exp $
 --
 -- (c) The University of Glasgow, 1992-2001
 --
@@ -614,10 +614,10 @@ commitBuffer hdl raw sz count flush release = do
              return buf_ret
 
 
-foreign import "memcpy_wrap" unsafe 
+foreign import "memcpy_PrelIO_wrap" unsafe 
    memcpy_off :: RawBuffer -> Int -> RawBuffer -> CSize -> IO (Ptr ())
 #def inline \
-void *memcpy_wrap(char *dst, HsInt dst_off, const char *src, size_t sz) \
+void *memcpy_PrelIO_wrap(char *dst, HsInt dst_off, const char *src, size_t sz) \
 { return memcpy(dst+dst_off, src, sz); }
 
 -- ---------------------------------------------------------------------------
index 587f4f6..a2dfdd6 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -fno-implicit-prelude #-}
 
 -- ---------------------------------------------------------------------------
--- $Id: PrelPosix.hsc,v 1.12 2001/08/20 14:57:42 sof Exp $
+-- $Id: PrelPosix.hsc,v 1.13 2001/08/23 10:36:50 sewardj Exp $
 --
 -- POSIX support layer for the standard libraries
 --
@@ -93,18 +93,18 @@ fdType fd =
 ioe_unknownfiletype = IOError Nothing UnsupportedOperation "fdType"
                        "unknown file type" Nothing
 
-foreign import "s_isreg_wrap" unsafe s_isreg :: CMode -> Bool
-#def inline int s_isreg_wrap(m) { return S_ISREG(m); }
+foreign import "s_isreg_PrelPosix_wrap" unsafe s_isreg :: CMode -> Bool
+#def inline int s_isreg_PrelPosix_wrap(m) { return S_ISREG(m); }
 
-foreign import "s_isdir_wrap" unsafe s_isdir :: CMode -> Bool
-#def inline int s_isdir_wrap(m) { return S_ISDIR(m); }
+foreign import "s_isdir_PrelPosix_wrap" unsafe s_isdir :: CMode -> Bool
+#def inline int s_isdir_PrelPosix_wrap(m) { return S_ISDIR(m); }
 
-foreign import "s_isfifo_wrap" unsafe s_isfifo :: CMode -> Bool
-#def inline int s_isfifo_wrap(m) { return S_ISFIFO(m); }
+foreign import "s_isfifo_PrelPosix_wrap" unsafe s_isfifo :: CMode -> Bool
+#def inline int s_isfifo_PrelPosix_wrap(m) { return S_ISFIFO(m); }
 
 #ifndef mingw32_TARGET_OS
-foreign import "s_issock_wrap" unsafe s_issock :: CMode -> Bool
-#def inline int s_issock_wrap(m) { return S_ISSOCK(m); }
+foreign import "s_issock_PrelPosix_wrap" unsafe s_issock :: CMode -> Bool
+#def inline int s_issock_PrelPosix_wrap(m) { return S_ISSOCK(m); }
 #else
 s_issock :: CMode -> Bool
 s_issock cmode = False
@@ -285,9 +285,9 @@ foreign import "fcntl" unsafe
 foreign import "fork" unsafe
    fork :: IO CPid 
 
-foreign import "sigemptyset_wrap" unsafe
+foreign import "sigemptyset_PrelPosix_wrap" unsafe
    c_sigemptyset :: Ptr CSigset -> IO ()
-#def inline void sigemptyset_wrap(sigset_t *set) { sigemptyset(set); }
+#def inline void sigemptyset_PrelPosix_wrap(sigset_t *set) { sigemptyset(set); }
 
 foreign import "sigaddset" unsafe
    c_sigaddset :: Ptr CSigset -> CInt -> IO ()