This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/14561] srand() initializes seed for random() function


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]