Go to file
Jonathan Wakely 58f339fc5e libstdc++: Implement std::random_device::entropy() for other sources
Currently this function only returns a non-zero value for /dev/random
and /dev/urandom. When a hardware instruction such as RDRAND is in use
it should (in theory) be perfectly random and produce 32 bits of entropy
in each 32-bit result. Add a helper function to identify the source of
randomness from the _M_func and _M_file data members, and return a
suitable value when RDRAND or RDSEED is being used.

libstdc++-v3/ChangeLog:

	* src/c++11/random.cc (which_source): New helper function.
	(random_device::_M_getentropy()): Use which_source and return
	suitable values for sources other than device files.
	* testsuite/26_numerics/random/random_device/entropy.cc: New test.
2021-10-19 17:27:06 +01:00
c++tools
config
contrib Daily bump. 2021-10-19 00:16:23 +00:00
fixincludes
gcc rs6000: Guard some x86 intrinsics implementations 2021-10-19 10:36:59 -05:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp Daily bump. 2021-10-19 00:16:23 +00:00
libdecnumber
libffi
libgcc
libgfortran Daily bump. 2021-10-19 00:16:23 +00:00
libgo
libgomp Daily bump. 2021-10-19 00:16:23 +00:00
libiberty Daily bump. 2021-10-18 00:16:27 +00:00
libitm
libobjc
liboffloadmic Make file utf8 valid input. 2021-10-19 16:13:56 +02:00
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: Implement std::random_device::entropy() for other sources 2021-10-19 17:27:06 +01:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Add myself for write after approval 2021-10-19 13:38:04 +02:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.