From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32241 invoked by alias); 3 Jun 2013 22:49:13 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 32207 invoked by uid 48); 3 Jun 2013 22:49:09 -0000 From: "roland at gnu dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/14561] srand() initializes seed for random() function Date: Mon, 03 Jun 2013 22:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.12 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: roland at gnu dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: neleai at seznam dot cz X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00019.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14561 Roland McGrath changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |roland at gnu dot org --- Comment #2 from Roland McGrath --- 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.