From 0653cfa5a8454d90cfda396ac64fe2f237f6b5c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Feb 2014 15:22:08 -0400 Subject: fix windows build (and make --stop work on windows, incidentially) The Utility.PID will clean up other code soon. --- Logs/Transfer.hs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'Logs') diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index e998a56b1..ebbb153ac 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -17,6 +17,10 @@ import Types.Key import Utility.Metered import Utility.Percentage import Utility.QuickCheck +import Utility.PID +#ifdef mingw32_HOST_OS +import Utility.WinLock +#endif import Data.Time.Clock import Data.Time.Clock.POSIX @@ -24,20 +28,6 @@ import Data.Time import System.Locale import Control.Concurrent -#ifndef mingw32_HOST_OS -import System.Posix.Types (ProcessID) -#else -import System.Win32.Process (ProcessId) -import System.Win32.Process.Current (getCurrentProcessId) -import Utility.WinLock -#endif - -#ifndef mingw32_HOST_OS -type PID = ProcessID -#else -type PID = ProcessId -#endif - {- Enough information to uniquely identify a transfer, used as the filename - of the transfer information file. -} data Transfer = Transfer @@ -231,7 +221,7 @@ startTransferInfo file = TransferInfo #ifndef mingw32_HOST_OS <*> pure Nothing -- pid not stored in file, so omitted for speed #else - <*> (Just <$> getCurrentProcessId) + <*> (Just <$> getPID) #endif <*> pure Nothing -- tid ditto <*> pure Nothing -- not 0; transfer may be resuming -- cgit v1.2.3