From 176d73e4240bb9d048d6c2d411ff839e379d1245 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sun, 31 Jan 2016 11:32:01 +0100 Subject: Use `open(2)` directly rather than via `__hscore_open()` As we don't support Windows, there's no benefit in going via `__hscore_open()` --- System/Posix/IO/Common.hsc | 6 ++++-- 1 file 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 -- cgit v1.2.3