diff options
author | Tamar Christina <tamar@zhox.com> | 2016-12-05 21:27:23 +0000 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2016-12-06 07:01:23 +0000 |
commit | b82f71b96660400b4b9fa7f3ccef9df7532bb2d7 (patch) | |
tree | c9dce3ffb9744f9af91bf07288442040309d0b26 /testsuite/timeout | |
parent | 847d229346431483b99adcff12e46c7bf6af15da (diff) | |
download | haskell-b82f71b96660400b4b9fa7f3ccef9df7532bb2d7.tar.gz |
Fix x86 Windows build and testsuite
Summary:
Fix issues preventing x86 GHC to build on Windows and
fix segfault in the testsuite.
Test Plan: ./validate
Reviewers: austin, erikd, simonmar, bgamari
Reviewed By: bgamari
Subscribers: #ghc_windows_task_force, thomie
Differential Revision: https://phabricator.haskell.org/D2789
Diffstat (limited to 'testsuite/timeout')
-rw-r--r-- | testsuite/timeout/WinCBindings.hsc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/timeout/WinCBindings.hsc b/testsuite/timeout/WinCBindings.hsc index 87e4341c17..d9c08ee3a2 100644 --- a/testsuite/timeout/WinCBindings.hsc +++ b/testsuite/timeout/WinCBindings.hsc @@ -314,7 +314,7 @@ foreign import WINDOWS_CCONV unsafe "windows.h CreateProcessW" -> BOOL -> DWORD -> LPVOID -> LPCTSTR -> LPSTARTUPINFO -> LPPROCESS_INFORMATION -> IO BOOL -foreign import WINDOWS_CCONV unsafe "string.h" memset :: Ptr a -> CInt -> CSize -> IO (Ptr a) +foreign import ccall unsafe "string.h" memset :: Ptr a -> CInt -> CSize -> IO (Ptr a) foreign import WINDOWS_CCONV unsafe "windows.h SetInformationJobObject" setInformationJobObject :: HANDLE -> JOBOBJECTINFOCLASS -> LPVOID -> DWORD -> IO BOOL @@ -328,6 +328,7 @@ foreign import WINDOWS_CCONV unsafe "windows.h GetQueuedCompletionStatus" setJobParameters :: HANDLE -> IO BOOL setJobParameters hJob = alloca $ \p_jeli -> do let jeliSize = sizeOf (undefined :: JOBOBJECT_EXTENDED_LIMIT_INFORMATION) + _ <- memset p_jeli 0 $ fromIntegral jeliSize -- Configure all child processes associated with the job to terminate when the -- Last process in the job terminates. This prevent half dead processes and that |