diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2011-02-24 23:51:39 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2011-02-24 23:51:39 +0200 |
commit | 8f17e00c2f57c10af41495a8de03f944e4ec0648 (patch) | |
tree | 2a641f6a7dbe42592aa100fae7f9736fcb97a7bd /libgfortran/intrinsics/date_and_time.c | |
parent | ef795fc25033c60df465b8100644ddde84181cc6 (diff) | |
download | gcc-8f17e00c2f57c10af41495a8de03f944e4ec0648.zip gcc-8f17e00c2f57c10af41495a8de03f944e4ec0648.tar.gz gcc-8f17e00c2f57c10af41495a8de03f944e4ec0648.tar.bz2 |
PR 47802 Use strftime for CTIME and FDATE intrinsics
From-SVN: r170478
Diffstat (limited to 'libgfortran/intrinsics/date_and_time.c')
-rw-r--r-- | libgfortran/intrinsics/date_and_time.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c index c58d114..793df68 100644 --- a/libgfortran/intrinsics/date_and_time.c +++ b/libgfortran/intrinsics/date_and_time.c @@ -36,24 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif -/* If the re-entrant versions of localtime and gmtime are not - available, provide fallback implementations. On some targets where - the _r versions are not available, localtime and gmtime use - thread-local storage so they are threadsafe. */ - -#ifndef HAVE_LOCALTIME_R -/* If _POSIX is defined localtime_r gets defined by mingw-w64 headers. */ -#ifdef localtime_r -#undef localtime_r -#endif - -static struct tm * -localtime_r (const time_t * timep, struct tm * result) -{ - *result = *localtime (timep); - return result; -} -#endif +/* If the re-entrant version of gmtime is not available, provide a + fallback implementation. On some targets where the _r version is + not available, gmtime uses thread-local storage so it's + threadsafe. */ #ifndef HAVE_GMTIME_R /* If _POSIX is defined gmtime_r gets defined by mingw-w64 headers. */ |