This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][BZ #7003] Fix description of random according to POSIX
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: libc-alpha at sourceware dot org
- Date: Sat, 12 Oct 2013 20:55:21 +0200
- Subject: [PATCH][BZ #7003] Fix description of random according to POSIX
- Authentication-results: sourceware.org; auth=none
Hi, this is another sitting patch. Now it deals that POSIX defines
maximal random value as 2147483647. In bug entry also random_r was
mentioned but so far I can not find page to confirm this.
Comments or should we ask austin to clarify this?
2008-11-04 Bruno Haible <bruno@clisp.org>
[BZ #7003]
* manual/math.texi (BSD Random): Specify range upper bound as in POSIX.
--- a/manual/math.texi 2008-09-27 11:04:24.000000000 +0200
+++ b/manual/math.texi 2008-11-04 12:17:36.000000000 +0100
@@ -1364,7 +1364,7 @@
@comment BSD
@deftypefun {long int} random (void)
This function returns the next pseudo-random number in the sequence.
-The value returned ranges from @code{0} to @code{RAND_MAX}.
+The value returned ranges from @code{0} to @code{2147483647}.
@strong{NB:} Temporarily this function was defined to return a
@code{int32_t} value to indicate that the return value always contains