From: Bruno Haible Date: Fri, 10 Nov 2023 18:57:30 +0000 (+0100) Subject: doc: Mention rand and srand limitations. X-Git-Tag: v1.0~608 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0610a7cc275b86923b0e2c96572233d913851fcd;p=gnulib.git 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/ChangeLog b/ChangeLog index cb75644b15..3aa9f919d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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. + 2023-11-10 Bruno Haible tests: In multithreaded tests, use random() instead of rand(). diff --git a/doc/posix-functions/rand.texi b/doc/posix-functions/rand.texi index 2f36a548a7..48b0bc5758 100644 --- a/doc/posix-functions/rand.texi +++ b/doc/posix-functions/rand.texi @@ -18,4 +18,7 @@ Portability problems not fixed by Gnulib: @item This function is only defined as an inline function on some platforms: Android 4.4. +@item +This function is not multithread-safe on some platforms: +macOS 12.5, FreeBSD 13.2, Solaris 11.4. @end itemize diff --git a/doc/posix-functions/srand.texi b/doc/posix-functions/srand.texi index 3e8f4b429b..710a5a1270 100644 --- a/doc/posix-functions/srand.texi +++ b/doc/posix-functions/srand.texi @@ -15,4 +15,8 @@ Portability problems not fixed by Gnulib: @item This function is only defined as an inline function on some platforms: Android 4.4. +@item +This function has no effect on @code{rand} invocations in other threads +on some platforms: +Cygwin 3.4.6. @end itemize