aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--math/math.h3
-rw-r--r--stdlib/tst-strtod-round.c3
3 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index eaadc877ca..d7580c1489 100644
--- 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.
diff --git a/math/math.h b/math/math.h
index 72ec2ca241..dc532b7e74 100644
--- a/math/math.h
+++ b/math/math.h
@@ -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
diff --git a/stdlib/tst-strtod-round.c b/stdlib/tst-strtod-round.c
index f334b20af8..cbde457451 100644
--- a/stdlib/tst-strtod-round.c
+++ b/stdlib/tst-strtod-round.c
@@ -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>