git.iko.soy/typeable/entropy
on main help sign in
Merge pull request #63 from TomMD/fix/update-for-latest-cabal-ghc
cbacc3eThomas M. DuBuisson
Setup.hs+4−4
@@ -26,7 +26,7 @@ main = defaultMainWithHooks hk
26
26
27compileCheck :: FilePath -> String -> String -> String -> IO Bool
27compileCheck :: FilePath -> String -> String -> String -> IO Bool
28compileCheck cc testName message sourceCode = do
28compileCheck cc testName message sourceCode = do
29− withTempDirectory normal "" testName $ \tmpDir -> do
29+ withTempDirectory normal "" testName $ \tmpDir -> do
30 writeFile (tmpDir ++ "/" ++ testName ++ ".c") sourceCode
30 writeFile (tmpDir ++ "/" ++ testName ++ ".c") sourceCode
31 ec <- myRawSystemExitCode normal cc [tmpDir </> testName ++ ".c", "-o", tmpDir ++ "/a","-no-hs-main"]
31 ec <- myRawSystemExitCode normal cc [tmpDir </> testName ++ ".c", "-o", tmpDir ++ "/a","-no-hs-main"]
32 notice normal $ message ++ show (ec == ExitSuccess)
32 notice normal $ message ++ show (ec == ExitSuccess)
@@ -54,7 +54,7 @@ checkRDRAND cc lbi = do
54
54
55checkGetrandom :: FilePath -> LocalBuildInfo -> IO LocalBuildInfo
55checkGetrandom :: FilePath -> LocalBuildInfo -> IO LocalBuildInfo
56checkGetrandom cc lbi = do
56checkGetrandom cc lbi = do
57− libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
57+ libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
58 (unlines [ "#define _GNU_SOURCE"
58 (unlines [ "#define _GNU_SOURCE"
59 , "#include <errno.h>"
59 , "#include <errno.h>"
60 , "#include <sys/random.h>"
60 , "#include <sys/random.h>"
@@ -65,8 +65,8 @@ checkGetrandom cc lbi = do
65 , " return getrandom(&tmp, sizeof(tmp), GRND_NONBLOCK) != -1;"
65 , " return getrandom(&tmp, sizeof(tmp), GRND_NONBLOCK) != -1;"
66 , "}"
66 , "}"
67 ])
67 ])
68− if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
68+ if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
69− else do
69+ else do
70 syscallGetrandom <- compileCheck cc "testSyscallGetrandom" "Result of syscall getrandom() Test: "
70 syscallGetrandom <- compileCheck cc "testSyscallGetrandom" "Result of syscall getrandom() Test: "
71 (unlines [ "#define _GNU_SOURCE"
71 (unlines [ "#define _GNU_SOURCE"
72 , "#include <errno.h>"
72 , "#include <errno.h>"
entropy.cabal+3−2
@@ -1,5 +1,6 @@
1name: entropy
1name: entropy
2+
2−version: 0.4.1.6
3+version: 0.4.1.7
3description: A mostly platform independent method to obtain cryptographically strong entropy
4description: A mostly platform independent method to obtain cryptographically strong entropy
4 (RDRAND, urandom, CryptAPI, and patches welcome)
5 (RDRAND, urandom, CryptAPI, and patches welcome)
5 Users looking for cryptographically strong (number-theoretically
6 Users looking for cryptographically strong (number-theoretically
@@ -34,7 +35,7 @@ flag halvm
34
35
35
36
36custom-setup
37custom-setup
37− setup-depends: Cabal >= 1.10 && < 3.5
38+ setup-depends: Cabal >= 1.10 && < 3.7
38 , base < 5
39 , base < 5
39 , filepath < 1.5
40 , filepath < 1.5
40 , directory < 1.4
41 , directory < 1.4