Commit 69ca9767 by Kai Tietz Committed by Kai Tietz

ctime.c (ctime_r): Improve implementation.

2011-01-29  Kai Tietz  <kai.tietz@onevision.com>

        * intrinsics/ctime.c (ctime_r): Improve implementation.

From-SVN: r169389
parent ca7174cf
2011-01-29 Kai Tietz <kai.tietz@onevision.com>
* intrinsics/ctime.c (ctime_r): Improve implementation.
2011-01-27 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47431
......
......@@ -42,11 +42,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef HAVE_CTIME_R
/* Make sure we don't see here a macro. */
#undef ctime_r
static char *
ctime_r (const time_t * timep, char * buf __attribute__((unused)))
{
#ifdef HAVE_CTIME
return ctime (timep);
char *tmp = ctime (timep);
if (tmp)
tmp = strcpy (buf, tmp);
return tmp;
#else
return NULL;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment