Re: doc: Mention rand and srand limitations

2023-11-11 Thread Bruno Haible
Jeffrey Walton wrote: > > The attached program tests the MT-safety. Results: OK on all platforms, > > except > > ... > > If rand() and friends do not need to be MT-safe, then does it even need a > test? I wrote the test (but did not commit it into gnulib) because rand() is MT-safe on GNU. If I

Re: doc: Mention rand and srand limitations

2023-11-10 Thread Bruno Haible
I wrote: > Results: OK on all platforms, except > > FreeBSD 13.2 Expected value #7504 not found in multithreaded results. (4 > failures among 100 runs) > macOS 12.5Expected value #31 not found in multithreaded results. > Solaris 10Expected value #95981 not found in multithreaded

Re: doc: Mention rand and srand limitations

2023-11-10 Thread Jeffrey Walton
lear that the problem is that srand() has no effect on > other thread - which is a bug since it violates ISO C 23. > > On Haiku, rand() is MT-safe while random() is not. > > > 2023-11-10 Bruno Haible > > doc: Mention rand and srand limitations. > * doc/posix-

doc: Mention rand and srand limitations

2023-11-10 Thread Bruno Haible
() is not. 2023-11-10 Bruno Haible doc: Mention rand and srand limitations. * doc/posix-functions/rand.texi: Mention multithread-safety problem. * doc/posix-functions/srand.texi: Mention a Cygwin bug. diff --git a/doc/posix-functions/rand.texi b/doc/posix-functions