diff options
author | Joey Hess <id@joeyh.name> | 2013-05-10 16:57:21 -0500 |
---|---|---|
committer | Joey Hess <id@joeyh.name> | 2013-05-10 16:57:21 -0500 |
commit | ae6293ae6710b0a7580bc9a0045c92d1d5b87036 (patch) | |
tree | fbd105bed124fb698fdc5bbdf4eb2d9ccd086979 /Utility/TempFile.hs | |
parent | 5d0476bf59674b39fa6bad7e4446b5c741181143 (diff) |
fixup #if 0 stubs to use #ifndef mingw32_HOST_OS
That's needed in files used to build the configure program.
For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type.
I may search and replace it to use the mingw32_HOST_OS thing later.
Diffstat (limited to 'Utility/TempFile.hs')
-rwxr-xr-x | Utility/TempFile.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Utility/TempFile.hs b/Utility/TempFile.hs index e5617d48b..ba7449ba2 100755 --- a/Utility/TempFile.hs +++ b/Utility/TempFile.hs @@ -11,7 +11,7 @@ module Utility.TempFile where import Control.Exception (bracket) import System.IO -#if 0 +#ifndef mingw32_HOST_OS import System.Posix.Process #endif import System.Directory @@ -24,7 +24,7 @@ import System.FilePath - then moving it into place. The temp file is stored in the same - directory as the final file to avoid cross-device renames. -} viaTmp :: (FilePath -> String -> IO ()) -> FilePath -> String -> IO () -#if 0 +#ifndef mingw32_HOST_OS viaTmp a file content = do pid <- getProcessID let tmpfile = file ++ ".tmp" ++ show pid @@ -52,7 +52,7 @@ withTempFile template a = bracket create remove use {- Runs an action with a temp directory, then removes the directory and - all its contents. -} withTempDir :: Template -> (FilePath -> IO a) -> IO a -#if 0 +#ifndef mingw32_HOST_OS withTempDir template = bracket create remove where remove = removeDirectoryRecursive |