[commit: packages/Win32] Mistuke-fix-build, depend-os-windows, fix-appveyor-curl-ussue, master, win32-2.5.4.1-ghc-8.2, win32-prepare-release-2.4.0.0: Adds getLongPathName binding (07d2c09)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:27:33 UTC 2017


Repository : ssh://git@git.haskell.org/Win32

On branches: Mistuke-fix-build,depend-os-windows,fix-appveyor-curl-ussue,master,win32-2.5.4.1-ghc-8.2,win32-prepare-release-2.4.0.0
Link       : http://git.haskell.org/packages/Win32.git/commitdiff/07d2c0947e4f99e9a60bbb11820bdbc8234efda1

>---------------------------------------------------------------

commit 07d2c0947e4f99e9a60bbb11820bdbc8234efda1
Author: Nick Partridge <nkpart at gmail.com>
Date:   Wed Jul 20 11:29:57 2016 +1000

    Adds getLongPathName binding


>---------------------------------------------------------------

07d2c0947e4f99e9a60bbb11820bdbc8234efda1
 System/Win32/Info.hsc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/System/Win32/Info.hsc b/System/Win32/Info.hsc
index 3d725dd..536744f 100644
--- a/System/Win32/Info.hsc
+++ b/System/Win32/Info.hsc
@@ -119,6 +119,12 @@ getFullPathName name = do
     try "getFullPathName"
       (\buf len -> c_GetFullPathName c_name len buf nullPtr) 512
 
+getLongPathName :: FilePath -> IO FilePath
+getLongPathName name = do
+  withTString name $ \ c_name ->
+    try "getLongPathName"
+      (c_GetLongPathName c_name) 512
+
 searchPath :: Maybe String -> FilePath -> String -> IO (Maybe FilePath)
 searchPath path filename ext =
   maybe ($ nullPtr) withTString path $ \p_path ->
@@ -161,6 +167,9 @@ foreign import WINDOWS_CCONV unsafe "GetTempPathW"
 foreign import WINDOWS_CCONV unsafe "GetFullPathNameW"
   c_GetFullPathName :: LPCTSTR -> DWORD -> LPTSTR -> Ptr LPTSTR -> IO DWORD
 
+foreign import WINDOWS_CCONV unsafe "GetLongPathNameW"
+  c_GetLongPathName :: LPCTSTR -> LPTSTR -> DWORD -> IO DWORD
+
 foreign import WINDOWS_CCONV unsafe "SearchPathW"
   c_SearchPath :: LPCTSTR -> LPCTSTR -> LPCTSTR -> DWORD -> LPTSTR -> Ptr LPTSTR
                -> IO DWORD



More information about the ghc-commits mailing list