Bump Win32 version.
authorBen Gamari <ben@well-typed.com>
Mon, 23 Jan 2017 19:52:36 +0000 (14:52 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 24 Jan 2017 21:42:16 +0000 (16:42 -0500)
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

compiler/ghc.cabal.in
compiler/main/SysTools.hs
ghc/ghc-bin.cabal.in
libraries/Cabal
libraries/Win32
libraries/directory
libraries/process
testsuite/tests/deriving/perf/all.T
testsuite/timeout/WinCBindings.hsc

index 63276b3..dea0be5 100644 (file)
@@ -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.*
index 5bd9fd1..6777194 100644 (file)
@@ -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
index dce6142..9c9ca0e 100644 (file)
@@ -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.*
 
index 7502659..824d0ba 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7502659b7684e057047c68886df9c061645992c6
+Subproject commit 824d0bae1aee2a25cabdcef92e5e1dd470c7dac0
index bb9469e..8d3f144 160000 (submodule)
@@ -1 +1 @@
-Subproject commit bb9469ece0b882017fa7f3b51e8db1d2985d6720
+Subproject commit 8d3f144a902bd13e1c6192e62ac1b2cf7cef595d
index 65d1d85..4a4a19d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 65d1d85a3fc3373a425a0298d572da9cd9ee3d86
+Subproject commit 4a4a19d1c46c70ffd9a3e1c4c283e2e16214258f
index 85cc1d1..0524859 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 85cc1d17e9550a075003a764a2429d4acde65159
+Subproject commit 0524859137fc01bdb2a4833fd0aa6b23a48c6b15
index a6f9cc9..0c3e9a4 100644 (file)
@@ -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'])
index 0c4ff3f..a72cdcf 100644 (file)
@@ -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