[commit: ghc] master, wip/deploy-docs, wip/packaging-fail, wip/run-nofib, wip/windows-32bit: base: Depend upon shlwapi on Windows (07d44ed)
git at git.haskell.org
git at git.haskell.org
Thu Mar 21 17:01:39 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branches: master,wip/deploy-docs,wip/packaging-fail,wip/run-nofib,wip/windows-32bit
Link : http://ghc.haskell.org/trac/ghc/changeset/07d44ed144ef06de4b125389f318c1f514eee004/ghc
>---------------------------------------------------------------
commit 07d44ed144ef06de4b125389f318c1f514eee004
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Mar 20 09:16:15 2019 -0400
base: Depend upon shlwapi on Windows
As noted in #16466, `System.Environment.getExecutablePath` depends upon
`PathFileExistsW` which is defined by `shlwapi`.
Fixes #16466.
>---------------------------------------------------------------
07d44ed144ef06de4b125389f318c1f514eee004
libraries/base/base.cabal | 3 ++-
libraries/base/tests/System/T16466.hs | 6 ++++++
libraries/base/tests/System/all.T | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index 4e809e7..630ff91 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -365,7 +365,8 @@ Library
-- mingw32: Unfortunately required because of a resource leak between
-- mingwex and mingw32. the __math_err symbol is defined in
-- mingw32 which is required by mingwex.
- extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex
+ -- shlwapi: provides PathFileExistsW
+ extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex, shlwapi
exposed-modules:
GHC.IO.Encoding.CodePage.API
GHC.IO.Encoding.CodePage.Table
diff --git a/libraries/base/tests/System/T16466.hs b/libraries/base/tests/System/T16466.hs
new file mode 100644
index 0000000..28cb259
--- /dev/null
+++ b/libraries/base/tests/System/T16466.hs
@@ -0,0 +1,6 @@
+import System.Environment
+
+-- Make sure that getExecutablePath works on Windows. See #16466.
+main :: IO ()
+main = () <$ getExecutablePath
+
diff --git a/libraries/base/tests/System/all.T b/libraries/base/tests/System/all.T
index 3cadf35..50ebb59 100644
--- a/libraries/base/tests/System/all.T
+++ b/libraries/base/tests/System/all.T
@@ -7,3 +7,4 @@ test('T5930', normal, compile_and_run, [''])
test('system001', when(opsys("mingw32"), skip), \
compile_and_run, [''])
test('Timeout001', normal, compile_and_run, [''])
+test('T16466', normal, compile_and_run, [''])
More information about the ghc-commits
mailing list