Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include If __FLT_EVAL_METHOD__ exists and is in {0, 1, 2}, pro...



details:   https://anonhg.NetBSD.org/src/rev/204a02d3d1e8
branches:  trunk
changeset: 786195:204a02d3d1e8
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Apr 19 16:40:59 2013 +0000

description:
If __FLT_EVAL_METHOD__ exists and is in {0,1,2}, provide float_t and
double_t.

diffstat:

 include/math.h |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 8320c5e8be63 -r 204a02d3d1e8 include/math.h
--- a/include/math.h    Fri Apr 19 15:22:24 2013 +0000
+++ b/include/math.h    Fri Apr 19 16:40:59 2013 +0000
@@ -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 @@
                                           or __long_double_u */
 #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
 #define        __fpmacro_unary_floating(__name, __arg0)                        \
        /* LINTED */                                                    \



Home | Main Index | Thread Index | Old Index