diff options
author | Tobias Burnus <burnus@net-b.de> | 2013-06-24 10:34:05 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2013-06-24 10:34:05 +0200 |
commit | 7ae346c340a76c3bd83db101c72a2deb7a98ea5d (patch) | |
tree | e3fb961dfaef2cc8370285e9e55b54517901a4cb /libgfortran | |
parent | e99008fc24f17f93604d3980a15e7add979b560a (diff) | |
download | gcc-7ae346c340a76c3bd83db101c72a2deb7a98ea5d.zip gcc-7ae346c340a76c3bd83db101c72a2deb7a98ea5d.tar.gz gcc-7ae346c340a76c3bd83db101c72a2deb7a98ea5d.tar.bz2 |
configure.ac: Check for fp_except and fp_except_t.
2013-06-24 Tobias Burnus <burnus@net-b.de>
* configure.ac: Check for fp_except and fp_except_t.
* config/fpu-sysv.h: Conditionally use either type.
* configure: Regenerate.
* config.h.in: Regenerate.
From-SVN: r200360
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/config.h.in | 6 | ||||
-rw-r--r-- | libgfortran/config/fpu-sysv.h | 6 | ||||
-rwxr-xr-x | libgfortran/configure | 21 | ||||
-rw-r--r-- | libgfortran/configure.ac | 1 |
5 files changed, 41 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 9cd722d..e6c2fad 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2013-06-24 Tobias Burnus <burnus@net-b.de> + + * configure.ac: Check for fp_except and fp_except_t. + * config/fpu-sysv.h: Conditionally use either type. + * configure: Regenerate. + * config.h.in: Regenerate. + 2013-06-21 Eric Botcazou <ebotcazou@adacore.com> * config/fpu-sysv.h (get_fpu_except_flags): Fix typo. diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in index 0d5d56c..22fc4ba 100644 --- a/libgfortran/config.h.in +++ b/libgfortran/config.h.in @@ -405,6 +405,12 @@ /* fp_enable is present */ #undef HAVE_FP_ENABLE +/* Define to 1 if the system has the type `fp_except'. */ +#undef HAVE_FP_EXCEPT + +/* Define to 1 if the system has the type `fp_except_t'. */ +#undef HAVE_FP_EXCEPT_T + /* fp_trap is present */ #undef HAVE_FP_TRAP diff --git a/libgfortran/config/fpu-sysv.h b/libgfortran/config/fpu-sysv.h index 1502b37..db95e9d 100644 --- a/libgfortran/config/fpu-sysv.h +++ b/libgfortran/config/fpu-sysv.h @@ -85,7 +85,13 @@ int get_fpu_except_flags (void) { int result; +#if HAVE_FP_EXCEPT fp_except set_excepts; +#elif HAVE_FP_EXCEPT_T + fp_except_t set_excepts; +#else + choke me +#endif result = 0; set_excepts = fpgetsticky (); diff --git a/libgfortran/configure b/libgfortran/configure index c049cdc..6c8ee5d 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25977,6 +25977,27 @@ $as_echo "#define HAVE_FPSETMASK 1" >>confdefs.h fi +ac_fn_c_check_type "$LINENO" "fp_except" "ac_cv_type_fp_except" "#include <ieeefp.h> +" +if test "x$ac_cv_type_fp_except" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_FP_EXCEPT 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "fp_except_t" "ac_cv_type_fp_except_t" "#include <ieeefp.h> +" +if test "x$ac_cv_type_fp_except_t" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_FP_EXCEPT_T 1 +_ACEOF + + +fi + # Check for AIX fp_trap and fp_enable ac_fn_c_check_func "$LINENO" "fp_trap" "ac_cv_func_fp_trap" diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index ba14f1f..1cf0697 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -498,6 +498,7 @@ fi # Check for SysV fpsetmask LIBGFOR_CHECK_FPSETMASK +AC_CHECK_TYPES([fp_except,fp_except_t], [], [], [[#include <ieeefp.h>]]) # Check for AIX fp_trap and fp_enable AC_CHECK_FUNC([fp_trap],[have_fp_trap=yes AC_DEFINE([HAVE_FP_TRAP],[1],[fp_trap is present])]) |