]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdlib/tst-strtod-round.c: Fix build on ARM
authorWill Newton <will.newton@linaro.org>
Tue, 16 Sep 2014 19:37:04 +0000 (12:37 -0700)
committerWill Newton <will.newton@linaro.org>
Tue, 30 Sep 2014 14:03:50 +0000 (15:03 +0100)
Building this test on ARM fails because the prototypes for the long
double variants of the math functions are unavailable.

Add an additional include guard to math.h that enables long double math
function declarations if _LIBC_TEST is defined and define _LIBC_TEST in
stdlib/tst-strtod-round.c.

ChangeLog:

2014-09-30  Will Newton  <will.newton@linaro.org>

* math/math.h: Define long double math functions if
_LIBC_TEST is defined.
* stdlib/tst-strtod-round.c: Define _LIBC_TEST.

ChangeLog
math/math.h
stdlib/tst-strtod-round.c

index eaadc877caae332fcc76550ff2eb14295c151d21..d7580c1489a68086c5883ac0450eb3acf0e280d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-09-30  Will Newton  <will.newton@linaro.org>
 
+       * math/math.h: Define long double math functions if
+       _LIBC_TEST is defined.
+       * stdlib/tst-strtod-round.c: Define _LIBC_TEST.
+
        * localedata/Makefile: Move assignment to tests-special
        into an ifdef testing run-built-tests.
        * timezone/Makefile: Likewise.
index 72ec2ca241ded80decce0c7b86f968b4da9564c6..dc532b7e747a3aeae7db1e34f305add9fe7623de 100644 (file)
@@ -92,7 +92,8 @@ __BEGIN_DECLS
 # undef        __MATH_PRECNAME
 
 # if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
-     || defined __LDBL_COMPAT
+     || defined __LDBL_COMPAT \
+     || defined _LIBC_TEST
 #  ifdef __LDBL_COMPAT
 
 #   ifdef __USE_ISOC99
index f334b20af86848ce9393a032be9b08cebe90d192..cbde4574515899a9591f0d58bc4dbd0c58c3e3ba 100644 (file)
@@ -17,6 +17,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+/* Defining _LIBC_TEST ensures long double math functions are
+   declared in the headers.  */
+#define _LIBC_TEST 1
 #include <fenv.h>
 #include <float.h>
 #include <math.h>