acadia-newlib/newlib/libc/include/sys
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
..
_default_fcntl.h Feature test macros overhaul: fcntl.h 2016-03-17 21:08:53 -05:00
_intsup.h Extend _intsup.h to support 16-bit and 20-bit pointers. 2015-10-19 14:48:30 +01:00
_sigset.h FreeBSD compatibility for <sys/select.h> 2015-12-14 15:39:44 +01:00
_stdint.h Add <sys/_stdint.h> for FreeBSD compatibility 2015-04-23 21:57:10 +02:00
_timespec.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
_timeval.h Merge parts of <sys/time.h> from FreeBSD 2015-03-13 13:17:34 +01:00
_types.h 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de> 2013-10-15 17:38:32 +00:00
cdefs.h Feature test macros overhaul: sys/features.h 2016-03-17 21:06:40 -05:00
config.h Feature test macros overhaul: sys/features.h 2016-03-17 21:06:40 -05:00
custom_file.h 2007-02-01 Joel Schopp <jschopp@austin.ibm.com> 2007-02-01 16:33:05 +00:00
dir.h * libc/include/sys/dir.h: New BSD-compatibility header. 2010-08-11 18:14:54 +00:00
dirent.h 2005-10-04 James E Wilson <wilson@specifix.com> 2005-10-04 20:47:39 +00:00
errno.h * libc/include/sys/errno.h: Fix comments. 2014-07-14 13:40:17 +00:00
fcntl.h 2007-11-15 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 18:49:17 +00:00
features.h Feature test macros overhaul: sys/features.h 2016-03-17 21:06:40 -05:00
file.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
iconvnls.h 2004-09-13 Artem B. Bityuckiy <dedekind@oktetlabs.ru> 2004-09-13 17:10:20 +00:00
lock.h 2008-12-11 Craig Howland <howland@LGSInnovations.com> 2008-12-11 17:27:56 +00:00
param.h Move fd_stuff from sys/types.h to sys/select.h 2015-12-07 16:28:22 +01:00
queue.h * libc/sys/rtems/sys/queue.h: Delete file. 2013-04-16 10:25:16 +00:00
reent.h Add _REENT_INIT_PTR_ZEROED() 2015-12-14 15:44:28 +01:00
resource.h 2014-11-23 Joel Sherrill <joel.sherrill@oarcorp.com> 2014-11-24 14:12:32 +00:00
sched.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
select.h Feature test macros overhaul: sys/select.h 2016-03-17 21:09:15 -05:00
signal.h Feature test macros overhaul: signal.h 2016-03-17 21:09:03 -05:00
stat.h Feature test macros overhaul: sys/stat.h 2016-03-17 21:09:16 -05:00
stdio.h * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos. 2009-01-08 00:01:33 +00:00
string.h 2005-01-24 Jeff Johnston <jjohnstn@redhat.com> 2005-01-24 18:46:09 +00:00
syslimits.h * libc/include/langinfo.h: New file. 2002-08-23 01:56:05 +00:00
time.h Feature test macros overhaul: sys/time.h 2016-03-17 21:09:18 -05:00
timeb.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
times.h Throughout, run newlib with -Wall -Werror option and fix bugs and 2012-08-08 11:04:18 +00:00
timespec.h Add and use latest <sys/timespec.h> from FreeBSD 2015-03-11 15:45:38 +01:00
tree.h Import <sys/tree.h> from FreeBSD 2015-04-23 21:57:06 +02:00
types.h Guard ssize_t definition by _SSIZE_T_DECLARED 2016-03-18 12:28:55 +01:00
unistd.h Add arc4random() etc. from OpenBSD 5.8 2016-03-18 12:33:41 +01:00
utime.h import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00
wait.h Fix comment in sys/wait.h 2015-05-28 16:40:43 +02:00