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