Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
fb93e9f7
Commit
fb93e9f7
authored
Jul 11, 2016
by
Mikhail Glushenkov
Committed by
GitHub
Jul 11, 2016
Browse files
Merge pull request #3531 from 23Skidoo/issue-3512
Fix getExecutablePath on *BSD.
parents
87bd885b
a91eeb40
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Compat/ExecutablePath.hs
View file @
fb93e9f7
...
@@ -33,6 +33,7 @@ import Foreign.Marshal.Alloc
...
@@ -33,6 +33,7 @@ import Foreign.Marshal.Alloc
import
Foreign.Ptr
import
Foreign.Ptr
import
Foreign.Storable
import
Foreign.Storable
import
System.Posix.Internals
import
System.Posix.Internals
import
System.Directory
#
endif
#
endif
-- GHC 7.0.* compatibility. 'System.Posix.Internals' in base-4.3.* doesn't
-- GHC 7.0.* compatibility. 'System.Posix.Internals' in base-4.3.* doesn't
...
@@ -174,6 +175,7 @@ getExecutablePath =
...
@@ -174,6 +175,7 @@ getExecutablePath =
-- If argc > 0 then argv[0] is guaranteed by the standard
-- If argc > 0 then argv[0] is guaranteed by the standard
-- to be a pointer to a null-terminated string.
-- to be a pointer to a null-terminated string.
then
peek
p_argv
>>=
peek
>>=
peekFilePath
then
peek
p_argv
>>=
peek
>>=
peekFilePath
>>=
canonicalizePath
else
error
$
"getExecutablePath: "
++
msg
else
error
$
"getExecutablePath: "
++
msg
where
msg
=
"no OS specific implementation and program name couldn't be "
++
where
msg
=
"no OS specific implementation and program name couldn't be "
++
"found in argv"
"found in argv"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment