From 97b32069cf7a902da0f28009808368650bf36ff2 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 15 Jul 2015 12:46:48 -0400 Subject: [PATCH] Remove leftover "fenv" cruft --- SConstruct | 12 ------------ include/cantera/base/config.h.in | 2 -- include/cantera/base/ctexceptions.h | 11 ----------- src/base/ctexceptions.cpp | 20 -------------------- 4 files changed, 45 deletions(-) diff --git a/SConstruct b/SConstruct index 834da561a..59b5f5041 100644 --- a/SConstruct +++ b/SConstruct @@ -789,12 +789,6 @@ configh = {} env['HAS_TIMES_H'] = conf.CheckCHeader('sys/times.h', '""') env['HAS_UNISTD_H'] = conf.CheckCHeader('unistd.h', '""') -# -# Check to see if the compiler supports C99 fenv.h -# Apparently, the only compiler not to is MS visual before 2013 -# -env['HAS_FENV_H'] = conf.CheckCHeader('fenv.h', '""') - env['HAS_MATH_H_ERF'] = conf.CheckDeclaration('erf', '#include ', 'C++') env['HAS_GLOBAL_ISNAN'] = conf.CheckStatement('::isnan(1.0)', '#include ') @@ -1281,12 +1275,6 @@ cdefine('USE_GLOBAL_ISNAN', 'HAS_GLOBAL_ISNAN') cdefine('USE_STD_ISNAN', 'HAS_STD_ISNAN') cdefine('USE_UNDERSCORE_ISNAN', 'HAS_UNDERSCORE_ISNAN') -# this turns on HAS_FENV_H -if env['HAS_FENV_H']: - configh['HAS_FENV_H'] = 1 -else: - configh['HAS_FENV_H'] = None - config_h = env.Command('include/cantera/base/config.h', 'include/cantera/base/config.h.in', ConfigBuilder(configh)) diff --git a/include/cantera/base/config.h.in b/include/cantera/base/config.h.in index 4d488dfdd..4de3b17bf 100644 --- a/include/cantera/base/config.h.in +++ b/include/cantera/base/config.h.in @@ -84,8 +84,6 @@ typedef int ftnlen; // Fortran hidden string length type %(USE_GLOBAL_ISNAN)s %(USE_UNDERSCORE_ISNAN)s -%(HAS_FENV_H)s - // This define is needed to account for the variability for how // static variables in templated classes are defined. Right now // this is only turned on for the SunPro compiler on Solaris. diff --git a/include/cantera/base/ctexceptions.h b/include/cantera/base/ctexceptions.h index 148374b15..c0bc0f904 100644 --- a/include/cantera/base/ctexceptions.h +++ b/include/cantera/base/ctexceptions.h @@ -190,17 +190,6 @@ public: } }; -//! Quick check on whether there has been an underflow or overflow condition in the floating point unit -/*! - * @return Returns true if there has been such a condition and it has not been cleared. returns false - * if there hasn't been an overflow, underflow or invalid condition. - */ -bool check_FENV_OverUnder_Flow(); - -//! Clear all the flags for floating-point exceptions -void clear_FENV(); - - //! Provides a line number #define XSTR_TRACE_LINE(s) STR_TRACE_LINE(s) diff --git a/src/base/ctexceptions.cpp b/src/base/ctexceptions.cpp index 2a71ad7f0..476d99be0 100644 --- a/src/base/ctexceptions.cpp +++ b/src/base/ctexceptions.cpp @@ -2,9 +2,6 @@ #include "cantera/base/ctexceptions.h" #include "application.h" -#ifdef HAVE_FENV_H -#include -#endif #include namespace Cantera @@ -79,21 +76,4 @@ std::string IndexError::getMessage() const return ss.str(); } -bool check_FENV_OverUnder_Flow() { -#ifdef HAVE_FENV_H - fexcept_t ff; - fegetexceptflag(&ff, FE_OVERFLOW || FE_UNDERFLOW || FE_INVALID); - if (ff) { - return true; - } -#endif - return false; -}; - -void clear_FENV() { -#ifdef HAVE_FENV_H - feclearexcept(FE_ALL_EXCEPT); -#endif -} - } // namespace Cantera