X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=math%2Fw_log_compat.c;h=df5e9e3533eb4b44554d4f4f421bab29a50f4561;hb=581c785bf31bc74430320c7856bbfa3875d025fe;hp=4b470695ae508b3c75c9824d91acfae8235ea4f8;hpb=f67d78192c1be9d56d3a6f3fda4e0a70ae48c44d;p=thirdparty%2Fglibc.git diff --git a/math/w_log_compat.c b/math/w_log_compat.c index 4b470695ae5..df5e9e3533e 100644 --- a/math/w_log_compat.c +++ b/math/w_log_compat.c @@ -1,6 +1,5 @@ -/* Copyright (C) 2011-2017 Free Software Foundation, Inc. +/* Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2011. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -14,16 +13,21 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - . */ + . */ #include #include #include +#include +#include +#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_29) \ + || defined NO_LONG_DOUBLE \ + || defined LONG_DOUBLE_COMPAT) /* wrapper log(x) */ double -__log (double x) +__log_compat (double x) { if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_) { @@ -41,8 +45,17 @@ __log (double x) return __ieee754_log (x); } -weak_alias (__log, log) -#ifdef NO_LONG_DOUBLE -strong_alias (__log, __logl) -weak_alias (__log, logl) +# if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_29) +compat_symbol (libm, __log_compat, log, GLIBC_2_0); +# endif +# ifdef NO_LONG_DOUBLE +weak_alias (__log_compat, logl) +# endif +# ifdef LONG_DOUBLE_COMPAT +/* Work around gas bug "multiple versions for symbol". */ +weak_alias (__log_compat, __log_compat_alias) + +LONG_DOUBLE_COMPAT_CHOOSE_libm_logl ( + compat_symbol (libm, __log_compat_alias, logl, FIRST_VERSION_libm_logl), ); +# endif #endif