stub out posix stuff for Windows

This is enough to let the configure program build.
This commit is contained in:
Joey Hess 2013-05-10 15:08:53 -05:00
parent 767a39bd42
commit a05b4619bb
8 changed files with 62 additions and 3 deletions

6
Build/DesktopFile.hs Normal file → Executable file
View file

@ -22,18 +22,24 @@ import Assistant.Install.Menu
import Control.Applicative
import System.Directory
import System.Environment
#if 0
import System.Posix.User
import System.Posix.Files
#endif
import System.FilePath
import Data.Maybe
systemwideInstall :: IO Bool
#if 0
systemwideInstall = isroot <||> destdirset
where
isroot = do
uid <- fromIntegral <$> getRealUserID
return $ uid == (0 :: Int)
destdirset = isJust <$> catchMaybeIO (getEnv "DESTDIR")
#else
systemwideInstall = return False
#endif
inDestDir :: FilePath -> IO FilePath
inDestDir f = do