rust/src/libstd
bors 528c6f3ed6 Auto merge of #35884 - habnabit:freebsd-arc4rand, r=alexcrichton
Use arc4rand(9) on FreeBSD

From rust-lang-nursery/rand#112:

>After reading through #30691 it seems that there's general agreement that using OS-provided facilities for seeding rust userland processes is fine as long as it doesn't use too much from libc. FreeBSD's `arc4random_buf(3)` is not only a whole lot of libc code, but also not even currently exposed in the libc crate. Fortunately, the mechanism `arc4random_buf(3)` et al. use for getting entropy from the kernel ([`arc4rand(9)`](https://www.freebsd.org/cgi/man.cgi?query=arc4random&apropos=0&sektion=9&manpath=FreeBSD+10.3-RELEASE&arch=default&format=html)) is exposed via `sysctl(3)` with constants that are already in the libc crate.

>I haven't found too much documentation on `KERN_ARND`—it's missing or only briefly described in most of the places that cover sysctl mibs. But, from digging through the kernel source, it appears that the sysctl used in this PR is very close to just calling `arc4rand(9)` directly (with `reseed` set to 0 and no way to change it).

I expected [rand](/rust-lang-nursery/rand) to reply quicker, so I tried submitting it there first. It's been a few weeks with no comment, so I don't know the state of it, but maybe someone will see it here and have an opinion. This is basically the same patch. It pains me to duplicate the code but I guess it hasn't been factored out into just one place yet.
2016-08-25 08:32:19 -07:00
..
collections Remove drop flags from structs and enums implementing Drop. 2016-08-24 13:23:37 +03:00
ffi Auto merge of #35871 - bluss:cstring-new, r=alexcrichton 2016-08-22 08:29:41 -07:00
io Fix links 2016-08-18 15:43:35 +12:00
net std: Stabilize APIs for the 1.12 release 2016-08-19 11:59:56 -07:00
num std: Stabilize APIs for the 1.11.0 release 2016-07-03 10:49:01 -07:00
os std: Fix up stabilization discrepancies 2016-06-23 14:08:11 -07:00
prelude End stdlib module summaries with a full stop. 2016-03-04 17:37:11 -05:00
rand std: restructure rand os code into sys modules 2016-02-17 16:21:32 -08:00
sync std: Stabilize APIs for the 1.12 release 2016-08-19 11:59:56 -07:00
sys Auto merge of #35884 - habnabit:freebsd-arc4rand, r=alexcrichton 2016-08-25 08:32:19 -07:00
thread Add link to replacement function 2016-08-03 23:12:25 +02:00
time std: Clean out old unstable + deprecated APIs 2016-05-30 20:46:32 -07:00
ascii.rs Add a FusedIterator trait. 2016-08-18 12:16:29 -04:00
build.rs rustbuild: make backtraces (RUST_BACKTRACE) optional 2016-07-26 15:21:25 -05:00
Cargo.toml Update gcc crate dependency to 0.3.27. 2016-07-30 15:39:13 -05:00
env.rs Rollup merge of #34941 - qolop:patch-2, r=apasel422 2016-08-14 20:29:47 +03:00
error.rs Implement RefCell::{try_borrow, try_borrow_mut} 2016-08-08 23:59:56 -04:00
fs.rs Rollup merge of #35076 - GuillaumeGomez:file_type_docs, r=steveklabnik 2016-08-05 16:12:53 +02:00
lib.rs Remove drop flags from structs and enums implementing Drop. 2016-08-24 13:23:37 +03:00
macros.rs doc: Mention that writeln! and println! always use LF 2016-07-12 14:39:16 +09:00
memchr.rs Fix a few typos in the code 2016-07-03 10:02:24 +02:00
panic.rs Added a shim around rust_panic to update panic counter 2016-08-10 22:04:41 +05:30
panicking.rs std: Optimize panic::catch_unwind slightly 2016-08-11 11:19:30 -07:00
path.rs Add a FusedIterator trait. 2016-08-18 12:16:29 -04:00
primitive_docs.rs Fix links 2016-08-18 15:43:35 +12:00
process.rs Add doc example for std::process::ExitStatus::success. 2016-07-12 21:32:55 -04:00
rt.rs Added an update_panic_count function to handle access to PANIC_COUNT 2016-08-10 22:04:41 +05:30
rtdeps.rs remove some anys that are no longer necessary 2016-07-30 15:39:13 -05:00