-
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
Conversation
@@ -520,7 +520,7 @@ foreign import ccall unsafe "fchown" | |||
-- Note: calls @ftruncate@. | |||
setFdSize :: Fd -> FileOffset -> IO () | |||
setFdSize (Fd fd) off = | |||
throwErrnoIfMinus1_ "setFdSize" (c_ftruncate fd off) | |||
throwErrnoIfMinus1_ "setFdSize" (c_ftruncate fd (fromIntegral off)) |
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... :-/
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
same question as above
@@ -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 comment
The 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' GHC.Conc (Signal)
be used/fixed?
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
why is it necessarily to delay the macro expansion?
Closing as stalled and supposedly superseded by a more modern effort in #205. |
Patches from the GHCJS project.