This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/4] Macroize inclusion of math-finite.h (part 1)
On Fri, 17 Mar 2017, Gabriel F. T. Gomes wrote:
> +/* Redirect long double versions of the functions to the corresponding
> + double version if __NO_LONG_DOUBLE_MATH is defined. */
> +#ifdef __NO_LONG_DOUBLE_MATH
> +# define __REDIRTO_X(function, reentrant, suffix) \
> + __ ## function ## reentrant ## _finite
> +#else
> +# define __REDIRTO_X(function, reentrant, suffix) \
> + __ ## function ## suffix ## reentrant ## _finite
> #endif
> +#define __REDIRTO(...) __REDIRTO_X(__VA_ARGS__)
Won't this discard the suffix in the function redirected to for float as
well as for long double, in the __NO_LONG_DOUBLE_MATH case?
I would expect either a conditional like defined __NO_LONG_DOUBLE_MATH &&
__MATH_DECLARING_LDOUBLE (where __MATH_DECLARING_LDOUBLE is a new macro
defined in math.h, which then replaces __MATH_DECLARING_LGAMMAL in patch 2
- not that I'm convinced __MATH_DECLARING_LGAMMAL is actually needed), or
something defined in math.h before the include of bits/math-finite.h that
discards the suffix for the (long double, __NO_LONG_DOUBLE_MATH) case but
not otherwise.
--
Joseph S. Myers
joseph@codesourcery.com