This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Tue, Sep 16, 2014 at 02:32:50PM -0700, Will Newton wrote:
> 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-16 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.
> ---
> math/math.h | 2 +-
> stdlib/tst-strtod-round.c | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/math/math.h b/math/math.h
> index 72ec2ca..dc7ab2d 100644
> --- a/math/math.h
> +++ b/math/math.h
> @@ -91,7 +91,7 @@ __BEGIN_DECLS
> # undef _Mdouble_END_NAMESPACE
> # undef __MATH_PRECNAME
>
> -# if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
> +# if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC && !defined _LIBC_TEST) \
Wouldn't it be nicer to read with:
# if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC)
|| defined _LIBC_TEST
|| defined __LDBL_COMPAT
...
The double negation looks a bit ugly to me. Looks OK otherwise.
Siddhesh
Attachment:
pgpK7OUnwSBTz.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |