diff options
author | Joel Sherrill <joel@rtems.org> | 2016-03-22 17:50:48 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2016-03-28 22:39:50 -0500 |
commit | ecf453f9635fb278cff4d4bae21a1e249313b817 (patch) | |
tree | 691716a58754527b45dd04f53f36731b12596899 /newlib/libc/include/stdlib.h | |
parent | a0c477242996403344a0b3c46e6d4645a3fa672c (diff) | |
download | cygnal-ecf453f9635fb278cff4d4bae21a1e249313b817.tar.gz cygnal-ecf453f9635fb278cff4d4bae21a1e249313b817.tar.bz2 cygnal-ecf453f9635fb278cff4d4bae21a1e249313b817.zip |
Add simple versions of random() and srandom()
Prototypes also added for initstate() and setstate() but they
were not implemented in the shared newlib code.
* newlib/libc/include/cygwin/stdlib.h: Prototypes added.
* winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed.
* newlib/libc/stdlib/random.c: New file.
* newlib/libc/machine/epiphany/machine/stdlib.h: Removed
* newlib/libc/stdlib/Makefile.am: Added random.c.
* newlib/libc/stdlib/stdlib.tex: Added random.def.
* newlib/libc/stdlib/Makefile.in: Regenerated.
Diffstat (limited to 'newlib/libc/include/stdlib.h')
-rw-r--r-- | newlib/libc/include/stdlib.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 363b7df4b..3194d6bc5 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -226,6 +226,12 @@ unsigned short * _VOID _EXFUN(srand48,(long)); _VOID _EXFUN(_srand48_r,(struct _reent *, long)); #endif /* __SVID_VISIBLE || __XSI_VISIBLE */ +#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE +char * _EXFUN(initstate,(unsigned, char *, size_t)); +long _EXFUN(random,(_VOID)); +char * _EXFUN(setstate,(char *)); +_VOID _EXFUN(srandom,(unsigned)); +#endif #if __ISO_C_VISIBLE >= 1999 long long _EXFUN(atoll,(const char *__nptr)); #endif |