Skip to content
Snippets Groups Projects
Commit 2aaafc8b authored by Ben Gamari's avatar Ben Gamari
Browse files

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
parent 2cc67adb
No related branches found
No related tags found
No related merge requests found
......@@ -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.*
......
......@@ -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
......
......@@ -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.*
......
Subproject commit 7502659b7684e057047c68886df9c061645992c6
Subproject commit 824d0bae1aee2a25cabdcef92e5e1dd470c7dac0
Subproject commit bb9469ece0b882017fa7f3b51e8db1d2985d6720
Subproject commit 8d3f144a902bd13e1c6192e62ac1b2cf7cef595d
Subproject commit 65d1d85a3fc3373a425a0298d572da9cd9ee3d86
Subproject commit 4a4a19d1c46c70ffd9a3e1c4c283e2e16214258f
Subproject commit 85cc1d17e9550a075003a764a2429d4acde65159
Subproject commit 0524859137fc01bdb2a4833fd0aa6b23a48c6b15
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'])
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment