public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix for math.h
@ 2004-12-16 14:53 Andreas Jaeger
  2004-12-16 16:42 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Jaeger @ 2004-12-16 14:53 UTC (permalink / raw)
  To: GNU libc hackers

[-- Attachment #1: Type: text/plain, Size: 2085 bytes --]


If you compile with -Wundef -Wsystem-headers you get warnings that
__USE_ISOC99 is not defined in math.h.  In general we use #ifdef
__USE_ISOC99 and not just an #if...  Here's a patch for the remaining
places.

Ok to commit?

Andreas

2004-12-16  Andreas Jaeger  <aj@suse.de>

	* math/math.h: Use #if defined to not receive warnings about
	undefined symbols.

============================================================
Index: math/math.h
--- math/math.h	15 Mar 2004 21:44:08 -0000	1.68
+++ math/math.h	16 Dec 2004 14:53:31 -0000
@@ -1,5 +1,5 @@
 /* Declarations for math functions.
-   Copyright (C) 1991-1993,1995-1999,2001,2002 Free Software Foundation, Inc.
+   Copyright (C) 1991-1993,1995-1999,2001,2002,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -132,7 +132,7 @@ extern int signgam;
 
 
 /* ISO C99 defines some generic macros which work on any data type.  */
-#if __USE_ISOC99
+#ifdef __USE_ISOC99
 
 /* Get the architecture specific values describing the floating-point
    evaluation.  The following symbols will get defined:
@@ -362,7 +362,7 @@ extern int matherr (struct exception *__
 # define __NO_MATH_INLINES	1
 #endif
 
-#if __USE_ISOC99 && __GNUC_PREREQ(2,97)
+#if defined __USE_ISOC99 && __GNUC_PREREQ(2,97)
 /* ISO C99 defines some macros to compare number while taking care for
    unordered numbers.  Many FPUs provide special instructions to support
    these operations.  Generic support in GCC for these as builtins went
@@ -382,7 +382,7 @@ extern int matherr (struct exception *__
 # include <bits/mathinline.h>
 #endif
 
-#if __USE_ISOC99
+#ifdef __USE_ISOC99
 /* If we've still got undefined comparison macros, provide defaults.  */
 
 /* Return nonzero value if X is greater than Y.  */

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix for math.h
  2004-12-16 14:53 Fix for math.h Andreas Jaeger
@ 2004-12-16 16:42 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-12-16 16:42 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hackers

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

Andreas Jaeger wrote:

> Ok to commit?

Yes.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-16 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-16 14:53 Fix for math.h Andreas Jaeger
2004-12-16 16:42 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).