This makes rand(3) ISO C compliant and adds locking to avoid
race conditions.
Reported-by: Bruno Haible <bruno@clisp.org>
Fixes: 8a0efa53e4491 ("import newlib-2000-02-17 snapshot")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
__random_unlock();
}
+EXPORT_ALIAS (srandom, srand)
+
/*
* initstate:
*
return (r);
}
+int
+rand()
+{
+ return ((int) random());
+}
+
}
- Updates to profiler and gmondump: error display mechanics, buffer sizing,
and output formatting.
+
+- Align behaviour of rand(3) to ISO C.
+ Adresses: https://cygwin.com/pipermail/cygwin/2023-November/254735.html