-
Notifications
You must be signed in to change notification settings - Fork 92
GHCJS patches. #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHCJS patches. #111
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -316,7 +316,7 @@ mode2Int SeekFromEnd = (#const SEEK_END) | |
-- | May throw an exception if this is an invalid descriptor. | ||
fdSeek :: Fd -> SeekMode -> FileOffset -> IO FileOffset | ||
fdSeek (Fd fd) mode off = | ||
throwErrnoIfMinus1 "fdSeek" (Base.c_lseek fd off (mode2Int mode)) | ||
throwErrnoIfMinus1 "fdSeek" (fmap fromIntegral $ Base.c_lseek fd (fromIntegral off) (mode2Int mode)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question as above |
||
|
||
-- ----------------------------------------------------------------------------- | ||
-- Locking | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{-# LANGUAGE CApiFFI #-} | ||
{-# LANGUAGE Trustworthy #-} | ||
{-# LANGUAGE CPP #-} | ||
|
||
module System.Posix.Process.Internals ( | ||
pPrPr_disableITimers, c_execvpe, | ||
|
@@ -9,7 +10,12 @@ import Foreign | |
import Foreign.C | ||
import System.Exit | ||
import System.IO.Error | ||
|
||
#ifdef ghcjs_HOST_OS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems the wrong place to kludge this around; why can't ghcjs' |
||
type Signal = CInt | ||
#else | ||
import GHC.Conc (Signal) | ||
#endif | ||
|
||
-- | The exit status of a process | ||
data ProcessStatus | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -432,11 +432,10 @@ installHandler :: Signal | |
-> Maybe SignalSet -- ^ other signals to block | ||
-> IO Handler -- ^ old handler | ||
|
||
#ifdef __PARALLEL_HASKELL__ | ||
##if defined(__PARALLEL_HASKELL__) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is it necessarily to delay the macro expansion? |
||
installHandler = | ||
error "installHandler: not available for Parallel Haskell" | ||
#else | ||
|
||
##else | ||
installHandler sig handler _maybe_mask = do | ||
ensureIOManagerIsRunning -- for the threaded RTS | ||
|
||
|
@@ -524,7 +523,7 @@ unmarshalSigInfo fp = do | |
siginfoError = Errno errno, | ||
siginfoSpecific = extra } | ||
|
||
#endif /* !__PARALLEL_HASKELL__ */ | ||
##endif /* !__PARALLEL_HASKELL__ */ | ||
|
||
-- ----------------------------------------------------------------------------- | ||
-- Alarms | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this impedance mismatch occur? I'm reluctant to use a non-statically checked
fromIntegral
conversion which have been a common source of fileoffset overflow bugs... :-/