diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-11 15:22:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-11 15:25:59 -0400 |
commit | 0653cfa5a8454d90cfda396ac64fe2f237f6b5c9 (patch) | |
tree | f7caa9897ad0bdfc57805d464a7c5526f6821d5d /Logs | |
parent | bc8878f61615891353c984d18f36ff3fd23a1a90 (diff) |
fix windows build (and make --stop work on windows, incidentially)
The Utility.PID will clean up other code soon.
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Transfer.hs | 20 |
1 files changed, 5 insertions, 15 deletions
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 |