summaryrefslogtreecommitdiff
path: root/libraries/base/System/Posix/Internals.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-06-22 09:26:56 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-06-22 09:26:56 +0000
commit7f3e27157d1f812f3c98179458242f3d7c97bee8 (patch)
tree611113ac3f88cd0e43c9b90bd28fe198368e5060 /libraries/base/System/Posix/Internals.hs
parent14a5ed1462742e6cdf05ec0cf8d0fef98ee2f649 (diff)
downloadhaskell-7f3e27157d1f812f3c98179458242f3d7c97bee8.tar.gz
Tidy up use of read/write/recv/send; avoid unnecessary wrappers
Diffstat (limited to 'libraries/base/System/Posix/Internals.hs')
-rw-r--r--libraries/base/System/Posix/Internals.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index ac80574440..8916059e93 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -400,7 +400,10 @@ foreign import ccall unsafe "HsBase.h __hscore_mkdir"
mkdir :: CString -> CInt -> IO CInt
foreign import ccall unsafe "HsBase.h read"
- c_read :: CInt -> Ptr CChar -> CSize -> IO CSsize
+ c_read :: CInt -> Ptr Word8 -> CSize -> IO CSsize
+
+foreign import ccall safe "read"
+ c_safe_read :: CInt -> Ptr Word8 -> CSize -> IO CSsize
foreign import ccall unsafe "HsBase.h rewinddir"
c_rewinddir :: Ptr CDir -> IO ()
@@ -412,7 +415,10 @@ foreign import ccall unsafe "HsBase.h umask"
c_umask :: CMode -> IO CMode
foreign import ccall unsafe "HsBase.h write"
- c_write :: CInt -> Ptr CChar -> CSize -> IO CSsize
+ c_write :: CInt -> Ptr Word8 -> CSize -> IO CSsize
+
+foreign import ccall safe "write"
+ c_safe_write :: CInt -> Ptr Word8 -> CSize -> IO CSsize
foreign import ccall unsafe "HsBase.h __hscore_ftruncate"
c_ftruncate :: CInt -> COff -> IO CInt