diff --git a/System/Posix/IO/Common.hsc b/System/Posix/IO/Common.hsc index eb4a721199c848e0c2ff7d7ee809a8329761dd78..abcd19b2b9c1c5665dbf41530de0b3a2e06a280d 100644 --- a/System/Posix/IO/Common.hsc +++ b/System/Posix/IO/Common.hsc @@ -79,11 +79,6 @@ import GHC.IO.Exception import Data.Typeable (cast) #endif -#ifdef __HUGS__ -import Hugs.Prelude (IOException(..), IOErrorType(..)) -import qualified Hugs.IO (handleToFd, openFd) -#endif - #include "HsUnix.h" -- ----------------------------------------------------------------------------- @@ -239,16 +234,6 @@ handleToFd' h h_@Handle__{haType=_,..} = do fdToHandle fd = FD.fdToHandle (fromIntegral fd) #endif -#ifdef __HUGS__ -handleToFd h = do - fd <- Hugs.IO.handleToFd h - return (fromIntegral fd) - -fdToHandle fd = do - mode <- fdGetMode (fromIntegral fd) - Hugs.IO.openFd (fromIntegral fd) False mode True -#endif - -- ----------------------------------------------------------------------------- -- Fd options diff --git a/System/Posix/Process.hsc b/System/Posix/Process.hsc index 42426a3585222fa9f4ab5f132349c84f785df643..72da1c6d8c15a442e71630b684471608508b754b 100644 --- a/System/Posix/Process.hsc +++ b/System/Posix/Process.hsc @@ -78,10 +78,6 @@ import System.Posix.Process.Internals import System.Posix.Process.Common import System.Posix.Internals ( withFilePath ) -#ifdef __HUGS__ -{-# CFILES cbits/HsUnix.c #-} -#endif - -- | @'executeFile' cmd args env@ calls one of the -- @execv*@ family, depending on whether or not the current -- PATH is to be searched for the command, and whether or not an diff --git a/System/Posix/Process/ByteString.hsc b/System/Posix/Process/ByteString.hsc index ee2c9cf364d8f5902f00999a0b489ecd21dfe6e3..64fc71ee6c23418a31163114c42dee42bba57737 100644 --- a/System/Posix/Process/ByteString.hsc +++ b/System/Posix/Process/ByteString.hsc @@ -90,10 +90,6 @@ import qualified Data.ByteString.Char8 as BC import System.Posix.ByteString.FilePath -#ifdef __HUGS__ -{-# CFILES cbits/HsUnix.c #-} -#endif - -- | @'executeFile' cmd args env@ calls one of the -- @execv*@ family, depending on whether or not the current -- PATH is to be searched for the command, and whether or not an diff --git a/System/Posix/Process/Common.hsc b/System/Posix/Process/Common.hsc index ee7310eb8f7c3deb42eb392657fecaf6671e1864..d0d2b093390d908f57424ee39cf0652ef2dde59b 100644 --- a/System/Posix/Process/Common.hsc +++ b/System/Posix/Process/Common.hsc @@ -88,10 +88,6 @@ import GHC.TopHandler ( runIO ) import GHC.IO ( unsafeUnmask, uninterruptibleMask_ ) #endif -#ifdef __HUGS__ -{-# CFILES cbits/HsUnix.c #-} -#endif - -- ----------------------------------------------------------------------------- -- Process environment diff --git a/System/Posix/Signals.hsc b/System/Posix/Signals.hsc index 9119190927b99a37a4832858bd862de16f597b6b..e8fc1c50da7c13da9a3fc392b173f67e55aeafd0 100644 --- a/System/Posix/Signals.hsc +++ b/System/Posix/Signals.hsc @@ -602,16 +602,7 @@ awaitSignal maybe_sigset = do foreign import ccall unsafe "sigsuspend" c_sigsuspend :: Ptr CSigset -> IO CInt -#ifdef __HUGS__ -foreign import ccall unsafe "sigdelset" - c_sigdelset :: Ptr CSigset -> CInt -> IO CInt - -foreign import ccall unsafe "sigfillset" - c_sigfillset :: Ptr CSigset -> IO CInt - -foreign import ccall unsafe "sigismember" - c_sigismember :: Ptr CSigset -> CInt -> IO CInt -#elif defined(darwin_HOST_OS) && __GLASGOW_HASKELL__ < 706 +#if defined(darwin_HOST_OS) && __GLASGOW_HASKELL__ < 706 -- see http://ghc.haskell.org/trac/ghc/ticket/7359#comment:3 -- To be removed when support for GHC 7.4.x is dropped foreign import ccall unsafe "__hscore_sigdelset" @@ -631,7 +622,7 @@ foreign import capi unsafe "signal.h sigfillset" foreign import capi unsafe "signal.h sigismember" c_sigismember :: Ptr CSigset -> CInt -> IO CInt -#endif /* __HUGS__ */ +#endif foreign import ccall unsafe "sigpending" c_sigpending :: Ptr CSigset -> IO CInt diff --git a/System/Posix/Temp.hsc b/System/Posix/Temp.hsc index 349030b0a7cd9148c433ce310834974383235a7c..2d7ca52c048275afaa1ad403bb28d5c87414d070 100644 --- a/System/Posix/Temp.hsc +++ b/System/Posix/Temp.hsc @@ -33,7 +33,7 @@ import System.Posix.IO import System.Posix.Types import System.Posix.Internals (withFilePath, peekFilePath) -#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) +#if defined(__GLASGOW_HASKELL__) foreign import ccall unsafe "HsUnix.h __hscore_mkstemp" c_mkstemp :: CString -> IO CInt #endif @@ -48,7 +48,7 @@ foreign import ccall unsafe "HsUnix.h __hscore_mkstemp" mkstemp :: String -> IO (FilePath, Handle) mkstemp template' = do let template = template' ++ "XXXXXX" -#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) +#if defined(__GLASGOW_HASKELL__) withFilePath template $ \ ptr -> do fd <- throwErrnoIfMinus1 "mkstemp" (c_mkstemp ptr) name <- peekFilePath ptr @@ -114,7 +114,7 @@ mkdtemp template' = do return name #endif -#if (!defined(__GLASGOW_HASKELL__) && !defined(__HUGS__)) || !HAVE_MKDTEMP +#if !defined(__GLASGOW_HASKELL__) || !HAVE_MKDTEMP foreign import ccall unsafe "mktemp" c_mktemp :: CString -> IO CString diff --git a/System/Posix/Temp/ByteString.hsc b/System/Posix/Temp/ByteString.hsc index 61bd7e9acbcd26cff6b76bfed8545ab09d4cdb5b..84ad49ed4f740c57748d98a909e88c2ef9ca5c93 100644 --- a/System/Posix/Temp/ByteString.hsc +++ b/System/Posix/Temp/ByteString.hsc @@ -38,7 +38,7 @@ import System.Posix.Directory (createDirectory) import System.Posix.IO import System.Posix.Types -#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) +#if defined(__GLASGOW_HASKELL__) foreign import ccall unsafe "HsUnix.h __hscore_mkstemp" c_mkstemp :: CString -> IO CInt #endif @@ -53,7 +53,7 @@ foreign import ccall unsafe "HsUnix.h __hscore_mkstemp" mkstemp :: ByteString -> IO (RawFilePath, Handle) mkstemp template' = do let template = template' `B.append` (BC.pack "XXXXXX") -#if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) +#if defined(__GLASGOW_HASKELL__) withFilePath template $ \ ptr -> do fd <- throwErrnoIfMinus1 "mkstemp" (c_mkstemp ptr) name <- peekFilePath ptr @@ -114,7 +114,7 @@ mkdtemp template' = do return name #endif -#if (!defined(__GLASGOW_HASKELL__) && !defined(__HUGS__)) || !HAVE_MKDTEMP +#if !defined(__GLASGOW_HASKELL__) || !HAVE_MKDTEMP foreign import ccall unsafe "mktemp" c_mktemp :: CString -> IO CString