From cd8e2e4eeb70d22f9a7daa375474d80aa188574b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 15 Feb 2016 11:47:33 -0400 Subject: move old ghc compat code into separate module; eliminate WITH_CLIBS This avoids hsc2hs being run except when building for the old version of ghc. Should speed up builds. --- Command/Fix.hs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'Command') diff --git a/Command/Fix.hs b/Command/Fix.hs index 5565a6837..d87bea358 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -18,11 +18,7 @@ import Annex.Content import Annex.Perms import qualified Annex.Queue import qualified Database.Keys -#ifdef WITH_CLIBS -#ifndef __ANDROID__ import Utility.Touch -#endif -#endif cmd :: Command cmd = notDirect $ noCommit $ withGlobalOptions annexedMatchingOptions $ @@ -90,20 +86,16 @@ makeHardLink file key = do fixSymlink :: FilePath -> FilePath -> CommandPerform fixSymlink file link = do liftIO $ do -#ifdef WITH_CLIBS -#ifndef __ANDROID__ +#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__) -- preserve mtime of symlink mtime <- catchMaybeIO $ TimeSpec . modificationTime <$> getSymbolicLinkStatus file -#endif #endif createDirectoryIfMissing True (parentDir file) removeFile file createSymbolicLink link file -#ifdef WITH_CLIBS -#ifndef __ANDROID__ +#if ! defined(mingw32_HOST_OS) && ! defined(__ANDROID__) maybe noop (\t -> touch file t False) mtime -#endif #endif next $ cleanupSymlink file -- cgit v1.2.3