From: Joey Hess Date: Wed, 2 Aug 2023 15:59:57 +0000 (-0400) Subject: remove support for building with older Win32 X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~36^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=461330c58503a2694bf7b8278a5548f7e7cf5a88;p=git-annex.git remove support for building with older Win32 No need to preserve this since the cabal file depends on the newer one. --- diff --git a/Utility/LockFile/Windows.hs b/Utility/LockFile/Windows.hs index 2ab521e438..64a8ab86d0 100644 --- a/Utility/LockFile/Windows.hs +++ b/Utility/LockFile/Windows.hs @@ -5,7 +5,7 @@ - License: BSD-2-clause -} -{-# LANGUAGE OverloadedStrings, CPP #-} +{-# LANGUAGE OverloadedStrings #-} module Utility.LockFile.Windows ( lockShared, @@ -58,21 +58,12 @@ lockExclusive = openLock fILE_SHARE_NONE openLock :: ShareMode -> LockFile -> IO (Maybe LockHandle) openLock sharemode f = do f' <- convertToWindowsNativeNamespace f -#if MIN_VERSION_Win32(2,13,4) r <- tryNonAsync $ createFile_NoRetry f' gENERIC_READ sharemode security_attributes oPEN_ALWAYS fILE_ATTRIBUTE_NORMAL (maybePtr Nothing) return $ case r of Left _ -> Nothing Right h -> Just h -#else - h <- withTString (fromRawFilePath f') $ \c_f -> - c_CreateFile c_f gENERIC_READ sharemode security_attributes - oPEN_ALWAYS fILE_ATTRIBUTE_NORMAL (maybePtr Nothing) - return $ if h == iNVALID_HANDLE_VALUE - then Nothing - else Just h -#endif where security_attributes = maybePtr Nothing