diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-24 08:34:05 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-24 08:34:05 +0000 |
commit | f1fd8f6ec3067e8bda0d479a530b5d8a45aaad09 (patch) | |
tree | e3fb961dfaef2cc8370285e9e55b54517901a4cb /libgfortran | |
parent | 0b23338c2ce3f737684eda9ac9f7cfa9073a546b (diff) | |
download | gcc-f1fd8f6ec3067e8bda0d479a530b5d8a45aaad09.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200360 138bc75d-0d04-0410-961f-82ee72b054a4
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 9cd722d4939..e6c2fad3f02 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 0d5d56ccb1c..22fc4bab9a7 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 1502b372265..db95e9df093 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 c049cdcfebe..6c8ee5d987f 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 ba14f1f30b7..1cf06978eb9 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])]) |