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.
This commit is contained in:
Joey Hess 2013-05-10 16:57:21 -05:00
parent 6c74a42cc6
commit 763cbda14f
23 changed files with 48 additions and 48 deletions

View file

@ -14,7 +14,7 @@ module Utility.UserInfo (
) where
import Control.Applicative
#if 0
#ifndef mingw32_HOST_OS
import System.Posix.User
import System.Posix.Env
#endif
@ -23,7 +23,7 @@ import System.Posix.Env
-
- getpwent will fail on LDAP or NIS, so use HOME if set. -}
myHomeDir :: IO FilePath
#if 0
#ifndef mingw32_HOST_OS
myHomeDir = myVal ["HOME"] homeDirectory
#else
myHomeDir = error "myHomeDir TODO"
@ -31,7 +31,7 @@ myHomeDir = error "myHomeDir TODO"
{- Current user's user name. -}
myUserName :: IO String
#if 0
#ifndef mingw32_HOST_OS
myUserName = myVal ["USER", "LOGNAME"] userName
#else
myUserName = error "myUserName TODO"
@ -41,14 +41,14 @@ myUserGecos :: IO String
#ifdef __ANDROID__
myUserGecos = return "" -- userGecos crashes on Android
#else
#if 0
#ifndef mingw32_HOST_OS
myUserGecos = myVal [] userGecos
#else
myUserGecos = error "myUserGecos TODO"
#endif
#endif
#if 0
#ifndef mingw32_HOST_OS
myVal :: [String] -> (UserEntry -> String) -> IO String
myVal envvars extract = maybe (extract <$> getpwent) return =<< check envvars
where