git.iko.soy/typeable/entropy
on main help sign in
Merge pull request #63 from TomMD/fix/update-for-latest-cabal-ghc

Fix/update for latest cabal ghc

commitcbacc3ef1097f0b3f4949733dd2d97a1227fca8d authorThomas M. DuBuisson <thomas.dubuisson@gmail.com> dateTue 2 Nov 2021, 07:53 (5 years ago) parentec6ddb603ae01c
2 files changed+7−6
Setup.hs+4−4 entropy.cabal+3−2
Setup.hs+4−4
@@ -26,7 +26,7 @@ main = defaultMainWithHooks hk
2626
2727compileCheck :: FilePath -> String -> String -> String -> IO Bool
2828compileCheck cc testName message sourceCode = do
29− withTempDirectory normal "" testName $ \tmpDir -> do
29+ withTempDirectory normal "" testName $ \tmpDir -> do
3030 writeFile (tmpDir ++ "/" ++ testName ++ ".c") sourceCode
3131 ec <- myRawSystemExitCode normal cc [tmpDir </> testName ++ ".c", "-o", tmpDir ++ "/a","-no-hs-main"]
3232 notice normal $ message ++ show (ec == ExitSuccess)
@@ -54,7 +54,7 @@ checkRDRAND cc lbi = do
5454
5555checkGetrandom :: FilePath -> LocalBuildInfo -> IO LocalBuildInfo
5656checkGetrandom cc lbi = do
57− libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
57+ libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
5858 (unlines [ "#define _GNU_SOURCE"
5959 , "#include <errno.h>"
6060 , "#include <sys/random.h>"
@@ -65,8 +65,8 @@ checkGetrandom cc lbi = do
6565 , " return getrandom(&tmp, sizeof(tmp), GRND_NONBLOCK) != -1;"
6666 , "}"
6767 ])
68− if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
69− else do
68+ if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
69+ else do
7070 syscallGetrandom <- compileCheck cc "testSyscallGetrandom" "Result of syscall getrandom() Test: "
7171 (unlines [ "#define _GNU_SOURCE"
7272 , "#include <errno.h>"
entropy.cabal+3−2
@@ -1,5 +1,6 @@
11name: entropy
2−version: 0.4.1.6
2+
3+version: 0.4.1.7
34description: A mostly platform independent method to obtain cryptographically strong entropy
45 (RDRAND, urandom, CryptAPI, and patches welcome)
56 Users looking for cryptographically strong (number-theoretically
@@ -34,7 +35,7 @@ flag halvm
3435
3536
3637custom-setup
37− setup-depends: Cabal >= 1.10 && < 3.5
38+ setup-depends: Cabal >= 1.10 && < 3.7
3839 , base < 5
3940 , filepath < 1.5
4041 , directory < 1.4