New patches: [simplify de/encoding on Windows Ben Franksen **20250110095656 Ignore-this: 122c17e9d6b73c5ae1394147f54a927dc2ed23663853011998e8baebb433b3b5ce3f328a28a90da6 Since version 2.5 Win32 had System.Win32.Encoding which offers the required FFI calls. ] hunk ./darcs.cabal 411 - build-depends: Win32 >= 2.4.0 && < 2.14, + build-depends: Win32 >= 2.5.0 && < 2.15, hunk ./src/Darcs/Util/Encoding/Win32.hs 24 -{-# LANGUAGE CPP, ForeignFunctionInterface #-} hunk ./src/Darcs/Util/Encoding/Win32.hs 30 +import qualified Data.ByteString as B ( ByteString, useAsCStringLen ) hunk ./src/Darcs/Util/Encoding/Win32.hs 32 -import qualified Data.ByteString as B - ( ByteString, useAsCStringLen ) -import Foreign ( castPtr, allocaArray0 ) -import Foreign.C - ( CInt(..), peekCWStringLen, withCWStringLen ) -import System.Win32 - ( CodePage, nullPtr, getConsoleCP, getACP - , LPCSTR, LPWSTR, LPCWSTR, LPBOOL, DWORD ) - -#include +import Foreign ( allocaArray0, castPtr ) +import Foreign.C ( peekCWStringLen, withCWStringLen ) +import System.Win32 ( CodePage, nullPtr ) +import System.Win32.Encoding + ( getCurrentCodePage + , multiByteToWideChar + , wideCharToMultiByte + ) hunk ./src/Darcs/Util/Encoding/Win32.hs 44 -encode str = getCodePage >>= flip unicodeToCodePage str +encode str = getCurrentCodePage >>= flip unicodeToCodePage str hunk ./src/Darcs/Util/Encoding/Win32.hs 48 -decode str = getCodePage >>= flip codePageToUnicode str +decode str = getCurrentCodePage >>= flip codePageToUnicode str hunk ./src/Darcs/Util/Encoding/Win32.hs 53 -foreign import WINDOWS_CCONV "WideCharToMultiByte" wideCharToMultiByte - :: CodePage -> DWORD -> LPCWSTR -> CInt -> LPCSTR -> CInt - -> LPCSTR -> LPBOOL -> IO CInt - hunk ./src/Darcs/Util/Encoding/Win32.hs 63 -foreign import WINDOWS_CCONV "MultiByteToWideChar" multiByteToWideChar - :: CodePage -> DWORD -> LPCSTR -> CInt -> LPWSTR -> CInt -> IO CInt - hunk ./src/Darcs/Util/Encoding/Win32.hs 71 - -getCodePage :: IO CodePage -getCodePage = do - conCP <- getConsoleCP - if conCP > 0 - then return conCP - else getACP - Context: [exclude certain versions of directory dependency only on windows Ben Franksen **20241012212249 Ignore-this: 265d0bf2d75afc200fa1d8e1d6d74b7b4f80f0282c95f43d6207f8773c7eccdd8638ebe3f43a84ef The bug in the directory package that forces us to exclude these versions appears only on windows. This makes it possible to build darcs with stack against current stackage nightly, hopefully allowing darcs to get back into stackage and afterwards back into debian. ] [resolve issue2721 by excluding certain versions of directory package Ben Franksen **20240520062804 Ignore-this: 67331fd6560d9665f1c7cdb58ffdd6de3e02b6e26e64779cdd127aa7aefbd1ce2b8d8cc9a559c093 Versions 1.3.8 up to 1.3.8.4 of the directory package have a bug in their implementation of copyFile on Windows. ] [TAG 2.18.1 Ganesh Sittampalam **20240225173219 Ignore-this: dc3a92eafcab9d4fa9f53b1811d4c99d330615a8c202bff1b77f44d551d21684eee81e96c69be62b ] Patch bundle hash: 1bbb736d862aa219ba637a6101fcf1e62760fd71