public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/vineet/arc-port-latest] random: range is not portably RAND_MAX [BZ #7003]
@ 2020-07-09 16:32 Vineet Gupta
  0 siblings, 0 replies; only message in thread
From: Vineet Gupta @ 2020-07-09 16:32 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=354b98cdfd78fc8ca0f6ed7b0e3aa8c311f1deba

commit 354b98cdfd78fc8ca0f6ed7b0e3aa8c311f1deba
Author: John Marshall <John.W.Marshall@glasgow.ac.uk>
Date:   Tue Jun 30 14:16:03 2020 -0400

    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>

Diff:
---
 stdlib/stdlib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index f971df4247..3aa27a9d25 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -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.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-09 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 16:32 [glibc/vineet/arc-port-latest] random: range is not portably RAND_MAX [BZ #7003] Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).