aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-31 11:32:01 +0100
committerGravatar Herbert Valerio Riedel <hvr@gnu.org>2016-01-31 11:32:01 +0100
commit176d73e4240bb9d048d6c2d411ff839e379d1245 (patch)
treed0b1019b1c529411399de1d8156460cdb7339d03
parentb54bd5fc4355af6104b80a48353889bbd867ba10 (diff)
Use `open(2)` directly rather than via `__hscore_open()`
As we don't support Windows, there's no benefit in going via `__hscore_open()`
-rw-r--r--System/Posix/IO/Common.hsc6
1 files changed, 4 insertions, 2 deletions
diff --git a/System/Posix/IO/Common.hsc b/System/Posix/IO/Common.hsc
index 8f8ddb9..a838352 100644
--- a/System/Posix/IO/Common.hsc
+++ b/System/Posix/IO/Common.hsc
@@ -1,4 +1,6 @@
-{-# LANGUAGE NondecreasingIndentation, RecordWildCards #-}
+{-# LANGUAGE CApiFFI #-}
+{-# LANGUAGE NondecreasingIndentation #-}
+{-# LANGUAGE RecordWildCards #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE Safe #-}
#else
@@ -182,7 +184,7 @@ open_ str how maybe_mode (OpenFileFlags appendFlag exclusiveFlag nocttyFlag
WriteOnly -> (#const O_WRONLY)
ReadWrite -> (#const O_RDWR)
-foreign import ccall unsafe "__hscore_open"
+foreign import capi unsafe "HsUnix.h open"
c_open :: CString -> CInt -> CMode -> IO CInt
-- |Close this file descriptor. May throw an exception if this is an