summaryrefslogtreecommitdiff
path: root/math/w_lgamma_r_template.c
AgeCommit message (Collapse)Author
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-10-09Use generic macros for lgamma_r function aliases.Joseph Myers
Continuing the use of generic macros for defining libm function aliases, in preparation for adding more _FloatN / _FloatNx function names, this patch makes the lgamma_r functions use such macros. declare_mgen_alias_r becomes a standard macro in math-type-macros.h instead of being locally defined in w_lgamma_r_templace.c. This in turn must be defined by each math-type-macros-<type>.h. Rather than providing an unused default in math-type-macros.h, that header is made to give an error if math-type-macros-<type>.h failed to define declare_mgen_alias or declare_mgen_alias_r. The compat lgamma_r wrappers are updated similarly. The ldbl-opt versions are removed as no longer needed. Tested for x86_64, and with build-many-glibcs.py. Installed stripped shared libraries are unchanged except for powerpc64le (where the usual issue applies that an ldbl-opt long double function previously used long_double_symbol unconditionally and now the symbol versions on powerpc64le mean weak_alias is used instead, resulting in the same symbol versions in the final shared library but still enough difference in the input objects for that library not to be byte-identical). * sysdeps/generic/math-type-macros.h [!declare_mgen_alias]: Give error. Remove default definition of declare_mgen_alias. [!declare_mgen_alias_r]: Likewise. * sysdeps/generic/math-type-macros-double.h [!declare_mgen_alias_r] (declare_mgen_alias_r): New macro. * sysdeps/generic/math-type-macros-float.h [!declare_mgen_alias_r] (declare_mgen_alias_r): Likewise. * sysdeps/generic/math-type-macros-float128.h [!declare_mgen_alias_r] (declare_mgen_alias_r): Likewise. * sysdeps/generic/math-type-macros-ldouble.h [!declare_mgen_alias_r] (declare_mgen_alias_r): Likewise. * math/w_lgamma_r_template.c (declare_mgen_alias_r_x): Remove macro. (declare_mgen_alias_r_s): Likewise. (declare_mgen_alias_r): Likewise. * math/w_lgamma_r_compat.c: Include <libm-alias-double.h>. (lgamma_r): Define using libm_alias_double_r. * math/w_lgammaf_r_compat.c: Include <libm-alias-float.h>. (lgammaf_r): Define using libm_alias_float_r. * math/w_lgammal_r_compat.c: Include <libm-alias-ldouble.h>. (lgammal_r): Define using libm_alias_ldouble_r. * sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c: Remove file. * sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c: Likewise.
2017-06-22Make errno-setting libm templates include errno.h.Joseph Myers
Various type-generic libm wrapper templates, as used for float128, set errno but do not include errno.h. I presume they must get an implicit include from some internal header on powerpc64le; they don't get such an implicit include on x86_64. This patch adds the missing includes of errno.h to each such wrapper. Tested for x86_64 (in conjunction with float128 patches). * math/w_acos_template.c [__USE_WRAPPER_TEMPLATE]: Include <errno.h>. * math/w_acosh_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_asin_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_atanh_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_cosh_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_exp10_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_exp2_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_exp_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_fmod_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_hypot_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_j0_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_j1_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_jn_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_lgamma_r_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_lgamma_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_log10_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_log2_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_log_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_pow_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_remainder_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_sinh_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_sqrt_template.c [__USE_WRAPPER_TEMPLATE]: Likewise. * math/w_tgamma_template.c [__USE_WRAPPER_TEMPLATE]: Likewise.
2017-02-23Add new templates for IEEE wrappersGabriel F. T. Gomes
Several wrappers for IEEE functions use _LIB_VERSION / matherr / __kernel_standard functionality, which we want to obsolete. New wrappers, such as for float128, must not use this functionality. This patch adds new wrappers that only __set_errno and can be used by the new float128 wrappers. Tested for powerpc64le. * math/Makefile: Add wrappers to gen-libm-calls. * math/w_acos_template.c: New file. * math/w_acosh_template.c: Likewise. * math/w_asin_template.c: Likewise. * math/w_atan2_template.c: Likewise. * math/w_atanh_template.c: Likewise. * math/w_cosh_template.c: Likewise. * math/w_exp10_template.c: Likewise. * math/w_exp2_template.c: Likewise. * math/w_exp_template.c: Likewise. * math/w_fmod_template.c: Likewise. * math/w_hypot_template.c: Likewise. * math/w_j0_template.c: Likewise. * math/w_j1_template.c: Likewise. * math/w_jn_template.c: Likewise. * math/w_lgamma_r_template.c: Likewise. * math/w_lgamma_template.c: Likewise. * math/w_log10_template.c: Likewise. * math/w_log2_template.c: Likewise. * math/w_log_template.c: Likewise. * math/w_pow_template.c: Likewise. * math/w_remainder_template.c: Likewise. * math/w_sinh_template.c: Likewise. * math/w_sqrt_template.c: Likewise. * math/w_tgamma_template.c: Likewise.: Likewise. * sysdeps/generic/math-type-macros-double.h (__USE_WRAPPER_TEMPLATE): New macro to control inclusion of the new wrappers. * sysdeps/generic/math-type-macros-float.h: Likewise. * sysdeps/generic/math-type-macros-ldouble.h: Likewise.