This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, libgfortran] PR 40190 DATE_AND_TIME not thread-safe
Janne Blomqvist wrote:
The attached patch adds fallback implementations for localtime_r and
gmtime_r that should work properly on MINGW and other targets where we
support OpenMP and that have threadsafe localtime and gmtime.
Ok for trunk?
Additionally, to be really sure I have also tested the fallback
implementations on Linux. So, this patch ought to
1) Fix the PR on targets that have the _r functions.
2) Fix the PR on targets without the _r functions, but with threadsafe
localtime(), gmtime() (MINGW, maybe others?).
3) Doesn't regress on other targets.
4) Does not fix the PR on targets where we support OpenMP, but do not
have either the _r functions nor threadsafe localtime/gmtime, if such
targets indeed exist at all.