X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FPosix%2FInternals.hs;h=4a836359834a1d3e8254708d57329e5373121fd2;hb=68871b8dc3e82472e98cecdbf8e629091c83549e;hp=31b4fff755ed164d450fd37ae8a2f5defe05a9fe;hpb=072850565fab361eb7b97ed37b8cdd078e45dd26;p=ghc-base.git diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 31b4fff..4a83635 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -1,5 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} -{-# OPTIONS_GHC -fno-warn-unused-binds #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- @@ -311,6 +310,9 @@ foreign import ccall unsafe "consUtils.h set_console_echo__" foreign import ccall unsafe "consUtils.h get_console_echo__" get_console_echo :: CInt -> IO CInt +foreign import ccall unsafe "consUtils.h is_console__" + is_console :: CInt -> IO CInt + #endif -- --------------------------------------------------------------------------- @@ -393,6 +395,9 @@ foreign import ccall unsafe "HsBase.h __hscore_lstat" foreign import ccall unsafe "HsBase.h __hscore_open" c_open :: CFilePath -> CInt -> CMode -> IO CInt +foreign import ccall safe "HsBase.h __hscore_open" + c_safe_open :: CFilePath -> CInt -> CMode -> IO CInt + foreign import ccall unsafe "HsBase.h read" c_read :: CInt -> Ptr Word8 -> CSize -> IO CSsize