acadia-newlib/newlib/libc/include/machine
Sebastian Huber f74cf1350e Add arc4random() etc. from OpenBSD 5.8
According to the OpenBSD man page, "A Replacement Call for Random".  It
offers high quality random numbers derived from input data obtained by
the OpenBSD specific getentropy() system call which is declared in
<unistd.h> and must be implemented for each Newlib port externally.  The
arc4random() functions are used for example in LibreSSL and OpenSSH.

Cygwin provides currently its own implementation of the arc4random
family.  Maybe it makes sense to use this getentropy() implementation:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/crypto/getentropy_win.c?rev=1.4&content-type=text/x-cvsweb-markup

	* libc/include/stdlib.h (arc4random): Declare if __BSD_VISIBLE.
	(arc4random_buf): Likewise.
	(arc4random_uniform): Likewise.
	* libc/include/sys/unistd.h (getentropy): Likewise.
	* libc/include/machine/_arc4random.h: New file.
	* libc/stdlib/arc4random.c: Likewise.
	* libc/stdlib/arc4random.h: Likewise.
	* libc/stdlib/arc4random_uniform.c: Likewise.
	* libc/stdlib/chacha_private.h: Likewise.
	* libc/sys/rtems/include/machine/_arc4random.h: Likewise.
	* libc/stdlib/Makefile.am (EXTENDED_SOURCES): Add arc4random.c
	and arc4random_uniform.c.
	* libc/stdlib/Makefile.in: Regenerate.
2016-03-18 12:33:41 +01:00
..
_arc4random.h Add arc4random() etc. from OpenBSD 5.8 2016-03-18 12:33:41 +01:00
_default_types.h * libc/include/machine/_default_types.h: Define unsigned type using 2014-03-04 08:05:39 +00:00
_types.h 2007-09-07 Patrick Mansfield <patmans@us.ibm.com> 2007-09-07 21:16:25 +00:00
ansi.h 2001-03-02 Jeff Johnston <jjohnstn@redhat.com> 2001-03-02 23:13:04 +00:00
endian.h 2010-06-18 Pavel Pisa <ppisa4lists@pikron.com> 2010-06-18 16:26:25 +00:00
fastmath.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
ieeefp.h Add support for ft32 to newlib. 2015-09-04 14:37:37 -04:00
malloc.h 2002-04-19 Jeff Johnston <jjohnstn@redhat.com> 2002-04-19 19:16:22 +00:00
param.h 2004-05-07 Jeff Johnston <jjohnstn@redhat.com> 2004-05-07 20:39:57 +00:00
setjmp-dj.h 2012-03-09 Jeff Johnston <jjohnstn@redhat.com> 2012-03-09 20:26:39 +00:00
setjmp.h Add support for ARC to newlib 2015-11-12 14:14:17 +01:00
stdlib.h 2002-04-19 Jeff Johnston <jjohnstn@redhat.com> 2002-04-19 19:16:22 +00:00
termios.h 2002-05-28 Jeff Johnston <jjohnstn@redhat.com> 2002-05-28 22:26:36 +00:00
time.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
types.h Merge parts of <sys/time.h> from FreeBSD 2015-03-13 13:17:34 +01:00