If __FLT_EVAL_METHOD__ exists and is in {0,1,2}, provide float_t and

double_t.
This commit is contained in:
joerg 2013-04-19 16:40:59 +00:00
parent 2561b63430
commit 386426dedd
1 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: math.h,v 1.61 2013/02/11 07:29:21 matt Exp $ */ /* $NetBSD: math.h,v 1.62 2013/04/19 16:40:59 joerg Exp $ */
/* /*
* ==================================================== * ====================================================
@ -40,6 +40,19 @@ union __long_double_u {
or __long_double_u */ or __long_double_u */
#include <limits.h> /* for INT_{MIN,MAX} */ #include <limits.h> /* for INT_{MIN,MAX} */
#if ((_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE))
# if defined(__FLT_EVAL_METHOD__) && (__FLT_EVAL_METHOD__ - 0) == 0
typedef double double_t;
typedef float float_t;
# elif (__FLT_EVAL_METHOD__ - 0) == 1
typedef double double_t;
typedef double float_t;
# elif (__FLT_EVAL_METHOD__ - 0) == 2
typedef long double double_t;
typedef long double float_t;
# endif
#endif
#ifdef __HAVE_LONG_DOUBLE #ifdef __HAVE_LONG_DOUBLE
#define __fpmacro_unary_floating(__name, __arg0) \ #define __fpmacro_unary_floating(__name, __arg0) \
/* LINTED */ \ /* LINTED */ \