[libcxx-commits] [libcxx] ed85de6 - [libcxx] random_device, use arc4random() on Solaris
Brad Smith via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 6 22:01:07 PDT 2022
Author: Brad Smith
Date: 2022-05-07T00:59:12-04:00
New Revision: ed85de6db44e830b1019815d74aee1b595748b5d
URL: https://github.com/llvm/llvm-project/commit/ed85de6db44e830b1019815d74aee1b595748b5d
DIFF: https://github.com/llvm/llvm-project/commit/ed85de6db44e830b1019815d74aee1b595748b5d.diff
LOG: [libcxx] random_device, use arc4random() on Solaris
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D125068
Added:
Modified:
libcxx/docs/ReleaseNotes.rst
libcxx/include/__config
Removed:
################################################################################
diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index 91a735c268391..cbbe6c06ef40f 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -104,8 +104,8 @@ ABI Changes
``_LIBCPP_ABI_USE_CXX03_NULLPTR_EMULATION`` will not be honoured anymore and there
will be no way to opt back into the C++03 emulation of ``std::nullptr_t``.
-- On FreeBSD, NetBSD and DragonFlyBSD, ``std::random_device`` is now implemented on top of
- ``arc4random()`` instead of reading from ``/dev/urandom``. Any implementation-defined
+- On FreeBSD, NetBSD, DragonFlyBSD and Solaris, ``std::random_device`` is now implemented on
+ top of ``arc4random()`` instead of reading from ``/dev/urandom``. Any implementation-defined
token used when constructing a ``std::random_device`` will now be ignored instead of
interpreted as a file to read entropy from.
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 050e8c82655c7..b6dd32c5c320e 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -351,7 +351,7 @@
// When this option is used, the token passed to `std::random_device`'s
// constructor *must* be "/dev/urandom" -- anything else is an error.
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
- defined(__OpenBSD__) || defined(__DragonFly__)
+ defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__)
# define _LIBCPP_USING_ARC4_RANDOM
#elif defined(__wasi__)
# define _LIBCPP_USING_GETENTROPY
More information about the libcxx-commits
mailing list