diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-11-04 15:51:37 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-11-09 14:40:33 +0000 |
commit | 3439657b02869299685d259c3a77aa38714565b7 (patch) | |
tree | 1dab70303e55e7101cdb6bde499de3239cda0cfc /libstdc++-v3/config.h.in | |
parent | 8d2d0a6c4391e462555db6d33b2cc00f3da0932f (diff) | |
download | gcc-3439657b02869299685d259c3a77aa38714565b7.zip gcc-3439657b02869299685d259c3a77aa38714565b7.tar.gz gcc-3439657b02869299685d259c3a77aa38714565b7.tar.bz2 |
libstdc++: Support getentropy and arc4random in std::random_device
This adds additional "getentropy" and "arc4random" tokens to
std::random_device. The former is supported on Glibc and OpenBSD (and
apparently wasm), and the latter is supported on various BSDs.
libstdc++-v3/ChangeLog:
* acinclude.m4 (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
Define.
* configure.ac (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
Use them.
* config.h.in: Regenerate.
* configure: Regenerate.
* src/c++11/random.cc (random_device): Add getentropy and
arc4random as sources.
* testsuite/26_numerics/random/random_device/cons/token.cc:
Check new tokens.
* testsuite/26_numerics/random/random_device/entropy.cc:
Likewise.
Diffstat (limited to 'libstdc++-v3/config.h.in')
-rw-r--r-- | libstdc++-v3/config.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 228a758..420021f 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -9,6 +9,9 @@ /* Define to 1 if you have the `aligned_alloc' function. */ #undef HAVE_ALIGNED_ALLOC +/* Define if arc4random is available in <stdlib.h>. */ +#undef HAVE_ARC4RANDOM + /* Define to 1 if you have the <arpa/inet.h> header file. */ #undef HAVE_ARPA_INET_H @@ -132,6 +135,9 @@ /* Define to 1 if you have the `frexpl' function. */ #undef HAVE_FREXPL +/* Define if getentropy is available in <unistd.h>. */ +#undef HAVE_GETENTROPY + /* Define if _Unwind_GetIPInfo is available. */ #undef HAVE_GETIPINFO |