summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@80386.nl>2015-03-10 07:46:06 +0000
committerEd Schouten <ed@80386.nl>2015-03-10 07:46:06 +0000
commit17f5dbef9bf15af43c93fe0662051cb24d4ae4f9 (patch)
treefeed2db15c9506e6ddaf0cc13082149e38b0a5b6 /lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
parent09fb7c6e7a173a1a8bdb7a53438b0c75250491b8 (diff)
downloadbcm5719-llvm-17f5dbef9bf15af43c93fe0662051cb24d4ae4f9.tar.gz
bcm5719-llvm-17f5dbef9bf15af43c93fe0662051cb24d4ae4f9.zip
Add support for arc4random() to random_device.
Nuxi CloudABI (https://github.com/NuxiNL/cloudlibc) does not allow processes to access the global filesystem namespace. This breaks random_device, as it attempts to use /dev/{u,}random. This change adds support for arc4random(), which is present on CloudABI. In my opinion it would also make sense to use arc4random() on other operating systems, such as *BSD and Mac OS X, but I'd rather leave that to the maintainers of the respective platforms. Switching to arc4random() does change the ABI. This change also attempts to make some cleanups to the code. It adds a single #define for every random interface, instead of testing against operating systems explicitly. As discussed, also validate the token argument to be equal to "/dev/urandom" on all systems that only provide pseudo-random numbers. This should cause little to no breakage, as "/dev/urandom" is also the default argument value. Reviewed by: jfb Differential Revision: http://reviews.llvm.org/D8134 llvm-svn: 231764
Diffstat (limited to 'lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud