Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/include Define __INFINITY as huge_val since VAX...



details:   https://anonhg.NetBSD.org/src/rev/0df422511838
branches:  trunk
changeset: 773548:0df422511838
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Feb 05 17:45:38 2012 +0000

description:
Define __INFINITY as huge_val since VAX FP doesn't have infinities.

diffstat:

 sys/arch/vax/include/math.h |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 24bf513adf0e -r 0df422511838 sys/arch/vax/include/math.h
--- a/sys/arch/vax/include/math.h       Sun Feb 05 17:43:47 2012 +0000
+++ b/sys/arch/vax/include/math.h       Sun Feb 05 17:45:38 2012 +0000
@@ -1,6 +1,15 @@
-/*     $NetBSD: math.h,v 1.5 2005/12/11 12:19:34 christos Exp $        */
+/*     $NetBSD: math.h,v 1.6 2012/02/05 17:45:38 matt Exp $    */
+
+#ifndef _VAX_MATH_H_
+#define _VAX_MATH_H_
 
+#include <sys/cdefs.h>
+
+#if __GNUC_PREREQ__(3, 3)
+#define        __INFINITY      __builtin_huge_valf()
+#else
 #define        __INFINITY      1.0E+39F
+#endif
 
 #define        __isinf(__x)    (0)
 #define        __isnan(__x)    (0)
@@ -15,3 +24,5 @@
 #define        FP_DIRTYZERO    0x80
 #define        FP_ROP          0x81
 #endif
+
+#endif /* _VAX_MATH_H_ */



Home | Main Index | Thread Index | Old Index