Initial support for C99's (or is it POSIX.1-2001's?) MATH_ERRNO,

MATH_ERREXCEPTION and math_errhandling, so that C99 applications at
least have the possibility of determining that errno is not set for
math functions.  Set math_errhandling to the non-standard-conforming
value of 0 for now to indicate that we don't support either method
of reporting errors.  We intentionally don't support MATH_ERRNO
because errno is a mistake, and we are missing support for
MATH_ERREXCEPTION (<fenv.h>, compiler support for <fenv.h>, and
actually setting the exception flags correctly).
This commit is contained in:
Bruce Evans 2004-03-12 12:02:03 +00:00
parent 6d7c0d2fed
commit 6eb2d83e44
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126871

View File

@ -40,6 +40,12 @@ extern const union __nan_un {
#define INFINITY HUGE_VALF
#define NAN (__nan.__uf)
#if __ISO_C_VISIBLE >= 1999
#define MATH_ERRNO 1
#define MATH_ERREXCEPT 2
#define math_errhandling 0
#endif
/* Symbolic constants to classify floating point numbers. */
#define FP_INFINITE 0x01
#define FP_NAN 0x02