This is the mail archive of the
mailing list for the GNU Fortran project.
Re: [Patch, libfortran] PR 47431 Thread-safe ctime/fdate intrinsics
On Thu, Jan 27, 2011 at 20:53, Tobias Burnus <firstname.lastname@example.org> wrote:
> On 01/25/2011 07:16 PM, Janne Blomqvist wrote:
>> 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?
> OK. Thanks for the patch. Do not forget the follow up bit of the patch.
Thanks. Committed, with the additional patch on top (not the
s/int/size_t/ thing which I fixed in the ttyname_r() patch, thanks for
diff --git a/libgfortran/intrinsics/ctime.c b/libgfortran/intrinsics/ctime.c
index 5aae95f..2729616 100644
@@ -45,7 +45,11 @@ see the files COPYING3 and COPYING.RUNTIME
respectively. If not, see
static char *
ctime_r (const time_t * timep, char * buf __attribute__((unused)))
return ctime (timep);
+ return NULL;
(Not that I expect HAVE_CTIME will ever be false, since it's part of C89).
Transmitting file data .....
Committed revision 169338.
> PS: I think PR 47491 and PR 47375 can be closed as fixed.