From 0610a7cc275b86923b0e2c96572233d913851fcd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 10 Nov 2023 19:57:30 +0100 Subject: [PATCH] doc: Mention rand and srand limitations. * doc/posix-functions/rand.texi: Mention multithread-safety problem. * doc/posix-functions/srand.texi: Mention a Cygwin bug. --- ChangeLog | 6 ++++++ doc/posix-functions/rand.texi | 3 +++ doc/posix-functions/srand.texi | 4 ++++ 3 files changed, 13 insertions(+) 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 -- 2.39.5