This is the mail archive of the
mailing list for the newlib project.
Re: [PATCH] Add simple versions of random() and srandom()
- From: Craig Howland <howland at LGSInnovations dot com>
- To: <newlib at sourceware dot org>
- Date: Wed, 23 Mar 2016 10:32:07 -0400
- Subject: Re: [PATCH] Add simple versions of random() and srandom()
- Authentication-results: sourceware.org; auth=none
- References: <1458687116-16115-1-git-send-email-joel at rtems dot org> <56F223E9 dot 7050300 at cygwin dot com>
On 03/23/2016 01:04 AM, Yaakov Selkowitz wrote:
No, the value 4 is actually the right one. At first look I had also thought
that it needed to be 500, but it originated in issue 4 as an X/OPEN UNIX
http://pubs.opengroup.org/onlinepubs/9699919799/functions/random.html), and was
moved to BASE in issue 5. features.h has, in part
On 2016-03-22 17:51, Joel Sherrill wrote:
Prototypes also added for initstate() and setstate() but they
were not implemented.
This should allow Cygwin to remove its own declarations of these functions.
+#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE
#if __MISC_VISIBLE || __XSI_VISIBLE >= 500
#elif (_XOPEN_SOURCE - 0) >= 500
#define __XSI_VISIBLE 500
#elif defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)
#define __XSI_VISIBLE 4
I did not directly check the _XOPEN_SOURCE_EXTENDED, but it sounds right, so 4
does look right.