This is the mail archive of the cygwin mailing list for the Cygwin 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]

Re: STL std::random_shuffle behavior fails with lrand48 (workaround)


> If someone else could demonstrate that
> the bug exists on other platforms, I would
> be grateful.

I've compiled and run code from:
http://cygwin.com/ml/cygwin/2004-07/msg01118.html
on Cygwin and FreeBSD machine:

cygwin1.dll snapshot 20040720-12:03:09:

$ g++ --version
g++ (GCC) 3.3.1 (cygming special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ g++ -o lr lr.cpp 
$ ./lr
changes before:
0 1 2 3 4 5 6 
changes after:
6 0 1 2 3 4 5 
changes after:
5 6 0 1 2 3 4 
changes after:
4 5 6 0 1 2 3 


FreeBSD 5.2:

$ g++ --version
g++ (GCC) 3.3.3 [FreeBSD] 20031106
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ g++ -o lr lr.cpp 
$ ./lr
changes before:
0 1 2 3 4 5 6 
changes after:
1 5 6 4 3 2 0 
changes after:
5 3 0 4 2 1 6 
changes after:
1 6 4 5 0 3 2 

Regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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