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 1/4] Macroize inclusion of math-finite.h (part 1)


On Mon, 13 Mar 2017, Gabriel F. T. Gomes wrote:

> +/* Only declare float and long double versions of these functions if
> +   __USE_ISOC99 is defined.  Other restrictions may apply for each
> +   specific function and are dealt with individually.  */
> +#if __MATH_DECLARING_DOUBLE || defined __USE_ISOC99
> +# define __MATH_REDIRCALL_X(from, args, to) \
> +   extern _Mdouble_ __REDIRECT_NTH (from, args, to)
> +# define __MATH_REDIRCALL(function, reentrant, args) \
> +   __MATH_REDIRCALL_X \
> +    (__REDIRFROM (function, reentrant, _MSUF_), args, \
> +     __REDIRTO (function, reentrant, _MSUF_))
> +# define __MATH_REDIRCALL_2(from, reentrant, args, to) \
> +   __MATH_REDIRCALL_X \
> +    (__REDIRFROM (from, reentrant, _MSUF_), args, \
> +     __REDIRTO (to, reentrant, _MSUF_))
> +#else
> +# define __MATH_REDIRCALL(function)
>  #endif

My inclination is that here it would be cleaner to make the include of 
math-finite.h from math.h for float and double conditional on 
__USE_ISOC99, just as the includes of mathcalls.h are conditional.  
(Then, for float128, the includes of mathcalls.h and math-finite.h would 
be conditional on the relevant conditional for "declare float128 
interfaces", but the include of mathcalls-helper-functions.h would be 
conditional on "float128 is supported by glibc and ABI-distinct from long 
double".)

-- 
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]