Module Name:    src
Committed By:   joerg
Date:           Fri Apr 19 16:40:59 UTC 2013

Modified Files:
        src/include: math.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/include/math.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/math.h
diff -u src/include/math.h:1.61 src/include/math.h:1.62
--- src/include/math.h:1.61	Mon Feb 11 07:29:21 2013
+++ src/include/math.h	Fri Apr 19 16:40:59 2013
@@ -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 */
 #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 */							\

Reply via email to