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]

Re: [PATCH v3] Macroize inclusion of math-finite.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]