This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14561] srand() initializes seed for random() function
- From: "roland at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 03 Jun 2013 22:49:08 +0000
- Subject: [Bug libc/14561] srand() initializes seed for random() function
- Auto-submitted: auto-generated
- References: <bug-14561-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14561
Roland McGrath <roland at gnu dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |roland at gnu dot org
--- Comment #2 from Roland McGrath <roland at gnu dot org> ---
Originally the existing behavior was correct (srand/rand are just aliases for
srandom/random). Later versions of 1003.1 started specifying srandom as well
as srand, so this has become nonconforming.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/rand.html
The implementation shall behave as if no function defined in this
volume of POSIX.1-2008 calls rand() or srand().
Note that srandom and random are defined in this volume:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/random.html
--
You are receiving this mail because:
You are on the CC list for the bug.