packages feed

entropy 0.3.4.1 → 0.3.5

raw patch · 2 files changed

+32/−5 lines, 2 filesdep ~basesetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Setup.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+import Control.Monad import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Setup@@ -9,6 +11,7 @@ import System.Directory import System.FilePath import System.Exit+import System.IO  main = defaultMainWithHooks hk  where@@ -44,6 +47,30 @@                                 , "   return (!err);"                                 , "}"                                 ])-        ec <- rawSystemExitCode normal cc [tmpDir </> "testRDRAND.c", "-o", tmpDir ++ "/a.o","-c"]+        ec <- myRawSystemExitCode normal cc [tmpDir </> "testRDRAND.c", "-o", tmpDir ++ "/a.o","-c"]         notice normal $ "Result of RDRAND Test: " ++ show (ec == ExitSuccess)         return (ec == ExitSuccess)++myRawSystemExitCode :: Verbosity -> FilePath -> [String] -> IO ExitCode+#if __GLASGOW_HASKELL__ >= 704+-- We know for sure, that if GHC >= 7.4 implies Cabal >= 1.14+myRawSystemExitCode = rawSystemExitCode+#else+-- Legacy branch:+-- We implement our own 'rawSystemExitCode', this will even work if+-- the user happens to have Cabal >= 1.14 installed with GHC 7.0 or+-- 7.2+myRawSystemExitCode verbosity path args = do+    printRawCommandAndArgs verbosity path args+    hFlush stdout+    exitcode <- rawSystem path args+    unless (exitcode == ExitSuccess) $ do+        debug verbosity $ path ++ " returned " ++ show exitcode+    return exitcode+  where+    printRawCommandAndArgs :: Verbosity -> FilePath -> [String] -> IO ()+    printRawCommandAndArgs verbosity path args+      | verbosity >= deafening = print (path, args)+      | verbosity >= verbose = putStrLn $ unwords (path : args)+      | otherwise = return ()+#endif
entropy.cabal view
@@ -1,7 +1,7 @@ name:           entropy-version:        0.3.4.1-description:    A platform independent method to obtain cryptographically strong entropy -                (RDRAND when available anywhere, urandom on nix, CryptAPI on Windows, patches welcome).+version:        0.3.5+description:    A platform independent method to obtain cryptographically strong entropy+                (RDRAND when available anywhere, urandom on nix, CryptAPI on Windows, patches welcome)                 Users looking for cryptographically strong (number-theoretically                 sound) PRNGs should see the 'DRBG' package too. synopsis:       A platform independent entropy source@@ -42,7 +42,7 @@          other-modules: System.EntropyNix   }   other-extensions:    CPP, ForeignFunctionInterface, BangPatterns, ScopedTypeVariables-  build-depends: base == 4.*, bytestring+  build-depends:       base >= 4.3 && < 5, bytestring   default-language:    Haskell2010   if(os(halvm))     cpp-options: -DXEN -DHAVE_RDRAND