This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PPC mathdef.h warning M2


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.


Steven Munroe
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
 				   `double'.  */
 
+/* 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
+#   endif
 
 /* Define `INFINITY' as value of type `float'.  */
 #   define INFINITY	HUGE_VALF

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]