diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2004-11-20 14:15:17 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2004-11-20 13:15:17 +0000 |
commit | 3969c39f61a2c54c9a5d9a92ed172392943e87fb (patch) | |
tree | 4fb430d6fc61a79d5b9eb441961b3c02f6bc0a4a /libgfortran/intrinsics | |
parent | e7a531ae616ec482c38d8749d5e2f672fe2022ac (diff) | |
download | gcc-3969c39f61a2c54c9a5d9a92ed172392943e87fb.tar.gz |
re PR libfortran/16135 (libfortran doesn't build, use of C99 types)
PR target/16135
* acinclude.m4 (LIBGFOR_TARGET_ILP32): New check.
* configure.ac: Include LIBGFOR_TARGET_ILP32.
* configure: Regenerate.
* config.h.in: Likewise.
* libgfortran.h: Provide default definitions for C99 types
on ILP32 targets that don't have them.
PR target/17999
* configure.ac: Check for snprintf.
* configure: Regenerate.
* config.h.in: Likewise.
* intrinsics/date_and_time.c (date_and_time): Do not
use snprinf if it is not available.
* io/write.c (output_float): Likewise.
From-SVN: r90964
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/date_and_time.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c index 63d18f5cb2d..e0b01234556 100644 --- a/libgfortran/intrinsics/date_and_time.c +++ b/libgfortran/intrinsics/date_and_time.c @@ -182,20 +182,35 @@ date_and_time (char *__date, if (__date) { +#if HAVE_SNPRINTF snprintf (date, DATE_LEN + 1, "%04d%02d%02d", values[0], values[1], values[2]); +#else + sprintf (date, "%04d%02d%02d", + values[0], values[1], values[2]); +#endif } if (__time) { +#if HAVE_SNPRINTF snprintf (timec, TIME_LEN + 1, "%02d%02d%02d.%03d", values[4], values[5], values[6], values[7]); +#else + sprintf (timec, "%02d%02d%02d.%03d", + values[4], values[5], values[6], values[7]); +#endif } if (__zone) { +#if HAVE_SNPRINTF snprintf (zone, ZONE_LEN + 1, "%+03d%02d", values[3] / 60, abs (values[3] % 60)); +#else + sprintf (zone, "%+03d%02d", + values[3] / 60, abs (values[3] % 60)); +#endif } #else /* if defined HAVE_NO_DATE_TIME */ /* We really have *nothing* to return, so return blanks and HUGE(0). */ |