[PATCH v3] Macroize inclusion of math-finite.h
Joseph Myers
joseph@codesourcery.com
Tue Mar 28 15:22:00 GMT 2017
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
More information about the Libc-alpha
mailing list