This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Macroize inclusion of math-finite.h
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gftg at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 28 Mar 2017 15:22:36 +0000
- Subject: Re: [PATCH v3] Macroize inclusion of math-finite.h
- Authentication-results: sourceware.org; auth=none
- References: <1490707683-7817-1-git-send-email-gftg@linux.vnet.ibm.com>
On Tue, 28 Mar 2017, Gabriel F. T. Gomes wrote:
> -#if ((defined __USE_XOPEN || defined __USE_ISOC99) \
> - && defined __extern_always_inline)
> +#if defined __extern_always_inline \
> + && ((__MATH_DECLARING_DOUBLE && \
> + (defined __USE_XOPEN || defined __USE_ISOC99)) \
> + || (!__MATH_DECLARING_DOUBLE && defined __USE_ISOC99))
I don't think you should need the dependence on __MATH_DECLARING_DOUBLE
here (lgamma). (defined __USE_XOPEN || defined __USE_ISOC99) should be
right regardless of the type; it's simply that for float / long double
it's exactly equivalent to __USE_ISOC99 because of the conditions on the
inclusion in math.h.
__MATH_DECLARING_DOUBLE conditions are only needed in cases like the
Bessel functions, where C99-based POSIX versions include the functions for
double but not for other types.
> #if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \
> && defined __extern_always_inline)
> +# if __MATH_DECLARE_LDOUBLE || defined __USE_ISOC99
> /* gamma. */
Likewise here, should be no need for the inner #if.
--
Joseph S. Myers
joseph@codesourcery.com