mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
random: range is not portably RAND_MAX [BZ #7003]
On other platforms, RAND_MAX (which is the range of rand(3)) may differ from 2^31-1 (which is the range of random(3)). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
parent
3ee1e0ec5c
commit
354b98cdfd
@ -397,7 +397,7 @@ extern long int a64l (const char *__s)
|
||||
`initstate' and `setstate' functions are those from BSD Unices.
|
||||
The `rand' and `srand' functions are required by the ANSI standard.
|
||||
We provide both interfaces to the same random number generator. */
|
||||
/* Return a random long integer between 0 and RAND_MAX inclusive. */
|
||||
/* Return a random long integer between 0 and 2^31-1 inclusive. */
|
||||
extern long int random (void) __THROW;
|
||||
|
||||
/* Seed the random number generator with the given number. */
|
||||
|
Loading…
Reference in New Issue
Block a user