public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com>
To: schwab@linux-m68k.org
Cc: libc-alpha@sourceware.org
Subject: [PATCH v2] Fix condition for inclusion of math-finite.h for long double
Date: Fri, 31 Mar 2017 14:52:00 -0000	[thread overview]
Message-ID: <1490971938-31836-1-git-send-email-gftg@linux.vnet.ibm.com> (raw)
In-Reply-To: <1490966034-23473-1-git-send-email-gftg@linux.vnet.ibm.com>

I learned how to use build-many-glibcs.py and tested the fix.  With
it, I noticed that there was still an instance of #if
__MATH_DECLARE_LDOUBLE (in math-finite.h).  This new version also
changes this ocurrence.

Now tested with build-many-glibcs for the armeb-linux-gnueabi-be8
config.

-- 8< --
The condition for declaration of long double functions in
math-finite.h was #ifdef __MATH_DECLARE_LDOUBLE before the
macroization of this file.  After the macroization, it was incorreclty
changed to #if __MATH_DECLARE_LDOUBLE, which broke the build for arm.

2017-03-31  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>

	* math/math.h: Fix check for __MATH_DECLARE_LDOUBLE.
	* math/bits/math-finite.h: Likewise.
---
 math/bits/math-finite.h | 2 +-
 math/math.h             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h
index 59cd06b..29f2f2e 100644
--- a/math/bits/math-finite.h
+++ b/math/bits/math-finite.h
@@ -177,7 +177,7 @@ __MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_));
 #if (__MATH_DECLARING_DOUBLE \
      && (defined __USE_MISC \
 	 || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \
-    || (!__MATH_DECLARE_LDOUBLE && defined __USE_MISC)
+    || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)
 /* scalb.  */
 __MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_));
 #endif
diff --git a/math/math.h b/math/math.h
index 0c19d45..cfaed0e 100644
--- a/math/math.h
+++ b/math/math.h
@@ -588,7 +588,7 @@ extern int matherr (struct exception *__exc);
 #  undef _MSUF_
 
 /* Include bits/math-finite.h for long double.  */
-#  if __MATH_DECLARE_LDOUBLE
+#  ifdef __MATH_DECLARE_LDOUBLE
 #   define _Mdouble_ long double
 #   define __MATH_DECLARING_DOUBLE 0
 #   define __MATH_DECLARING_LDOUBLE 1
-- 
2.4.11

  reply	other threads:[~2017-03-31 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 18:41 [PATCH v4] Macroize inclusion of math-finite.h Gabriel F. T. Gomes
2017-03-29 20:18 ` Joseph Myers
2017-03-31  7:13 ` Andreas Schwab
2017-03-31 13:14   ` [PATCH] Fix condition for inclusion of math-finite.h for long double Gabriel F. T. Gomes
2017-03-31 14:52     ` Gabriel F. T. Gomes [this message]
2017-03-31 15:57       ` [PATCH v2] " Andreas Schwab
2017-03-31 19:30         ` Gabriel F. T. Gomes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490971938-31836-1-git-send-email-gftg@linux.vnet.ibm.com \
    --to=gftg@linux.vnet.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).