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/acinclude.m4 | |
parent | e7a531ae616ec482c38d8749d5e2f672fe2022ac (diff) | |
download | gcc-3969c39f61a2c54c9a5d9a92ed172392943e87fb.zip gcc-3969c39f61a2c54c9a5d9a92ed172392943e87fb.tar.gz gcc-3969c39f61a2c54c9a5d9a92ed172392943e87fb.tar.bz2 |
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/acinclude.m4')
-rw-r--r-- | libgfortran/acinclude.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4 index ebee89d..87dc722 100644 --- a/libgfortran/acinclude.m4 +++ b/libgfortran/acinclude.m4 @@ -83,3 +83,22 @@ AC_DEFUN([AC_LIBTOOL_DLOPEN]) AC_DEFUN([AC_PROG_LD]) ]) +dnl Check whether the target is ILP32. +AC_DEFUN([LIBGFOR_TARGET_ILP32], [ + AC_CACHE_CHECK([whether the target is ILP32], target_ilp32, [ + save_CFLAGS="$CFLAGS" + CFLAGS="-O2" + AC_TRY_LINK(,[ +if (sizeof(int) == 4 && sizeof(long) == 4 && sizeof(void *) == 4) + ; +else + undefined_function (); + ], + target_ilp32=yes, + target_ilp32=no) + CFLAGS="$save_CFLAGS"]) + if test $target_ilp32 = yes; then + AC_DEFINE(TARGET_ILP32, 1, + [Define to 1 if the target is ILP32.]) + fi + ]) |