This is the mail archive of the
mailing list for the glibc project.
[PATCH] PPC mathdef.h warning M2
- From: Steven Munroe <sjmunroe at us dot ibm dot com>
- To: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Tue, 08 Apr 2003 15:51:46 -0500
- Subject: [PATCH] PPC mathdef.h warning M2
- Organization: IBM Linux Developement
- Reply-to: sjmunroe at vnet dot ibm dot com
Geoffrey Keating writes:
> You want to do the reverse, that is prefer gcc's version. GCC knows
> what the right setting is based on the compiler flags, which glibc
> can't do.
Of course Geoff is correct. The following defines FLT_EVAL_METHOD only if it is
not already defined (by gcc's float.h).
2003-04-07 Steven Munroe <sjmunroe at us dot ibm dot com>
* sysdeps/powerpc/fpu/bits/mathdef.h [!FLT_EVAL_METHOD]: Define.
sjmunroe at us dot ibm dot com
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
diff -urN libc23-cvstip-20030407/sysdeps/powerpc/fpu/bits/mathdef.h libc23/sysdeps/powerpc/fpu/bits/mathdef.h
--- libc23-cvstip-20030407/sysdeps/powerpc/fpu/bits/mathdef.h 2003-04-04 16:00:47.000000000 -0600
+++ libc23/sysdeps/powerpc/fpu/bits/mathdef.h 2003-04-08 08:38:31.000000000 -0500
@@ -39,9 +39,11 @@
typedef double double_t; /* `double' expressions are evaluated as
+/* If not defined by gcc float.h, define it here. */
+# ifndef FLT_EVAL_METHOD
/* Signal that types stay as they were declared. */
-# undef FLT_EVAL_METHOD
-# define FLT_EVAL_METHOD 0
+# define FLT_EVAL_METHOD 0
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF