Remove leftover "fenv" cruft

This commit is contained in:
Ray Speth 2015-07-15 12:46:48 -04:00
parent 6a9dd7f9d6
commit 97b32069cf
4 changed files with 0 additions and 45 deletions

View file

@ -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 <math.h>', 'C++')
env['HAS_GLOBAL_ISNAN'] = conf.CheckStatement('::isnan(1.0)', '#include <cmath>')
@ -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))

View file

@ -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.

View file

@ -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)

View file

@ -2,9 +2,6 @@
#include "cantera/base/ctexceptions.h"
#include "application.h"
#ifdef HAVE_FENV_H
#include <fenv.h>
#endif
#include <sstream>
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