[project @ 2001-08-31 11:42:44 by sewardj]
[ghc-hetmet.git] / ghc / lib / std / PrelHandle.hsc
index 58928a2..4a9dadc 100644 (file)
@@ -4,7 +4,7 @@
 #undef DEBUG
 
 -- -----------------------------------------------------------------------------
--- $Id: PrelHandle.hsc,v 1.14 2001/07/13 11:48:52 rrt 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); }
 
 -- ---------------------------------------------------------------------------
@@ -1174,7 +1174,7 @@ hIsTerminalDevice handle = do
 -- hSetBinaryMode
 
 #ifdef _WIN32
-hSetBinaryMode handle bin = 
+hSetBinaryMode handle bin =
   withAllHandles__ "hSetBinaryMode" handle $ \ handle_ ->
     do let flg | bin       = (#const O_BINARY)
               | otherwise = (#const O_TEXT)
@@ -1184,10 +1184,9 @@ hSetBinaryMode handle bin =
 
 foreign import "setmode" setmode :: CInt -> CInt -> IO CInt
 #else
-hSetBinaryMode handle bin = do
+hSetBinaryMode handle bin =
   withAllHandles__ "hSetBinaryMode" handle $ \ handle_ ->
     return handle_{haIsBin=bin}
-  return ()
 #endif
 
 -- -----------------------------------------------------------------------------