aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Files.hsc
diff options
context:
space:
mode:
authorGravatar Ian Lynagh <igloo@earth.li>2007-04-04 15:59:30 +0000
committerGravatar Ian Lynagh <igloo@earth.li>2007-04-04 15:59:30 +0000
commit961ff2adbf3a9243ddcfabc7dc328393ca47f1fa (patch)
treeaf2c01f99be33c8bf3dfb9ec01c3f0e517069896 /System/Posix/Files.hsc
parent9d6c0795ddb0df2ef08685e03ae4d749b478e029 (diff)
Don't use Fd/FD in foreign decls
Using CInt makes it much easier to verify that it is right, and we won't get caught out by possible newtype switches between CInt/Int.
Diffstat (limited to 'System/Posix/Files.hsc')
-rw-r--r--System/Posix/Files.hsc8
1 files changed, 4 insertions, 4 deletions
diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc
index 7b7c8fc..64e889b 100644
--- a/System/Posix/Files.hsc
+++ b/System/Posix/Files.hsc
@@ -220,11 +220,11 @@ setFileMode name m =
--
-- Note: calls @fchmod@.
setFdMode :: Fd -> FileMode -> IO ()
-setFdMode fd m =
+setFdMode (Fd fd) m =
throwErrnoIfMinus1_ "setFdMode" (c_fchmod fd m)
foreign import ccall unsafe "fchmod"
- c_fchmod :: Fd -> CMode -> IO CInt
+ c_fchmod :: CInt -> CMode -> IO CInt
-- | @setFileCreationMask mode@ sets the file mode creation mask to @mode@.
-- Modes set by this operation are subtracted from files and directories upon
@@ -685,9 +685,9 @@ foreign import ccall unsafe "pathconf"
--
-- Note: calls @fpathconf@.
getFdPathVar :: Fd -> PathVar -> IO Limit
-getFdPathVar fd v =
+getFdPathVar (Fd fd) v =
throwErrnoIfMinus1 "getFdPathVar" $
c_fpathconf fd (pathVarConst v)
foreign import ccall unsafe "fpathconf"
- c_fpathconf :: Fd -> CInt -> IO CLong
+ c_fpathconf :: CInt -> CInt -> IO CLong