From 5c7ee701c799c89f8b41b2dadf02cf3d7b6e856a Mon Sep 17 00:00:00 2001 From: bde Date: Fri, 12 Mar 2004 12:02:03 +0000 Subject: 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 (, compiler support for , and actually setting the exception flags correctly). --- lib/msun/src/math.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h index 7e91916..842793b 100644 --- a/lib/msun/src/math.h +++ b/lib/msun/src/math.h @@ -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 -- cgit v1.1