Module Name:    src
Committed By:   matt
Date:           Fri Apr 29 07:40:47 UTC 2011

Modified Files:
        src/include [matt-nb5-mips64]: math.h
        src/lib/libc/arch/mips/gen [matt-nb5-mips64]: nanf.c

Log Message:
Use GCC builtin for NAN (sync with current)


To generate a diff of this commit:
cvs rdiff -u -r1.47.16.1 -r1.47.16.2 src/include/math.h
cvs rdiff -u -r1.3 -r1.3.36.1 src/lib/libc/arch/mips/gen/nanf.c

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.47.16.1 src/include/math.h:1.47.16.2
--- src/include/math.h:1.47.16.1	Wed Apr 21 05:26:00 2010
+++ src/include/math.h	Fri Apr 29 07:40:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.47.16.1 2010/04/21 05:26:00 matt Exp $	*/
+/*	$NetBSD: math.h,v 1.47.16.2 2011/04/29 07:40:46 matt Exp $	*/
 
 /*
  * ====================================================
@@ -98,8 +98,12 @@
 
 /* 7.12#5 NAN: a quiet NaN, if supported */
 #ifdef __HAVE_NANF
+#if __GNUC_PREREQ__(3,3)
+#define NAN     __builtin_nanf("")
+#else
 extern const union __float_u __nanf;
 #define	NAN		__nanf.__val
+#endif
 #endif /* __HAVE_NANF */
 
 /* 7.12#6 number classification macros */

Index: src/lib/libc/arch/mips/gen/nanf.c
diff -u src/lib/libc/arch/mips/gen/nanf.c:1.3 src/lib/libc/arch/mips/gen/nanf.c:1.3.36.1
--- src/lib/libc/arch/mips/gen/nanf.c:1.3	Fri Apr 15 22:39:11 2005
+++ src/lib/libc/arch/mips/gen/nanf.c	Fri Apr 29 07:40:47 2011
@@ -1,8 +1,8 @@
-/*	$NetBSD: nanf.c,v 1.3 2005/04/15 22:39:11 kleink Exp $	*/
+/*	$NetBSD: nanf.c,v 1.3.36.1 2011/04/29 07:40:47 matt Exp $	*/
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: nanf.c,v 1.3 2005/04/15 22:39:11 kleink Exp $");
+__RCSID("$NetBSD: nanf.c,v 1.3.36.1 2011/04/29 07:40:47 matt Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <math.h>
@@ -15,3 +15,5 @@
 #else
 		{ {    0,    0, 0xa0, 0x7f } };
 #endif
+
+__warn_references(__nanf, "warning: <math.h> defines NAN incorrectly for your compiler.")

Reply via email to