Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
ab5f7f9d
Commit
ab5f7f9d
authored
Jul 17, 2001
by
sof
Browse files
[project @ 2001-07-17 18:47:52 by sof]
wibble
parent
afd10065
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/main/SysTools.lhs
View file @
ab5f7f9d
...
...
@@ -688,13 +688,14 @@ slash s1 s2 = s1 ++ ('/' : s2)
#if defined(mingw32_TARGET_OS)
getExecDir :: IO (Maybe String)
getExecDir = do let len = 2048
getExecDir = do let len = 2048
-- plenty, PATH_MAX is 512 under Win32.
buf <- mallocArray (fromIntegral len)
ret <- getModuleFileName nullAddr buf len
if ret == 0 then return Nothing
else do s <- peekCString buf
destructArray (fromIntegral len) buf
return (Just (reverse (tail (dropWhile (not . isSlash) (reverse (unDosifyPath s))))))
return (Just (reverse (drop (length "/bin/ghc.exe") (reverse (unDosifyPath n)))))
foreign import stdcall "GetModuleFileNameA" getModuleFileName :: Addr -> CString -> Int32 -> IO Int32
#else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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