diff options
author | Ben Gamari <ben@well-typed.com> | 2017-01-23 14:52:36 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-24 16:42:16 -0500 |
commit | 2aaafc8b9788e4a3447a10740479e0e7c0622cda (patch) | |
tree | b9ce8084c8d5f842221ba1c2c1a474542fcc1941 | |
parent | 2cc67adb29b33e15727c6463ed84e43cc159b3a2 (diff) | |
download | haskell-2aaafc8b9788e4a3447a10740479e0e7c0622cda.tar.gz |
Bump Win32 version.
Bump the version of `Win32` to `2.5.0.0` which is a major update and includes
fixes for wrong alignments and wrong 64-bit types. Strangely enough this also
seems to resolve #12713, where `T10858` was failing due to too-low allocations.
The underlying type aliases have changed, so there is a potential
for user programs not to compile anymore, but the types were incorrect.
This also requires a bump in the `directory`, `Cabal`, and `process`
submodules.
Original author: Tamar Christina <tamar@zhox.com>
Test Plan: ./validate
Reviewers: bgamari, RyanGlScott, austin
Subscribers: hvr, RyanGlScott, thomie, #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D2938
-rw-r--r-- | compiler/ghc.cabal.in | 2 | ||||
-rw-r--r-- | compiler/main/SysTools.hs | 8 | ||||
-rw-r--r-- | ghc/ghc-bin.cabal.in | 2 | ||||
m--------- | libraries/Cabal | 0 | ||||
m--------- | libraries/Win32 | 0 | ||||
m--------- | libraries/directory | 0 | ||||
m--------- | libraries/process | 0 | ||||
-rw-r--r-- | testsuite/tests/deriving/perf/all.T | 4 | ||||
-rw-r--r-- | testsuite/timeout/WinCBindings.hsc | 5 |
9 files changed, 12 insertions, 9 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 63276b34db..dea0be5ad1 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -68,7 +68,7 @@ Library hoopl >= 3.10.2 && < 3.11 if os(windows) - Build-Depends: Win32 == 2.3.* + Build-Depends: Win32 >= 2.3 && < 2.6 else if flag(terminfo) Build-Depends: terminfo == 0.4.* diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs index 5bd9fd1f47..67771947ad 100644 --- a/compiler/main/SysTools.hs +++ b/compiler/main/SysTools.hs @@ -85,7 +85,11 @@ import qualified System.Posix.Internals #else /* Must be Win32 */ import Foreign import Foreign.C.String -import qualified System.Win32.Info as Info +#if MIN_VERSION_Win32(2,5,0) +import qualified System.Win32.Types as Win32 +#else +import qualified System.Win32.Info as Win32 +#endif import Control.Exception (finally) import Foreign.Ptr (FunPtr, castPtrToFunPtr) import System.Win32.Types (DWORD, LPTSTR, HANDLE) @@ -1514,7 +1518,7 @@ getFinalPath name = do (fILE_ATTRIBUTE_NORMAL .|. fILE_FLAG_BACKUP_SEMANTICS) Nothing let fnPtr = makeGetFinalPathNameByHandle $ castPtrToFunPtr addr - path <- Info.try "GetFinalPathName" + path <- Win32.try "GetFinalPathName" (\buf len -> fnPtr handle buf len 0) 512 `finally` closeHandle handle return $ Just path diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in index dce6142dce..9c9ca0e246 100644 --- a/ghc/ghc-bin.cabal.in +++ b/ghc/ghc-bin.cabal.in @@ -38,7 +38,7 @@ Executable ghc ghc == @ProjectVersionMunged@ if os(windows) - Build-Depends: Win32 == 2.3.* + Build-Depends: Win32 >= 2.3 && < 2.6 else Build-Depends: unix == 2.7.* diff --git a/libraries/Cabal b/libraries/Cabal -Subproject 7502659b7684e057047c68886df9c061645992c +Subproject 824d0bae1aee2a25cabdcef92e5e1dd470c7dac diff --git a/libraries/Win32 b/libraries/Win32 -Subproject bb9469ece0b882017fa7f3b51e8db1d2985d672 +Subproject 8d3f144a902bd13e1c6192e62ac1b2cf7cef595 diff --git a/libraries/directory b/libraries/directory -Subproject 65d1d85a3fc3373a425a0298d572da9cd9ee3d8 +Subproject 4a4a19d1c46c70ffd9a3e1c4c283e2e16214258 diff --git a/libraries/process b/libraries/process -Subproject 85cc1d17e9550a075003a764a2429d4acde6515 +Subproject 0524859137fc01bdb2a4833fd0aa6b23a48c6b1 diff --git a/testsuite/tests/deriving/perf/all.T b/testsuite/tests/deriving/perf/all.T index a6f9cc9f3c..0c3e9a4d3e 100644 --- a/testsuite/tests/deriving/perf/all.T +++ b/testsuite/tests/deriving/perf/all.T @@ -1,8 +1,6 @@ test('T10858', [compiler_stats_num_field('bytes allocated', [ (wordsize(64), 222312440, 8) ]), - only_ways(['normal']), - when(msys(), expect_broken(12713)) - ], + only_ways(['normal'])], compile, ['-O']) diff --git a/testsuite/timeout/WinCBindings.hsc b/testsuite/timeout/WinCBindings.hsc index 0c4ff3f5b4..a72cdcfafb 100644 --- a/testsuite/timeout/WinCBindings.hsc +++ b/testsuite/timeout/WinCBindings.hsc @@ -259,9 +259,10 @@ foreign import WINDOWS_CCONV unsafe "windows.h WaitForSingleObject" type JOBOBJECTINFOCLASS = CInt type PVOID = Ptr () - -type ULONG_PTR = CUIntPtr type PULONG_PTR = Ptr ULONG_PTR +#if !MIN_VERSION_Win32(2,5,0) +type ULONG_PTR = CUIntPtr +#endif jobObjectExtendedLimitInformation :: JOBOBJECTINFOCLASS jobObjectExtendedLimitInformation = #const JobObjectExtendedLimitInformation |