diff options
author | Joey Hess <joey@kitenet.net> | 2013-08-02 12:27:32 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-08-02 12:27:32 -0400 |
commit | 250a25c8572e557772a9973542f9cfca6ac10b9b (patch) | |
tree | 7d4aaa36a7d5b6c3c5e03fb844fb844da4c037d2 /Utility/Path.hs | |
parent | a39c161ab377eed381186bc57953cd59d6188108 (diff) |
get rid of __WINDOWS__, use mingw32_HOST_OS
The latter is harder for me to remember, but avoids build failures in code
used by the configure program.
Diffstat (limited to 'Utility/Path.hs')
-rw-r--r-- | Utility/Path.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Utility/Path.hs b/Utility/Path.hs index 0a9931c46..79e8e8089 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -16,7 +16,7 @@ import Data.List import Data.Maybe import Control.Applicative -#ifdef __WINDOWS__ +#ifdef mingw32_HOST_OS import Data.Char import qualified System.FilePath.Posix as Posix #else @@ -38,7 +38,7 @@ import Utility.UserInfo - no normalization is done. -} absNormPath :: FilePath -> FilePath -> Maybe FilePath -#ifndef __WINDOWS__ +#ifndef mingw32_HOST_OS absNormPath dir path = MissingH.absNormPath dir path #else absNormPath dir path = Just $ combine dir path @@ -183,7 +183,7 @@ searchPath command where indir d = check $ d </> command check f = firstM doesFileExist -#ifdef __WINDOWS__ +#ifdef mingw32_HOST_OS [f, f ++ ".exe"] #else [f] @@ -203,7 +203,7 @@ dotfile file {- Converts a DOS style path to a Cygwin style path. Only on Windows. - Any trailing '\' is preserved as a trailing '/' -} toCygPath :: FilePath -> FilePath -#ifndef __WINDOWS__ +#ifndef mingw32_HOST_OS toCygPath = id #else toCygPath p @@ -226,7 +226,7 @@ toCygPath p - limit. -} fileNameLengthLimit :: FilePath -> IO Int -#ifdef __WINDOWS__ +#ifdef mingw32_HOST_OS fileNameLengthLimit _ = return 255 #else fileNameLengthLimit dir = do |