configure.ac: Check for fp_except and fp_except_t.
authorTobias Burnus <burnus@net-b.de>
Mon, 24 Jun 2013 08:34:05 +0000 (10:34 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Mon, 24 Jun 2013 08:34:05 +0000 (10:34 +0200)
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

libgfortran/ChangeLog
libgfortran/config.h.in
libgfortran/config/fpu-sysv.h
libgfortran/configure
libgfortran/configure.ac

index 9cd722d4939f62d80b1e12ea59c3eb7609a00b9b..e6c2fad3f02b078d2d9f5095f2c3abdf5b00913a 100644 (file)
@@ -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.
index 0d5d56ccb1c57656e9a62d4e2d5f63d3c189dd9f..22fc4bab9a70f561b5296bdbb94091877856d570 100644 (file)
 /* 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
 
index 1502b37226541dd4ae2b109c91ef3e770b968215..db95e9df093b0fcf15ba6dd9b572619926061453 100644 (file)
@@ -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 ();
index c049cdcfebe92b0b7372c4b5acb4d53c18578dd3..6c8ee5d987f5f02d9ed85a2345d948babfb5115f 100755 (executable)
@@ -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"
index ba14f1f30b7b84fe45151f856edd11b356765281..1cf06978eb9114c96a72a4ca900c0f20971f03ab 100644 (file)
@@ -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])])