aboutsummaryrefslogtreecommitdiffhomepage
path: root/System
diff options
context:
space:
mode:
authorGravatar simonmar <unknown>2005-08-10 10:07:22 +0000
committerGravatar simonmar <unknown>2005-08-10 10:07:22 +0000
commit6557223273f97f8a03697ffb21449e495afb26c6 (patch)
treeab1eac3400aca5c19a8efcce9ba0c65463b92153 /System
parent95fc2f922dac4e380fe492b0a569723176b464b5 (diff)
[project @ 2005-08-10 10:07:22 by simonmar]
Fix queryFdOption
Diffstat (limited to 'System')
-rw-r--r--System/Posix/IO.hsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/System/Posix/IO.hsc b/System/Posix/IO.hsc
index ca1113b..f859b33 100644
--- a/System/Posix/IO.hsc
+++ b/System/Posix/IO.hsc
@@ -230,7 +230,7 @@ fdOption2Int SynchronousWrites = (#const O_SYNC)
queryFdOption :: Fd -> FdOption -> IO Bool
queryFdOption (Fd fd) opt = do
r <- throwErrnoIfMinus1 "queryFdOption" (c_fcntl_read fd flag)
- return (testBit r (fromIntegral (fdOption2Int opt)))
+ return ((r .&. fdOption2Int opt) /= 0)
where
flag = case opt of
CloseOnExec -> (#const F_GETFD)