packages feed

unix 2.6.0.0 → 2.6.0.1

raw patch · 3 files changed

+18/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

System/Posix/Env.hsc view
@@ -38,6 +38,10 @@ import Foreign.Storable import Control.Monad import Data.Maybe (fromMaybe)+#ifdef __GLASGOW_HASKELL__+import GHC.IO.Encoding (getFileSystemEncoding)+import qualified GHC.Foreign as GHC+#endif #if __GLASGOW_HASKELL__ > 700 import System.Posix.Internals (withFilePath, peekFilePath) #elif __GLASGOW_HASKELL__ > 611@@ -53,6 +57,13 @@ peekFilePath = peekCString #endif +newFilePath :: String -> IO CString+#ifdef __GLASGOW_HASKELL__+newFilePath s = getFileSystemEncoding >>= (`GHC.newCString` s)+#else+newFilePath = newCString+#endif+ -- |'getEnv' looks up a variable in the environment.  getEnv :: String -> IO (Maybe String)@@ -137,7 +148,11 @@ -- and is equivalent to @setEnv(key,value,True{-overwrite-})@.  putEnv :: String -> IO ()-putEnv keyvalue = withFilePath keyvalue $ \s ->+putEnv keyvalue = newFilePath keyvalue >>= \s ->+  -- IMPORTANT: Do not free `s` after calling putenv!+  --+  -- According to SUSv2, the string passed to putenv becomes part of the+  -- enviroment.   throwErrnoIfMinus1_ "putenv" (c_putenv s)  foreign import ccall unsafe "putenv"
System/Posix/Signals.hsc view
@@ -299,7 +299,7 @@ raiseSignal :: Signal -> IO () raiseSignal sig = throwErrnoIfMinus1_ "raiseSignal" (c_raise sig) -#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) || defined(netbsd_HOST_OS)+#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(darwin_HOST_OS)) foreign import ccall unsafe "genericRaise"   c_raise :: CInt -> IO CInt #else
unix.cabal view
@@ -1,5 +1,5 @@ name:		unix-version:        2.6.0.0+version:        2.6.0.1 license:	BSD3 license-file:	LICENSE maintainer:	libraries@haskell.org