From: Tobias Burnus Date: Mon, 24 Jun 2013 08:34:05 +0000 (+0200) Subject: configure.ac: Check for fp_except and fp_except_t. X-Git-Tag: releases/gcc-4.9.0~5268 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ae346c340a76c3bd83db101c72a2deb7a98ea5d;p=thirdparty%2Fgcc.git configure.ac: Check for fp_except and fp_except_t. 2013-06-24 Tobias Burnus * 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 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 9cd722d4939f..e6c2fad3f02b 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2013-06-24 Tobias Burnus + + * 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 * config/fpu-sysv.h (get_fpu_except_flags): Fix typo. diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in index 0d5d56ccb1c5..22fc4bab9a70 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 1502b3722654..db95e9df093b 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 c049cdcfebe9..6c8ee5d987f5 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 +" +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 +" +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 ba14f1f30b7b..1cf06978eb91 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 ]]) # 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])])