diff mbox

[v2] Fix condition for inclusion of math-finite.h for long double

Message ID 1490971938-31836-1-git-send-email-gftg@linux.vnet.ibm.com
State New
Headers show

Commit Message

Gabriel F. T. Gomes March 31, 2017, 2:52 p.m. UTC
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(-)

Comments

Andreas Schwab March 31, 2017, 3:57 p.m. UTC | #1
On Mär 31 2017, "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com> wrote:

> 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.

Ok.

Andreas.
Gabriel F. T. Gomes March 31, 2017, 7:30 p.m. UTC | #2
On Fri, 31 Mar 2017 17:57:18 +0200
Andreas Schwab <schwab@linux-m68k.org> wrote:

> On Mär 31 2017, "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com> wrote:
> 
> > 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.  
> 
> Ok.

Thank you.  Committed as 1361e98d5602.
diff mbox

Patch

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