MissingH 1.0.1.2 → 1.0.2.0
raw patch · 11 files changed
+43/−42 lines, 11 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- MissingH.cabal +1/−1
- src/Network/Email/Sendmail.hs +1/−1
- src/Network/Utils.hs +6/−4
- src/System/Cmd/Utils.hs +19/−20
- src/System/Daemon.hs +2/−2
- src/System/IO/HVFS.hs +3/−3
- src/System/IO/HVFS/Combinators.hs +1/−1
- src/System/IO/PlafCompat.hs +3/−3
- src/System/IO/StatCompat.hs +3/−3
- src/System/IO/WindowsCompat.hs +2/−2
- src/System/Path.hs +2/−2
MissingH.cabal view
@@ -1,5 +1,5 @@ Name: MissingH-Version: 1.0.1.2+Version: 1.0.2.0 License: GPL Maintainer: John Goerzen <jgoerzen@complete.org> Author: John Goerzen
src/Network/Email/Sendmail.hs view
@@ -33,7 +33,7 @@ Written by John Goerzen, jgoerzen\@complete.org -} -#ifdef mingw32_HOST_OS+#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) module Network.Email.Sendmail where #else
src/Network/Utils.hs view
@@ -1,5 +1,5 @@ {- arch-tag: Network utilities main file-Copyright (C) 2004-2005 John Goerzen <jgoerzen@complete.org>+Copyright (C) 2004-2008 John Goerzen <jgoerzen@complete.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by@@ -17,7 +17,7 @@ -} {- | Module : Network.Utils- Copyright : Copyright (C) 2004-2005 John Goerzen+ Copyright : Copyright (C) 2004-2008 John Goerzen License : GNU GPL, version 2 or above Maintainer : John Goerzen <jgoerzen@complete.org>@@ -38,7 +38,9 @@ import Network.Socket import Network.BSD import System.IO+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import qualified System.Posix.Signals+#endif {- | Sets up the system for networking. Similar to the built-in withSocketsDo (and actually, calls it), but also sets the SIGPIPE@@ -53,7 +55,7 @@ niceSocketsDo :: IO a -> IO a niceSocketsDo func = do-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) -- No signals on Windows anyway System.Posix.Signals.installHandler System.Posix.Signals.sigPIPE@@ -83,7 +85,7 @@ return s showSockAddr :: SockAddr -> IO String-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) showSockAddr (SockAddrUnix x) = return $ "UNIX socket at " ++ x #endif showSockAddr (SockAddrInet port host) =
src/System/Cmd/Utils.hs view
@@ -76,7 +76,7 @@ module System.Cmd.Utils(-- * High-Level Tools PipeHandle(..), safeSystem,-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) forceSuccess, #ifndef __HUGS__ posixRawSystem,@@ -94,7 +94,7 @@ #endif -- * Low-Level Tools PipeMode(..),-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ pOpen, pOpen3, pOpen3Raw #endif@@ -107,10 +107,11 @@ import System.Exit import System.Cmd import System.Log.Logger-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.Posix.IO import System.Posix.Process import System.Posix.Signals+import qualified System.Posix.Signals #endif import System.Posix.Types import System.IO@@ -118,8 +119,6 @@ import Control.Concurrent(forkIO) import Control.Exception(finally) -import qualified System.Posix.Signals- data PipeMode = ReadFromPipe | WriteToPipe logbase :: String@@ -138,7 +137,7 @@ } deriving (Eq, Show) -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Like 'pipeFrom', but returns data in lines instead of just a String. Shortcut for calling lines on the result from 'pipeFrom'.@@ -162,7 +161,7 @@ in do warningM (logbase ++ "." ++ funcname) m fail m -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Read data from a pipe. Returns a Handle and a 'PipeHandle'. @@ -192,7 +191,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Read data from a pipe. Returns a lazy string and a 'PipeHandle'. @@ -210,7 +209,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Write data to a pipe. Returns a 'PipeHandle' and a new Handle to write to.@@ -241,7 +240,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Write data to a pipe. Returns a ProcessID. @@ -260,7 +259,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Like a combination of 'hPipeTo' and 'hPipeFrom'; returns a 3-tuple of ('PipeHandle', Data From Pipe, Data To Pipe).@@ -299,7 +298,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Like a combination of 'pipeTo' and 'pipeFrom'; forks an IO thread to send data to the piped program, and simultaneously returns its output@@ -318,7 +317,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) {- | Uses 'System.Posix.Process.getProcessStatus' to obtain the exit status of the given process ID. If the process terminated normally, does nothing. Otherwise, raises an exception with an appropriate error message.@@ -351,7 +350,7 @@ safeSystem command args = do debugM (logbase ++ ".safeSystem") ("Running: " ++ command ++ " " ++ (show args))-#if defined(__HUGS__) || defined(mingw32_HOST_OS)+#if defined(__HUGS__) || defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__) ec <- rawSystem command args case ec of ExitSuccess -> return ()@@ -365,7 +364,7 @@ Stopped s -> cmdsignalled "safeSystem" command args s #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Invokes the specified command in a subprocess, waiting for the result. Return the result status. Never raises an exception. Only available@@ -407,7 +406,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Invokes the specified command in a subprocess, without waiting for the result. Returns the PID of the subprocess -- it is YOUR responsibility@@ -436,7 +435,7 @@ warningM (logbase ++ "." ++ funcname) errormsg ioError e -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ cmdsignalled :: String -> FilePath -> [String] -> Signal -> IO a cmdsignalled funcname command args failcode = do@@ -448,7 +447,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Open a pipe to the specified command. @@ -488,7 +487,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Runs a command, redirecting things to pipes. @@ -514,7 +513,7 @@ #endif #endif -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) #ifndef __HUGS__ {- | Runs a command, redirecting things to pipes.
src/System/Daemon.hs view
@@ -44,12 +44,12 @@ module System.Daemon ( -#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) detachDaemon #endif ) where-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.Posix.Process import System.Posix.IO
src/System/IO/HVFS.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, TypeSynonymInstances #-} {- arch-tag: HVFS main file Copyright (C) 2004-2005 John Goerzen <jgoerzen@complete.org> @@ -307,7 +307,7 @@ vRemoveFile _ = removeFile vRenameFile _ = renameFile vGetFileStatus _ fp = getFileStatus fp >>= return . HVFSStatEncap-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) vGetSymbolicLinkStatus _ fp = getSymbolicLinkStatus fp >>= return . HVFSStatEncap #else -- No symlinks on Windows; just get the file status directly@@ -315,7 +315,7 @@ #endif vGetModificationTime _ = getModificationTime-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) vCreateSymbolicLink _ = createSymbolicLink vReadSymbolicLink _ = readSymbolicLink vCreateLink _ = createLink
src/System/IO/HVFS/Combinators.hs view
@@ -40,7 +40,7 @@ import System.IO.Error import System.IO.HVFS import System.IO.HVFS.InstanceHelpers (getFullPath)-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.Posix.Files -- This actually needed? -Wall doesn't seem to think -- so, but I'm not sure... #endif
src/System/IO/PlafCompat.hs view
@@ -36,7 +36,7 @@ module System.IO.PlafCompat (nullFileName,-#ifdef mingw32_HOST_OS+#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) module System.IO.WindowsCompat, #else module System.Posix.Files,@@ -45,7 +45,7 @@ where import System.Posix.Types-#ifdef mingw32_HOST_OS+#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.IO.WindowsCompat #else import System.Posix.Files@@ -55,7 +55,7 @@ -} nullFileName :: String-#ifdef mingw32_HOST_OS+#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) nullFileName = "NUL:" #else nullFileName = "/dev/null"
src/System/IO/StatCompat.hs view
@@ -36,12 +36,12 @@ where import System.Posix.Types import System.Posix.Consts-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.Posix.Files(intersectFileModes) #endif import Data.Bits ((.&.)) -#ifdef mingw32_HOST_OS+#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) type LinkCount = Int type UserID = Int type GroupID = Int@@ -74,7 +74,7 @@ isSymbolicLink = sc_helper symbolicLinkMode isSocket = sc_helper socketMode -#ifdef mingw32_HOST_OS+#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) intersectFileModes :: FileMode -> FileMode -> FileMode intersectFileModes m1 m2 = m1 .&. m2 #endif
src/System/IO/WindowsCompat.hs view
@@ -44,7 +44,7 @@ Common usage might be like this: >import System.Posix.Types->#ifdef mingw32_HOST_OS+>#if (defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) >import System.IO.WindowsCompat >#else >import System.Posix.Files@@ -56,7 +56,7 @@ -} module System.IO.WindowsCompat-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) where #else (module System.IO.StatCompat, module System.IO.WindowsCompat)
src/System/Path.hs view
@@ -43,7 +43,7 @@ where import Data.List import Data.List.Utils-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) import System.Posix.Files import System.Posix.Directory (createDirectory) import System.Posix.Temp@@ -111,7 +111,7 @@ The name of the directory created will be returned. -} mktmpdir :: String -> IO String-#ifndef mingw32_HOST_OS+#if !(defined(mingw32_HOST_OS) || defined(mingw32_TARGET_OS) || defined(__MINGW32__)) mktmpdir x = do y <- mkstemp x let (dirname, h) = y