acadia-newlib/newlib/libc/include
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
..
machine Add arc4random() etc. from OpenBSD 5.8 2016-03-18 12:33:41 +01:00
rpc
sys Add arc4random() etc. from OpenBSD 5.8 2016-03-18 12:33:41 +01:00
_ansi.h * libc/include/_ansi.h: _LONG_LONG_TYPE definition removed. 2014-10-10 14:43:19 +00:00
_newlib_version.h Fix _newlib_version.h logic to support building gcc with newlib. 2016-02-25 15:04:19 -05:00
_syslist.h
alloca.h
ar.h
argz.h
assert.h
complex.h libm/complex: add clog10, clog10f 2016-02-22 14:43:41 -06:00
ctype.h Feature test macros overhaul: ctype.h 2016-03-17 21:08:50 -05:00
dirent.h Feature test macros overhaul: dirent.h 2016-03-17 21:08:51 -05:00
envlock.h
envz.h
errno.h
fastmath.h
fcntl.h
fnmatch.h Feature test macros overhaul: fnmatch.h 2016-03-17 21:08:54 -05:00
getopt.h
glob.h
grp.h Feature test macros overhaul: grp.h 2016-03-17 21:08:56 -05:00
iconv.h
ieeefp.h Remove broken ieeefp.h macros 2016-02-12 11:35:56 -06:00
inttypes.h Fix for pri and scn formats 2015-08-27 12:50:25 +02:00
langinfo.h
libgen.h Rework handling of basename variants 2015-07-06 14:58:51 -05:00
limits.h Feature test macros overhaul: limits.h 2016-03-17 21:08:57 -05:00
locale.h
malloc.h
math.h Feature test macros overhaul: math.h 2016-03-17 21:08:59 -05:00
newlib.h
paths.h
pthread.h Feature test macros overhaul: pthread.h 2016-03-17 21:09:00 -05:00
pwd.h Feature test macros overhaul: pwd.h 2016-03-17 21:09:01 -05:00
reent.h
regdef.h
regex.h
sched.h
search.h
setjmp.h
signal.h Feature test macros overhaul: signal.h 2016-03-17 21:09:03 -05:00
spawn.h
stdatomic.h
stdint.h Improve check for int32_t being long or int 2015-04-29 13:07:17 +02:00
stdio.h Feature test macros overhaul: stdio.h 2016-03-17 21:09:04 -05:00
stdio_ext.h * libc/include/stdio.h (__SNLK): Define. 2014-12-15 18:22:56 +00:00
stdlib.h Add arc4random() etc. from OpenBSD 5.8 2016-03-18 12:33:41 +01:00
string.h Add timingsafe_memcmp() 2016-03-18 12:33:40 +01:00
strings.h Feature test macros overhaul: strings.h 2016-03-17 21:09:09 -05:00
tar.h
termios.h
tgmath.h
threads.h Import <threads.h> from latest FreeBSD. 2015-10-13 17:52:34 -04:00
time.h Feature test macros overhaul: time.h 2016-03-17 21:09:10 -05:00
unctrl.h
unistd.h
utime.h
utmp.h
wchar.h Feature test macros overhaul: wchar.h 2016-03-17 21:09:13 -05:00
wctype.h
wordexp.h