[Patch, libfortran] PR 47431 Thread-safe ctime/fdate intrinsics

Janne Blomqvist blomqvist.janne@gmail.com
Tue Jan 25 18:45:00 GMT 2011


Hi,

the attached patch makes the ctime and fdate intrinsics thread-safe by
using ctime_r() if available.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk?

2011-01-25  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/47431
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* configure.ac: Add check for ctime_r().
	* intrinsics/ctime.c (ctime_r): Fallback implementation.
	(fdate): Use ctime_r() instead of ctime().
	(fdate_sub): Likewise.
	(ctime): Likewise.
	(ctime_sub): Likewise.


-- 
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctime.diff
Type: text/x-patch
Size: 3578 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110125/3561f96e/attachment.bin>


More information about the Gcc-patches mailing list