Re: random is not multithread-safe in Cygwin

2023-11-13 Thread Corinna Vinschen via Cygwin
On Nov 13 19:04, Bruno Haible via Cygwin wrote: > Corinna Vinschen wrote: > > > And indeed glibc, musl libc, AIX, Android, and even NetBSD implement it > > > in a > > > multithread-safe way. > > > > Our code is from FreeBSD, originally. I checked the latest code from > > FreeBSD. It doesn't

Re: random is not multithread-safe in Cygwin

2023-11-13 Thread Bruno Haible via Cygwin
Corinna Vinschen wrote: > > And indeed glibc, musl libc, AIX, Android, and even NetBSD implement it in a > > multithread-safe way. > > Our code is from FreeBSD, originally. I checked the latest code from > FreeBSD. It doesn't lock anything in random() and generates the same > error when running

Re: random is not multithread-safe in Cygwin

2023-11-13 Thread Brian Inglis via Cygwin
On 2023-11-13 09:12, Corinna Vinschen via Cygwin wrote: On Nov 10 17:19, Bruno Haible via Cygwin wrote: The function 'random' is, unlike 'rand', not marked as not MT-safe in POSIX [1][2]. Thus it must be multithread-safe [3]: "Each function defined in the System Interfaces volume of

Re: random is not multithread-safe in Cygwin

2023-11-13 Thread Corinna Vinschen via Cygwin
Hi Bruno, On Nov 10 17:19, Bruno Haible via Cygwin wrote: > The function 'random' is, unlike 'rand', not marked as not MT-safe in POSIX > [1][2]. Thus it must be multithread-safe [3]: > "Each function defined in the System Interfaces volume of POSIX.1-2017 >is thread-safe unless explicitly

random is not multithread-safe in Cygwin

2023-11-10 Thread Bruno Haible via Cygwin
The function 'random' is, unlike 'rand', not marked as not MT-safe in POSIX [1][2]. Thus it must be multithread-safe [3]: "Each function defined in the System Interfaces volume of POSIX.1-2017 is thread-safe unless explicitly stated otherwise." And indeed glibc, musl libc, AIX, Android, and