diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-01-06 23:36:20 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-01-06 23:36:20 +0000 |
commit | cd42798aef204592b0165bcfacef975ff3ce2973 (patch) | |
tree | 24fe686b4bdc0d9fa774d4dea971a33c37b476f5 | |
parent | 500bfbd4922902ea278adab06e58b77eb355ba82 (diff) | |
download | glibc-cd42798aef204592b0165bcfacef975ff3ce2973.zip glibc-cd42798aef204592b0165bcfacef975ff3ce2973.tar.gz glibc-cd42798aef204592b0165bcfacef975ff3ce2973.tar.bz2 |
Fix libm fesetenv namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of fesetenv by making it a weak alias of
__fesetenv and making the affected code (including various copies of
feupdateenv which also gets called from C90 functions) call
__fesetenv.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch). Also tested for ARM
(soft-float) that fesetenv failures disappear from the linknamespace
test results (fsetround and feupdateenv remain to be addressed to
complete fixing bug 17748).
[BZ #17748]
* include/fenv.h (__fesetenv): Use libm_hidden_proto.
* math/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/aarch64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv
and define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/alpha/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/arm/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise.
* sysdeps/i386/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/ia64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/mips/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Use
libm_hidden_def.
* sysdeps/powerpc/nofpu/fesetenv.c (__fesetenv): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c (__fesetenv):
Likewise.
* sysdeps/s390/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise.
* sysdeps/sparc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/tile/math_private.h (__fesetenv): New inline function.
* sysdeps/x86_64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv
and define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/generic/math_private.h (default_libc_fesetenv): Use
__fesetenv instead of fesetenv.
(libc_feresetround_noex_ctx): Likewise.
* sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c
(__feupdateenv): Likewise.
* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Likewise.
32 files changed, 102 insertions, 30 deletions
@@ -1,3 +1,49 @@ +2015-01-06 Joseph Myers <joseph@codesourcery.com> + + [BZ #17748] + * include/fenv.h (__fesetenv): Use libm_hidden_proto. + * math/fesetenv.c (__fesetenv): Use libm_hidden_def. + * sysdeps/aarch64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv + and define as weak alias of __fesetenv. Use libm_hidden_weak. + * sysdeps/alpha/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. + * sysdeps/arm/fesetenv.c (fesetenv): Rename to __fesetenv and + define as weak alias of __fesetenv. Use libm_hidden_weak. + * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise. + * sysdeps/i386/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. + * sysdeps/ia64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and + define as weak alias of __fesetenv. Use libm_hidden_weak. + * sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. + * sysdeps/mips/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and + define as weak alias of __fesetenv. Use libm_hidden_weak. + * sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Use + libm_hidden_def. + * sysdeps/powerpc/nofpu/fesetenv.c (__fesetenv): Likewise. + * sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c (__fesetenv): + Likewise. + * sysdeps/s390/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and + define as weak alias of __fesetenv. Use libm_hidden_weak. + * sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise. + * sysdeps/sparc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. + * sysdeps/tile/math_private.h (__fesetenv): New inline function. + * sysdeps/x86_64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv + and define as weak alias of __fesetenv. Use libm_hidden_weak. + * sysdeps/generic/math_private.h (default_libc_fesetenv): Use + __fesetenv instead of fesetenv. + (libc_feresetround_noex_ctx): Likewise. + * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise. + * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise. + * sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Likewise. + * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise. + * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise. + * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise. + * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise. + * sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c + (__feupdateenv): Likewise. + * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise. + * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. + * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise. + * sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Likewise. + 2015-01-06 Aurelien Jarno <aurelien@aurel32.net> [BZ #17806] diff --git a/include/fenv.h b/include/fenv.h index 0a74fa0..1f30baa 100644 --- a/include/fenv.h +++ b/include/fenv.h @@ -23,6 +23,7 @@ libm_hidden_proto (__fegetenv) libm_hidden_proto (fegetround) libm_hidden_proto (__fegetround) libm_hidden_proto (fesetenv) +libm_hidden_proto (__fesetenv) libm_hidden_proto (fesetround) libm_hidden_proto (feholdexcept) libm_hidden_proto (__feholdexcept) diff --git a/math/fesetenv.c b/math/fesetenv.c index e84411a..8747a14 100644 --- a/math/fesetenv.c +++ b/math/fesetenv.c @@ -34,6 +34,7 @@ __fesetenv (const fenv_t *envp) strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/aarch64/fpu/fesetenv.c b/sysdeps/aarch64/fpu/fesetenv.c index fef5f84..f47115f 100644 --- a/sysdeps/aarch64/fpu/fesetenv.c +++ b/sysdeps/aarch64/fpu/fesetenv.c @@ -20,7 +20,7 @@ #include <fpu_control.h> int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { fpu_control_t fpcr; fpu_control_t fpcr_new; @@ -67,4 +67,6 @@ fesetenv (const fenv_t *envp) return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c index 02b79d5..c87a23c 100644 --- a/sysdeps/alpha/fpu/fesetenv.c +++ b/sysdeps/alpha/fpu/fesetenv.c @@ -52,5 +52,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c index 063785b..8b52145 100644 --- a/sysdeps/alpha/fpu/feupdateenv.c +++ b/sysdeps/alpha/fpu/feupdateenv.c @@ -28,7 +28,7 @@ __feupdateenv (const fenv_t *envp) tmp = __ieee_get_fp_control (); /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the diff --git a/sysdeps/arm/fesetenv.c b/sysdeps/arm/fesetenv.c index 3b79ea1..fc24e2f 100644 --- a/sysdeps/arm/fesetenv.c +++ b/sysdeps/arm/fesetenv.c @@ -22,7 +22,7 @@ int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { fpu_control_t fpscr, new_fpscr, updated_fpscr; @@ -61,4 +61,6 @@ fesetenv (const fenv_t *envp) return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index 3a080d8..3d98738 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -462,7 +462,7 @@ default_libc_feholdexcept_setround (fenv_t *e, int r) static __always_inline void default_libc_fesetenv (fenv_t *e) { - (void) fesetenv (e); + (void) __fesetenv (e); } #ifndef libc_fesetenv @@ -626,7 +626,7 @@ static __always_inline void libc_feresetround_noex_ctx (struct rm_ctx *ctx) { /* Restore exception flags and rounding mode. */ - fesetenv (&ctx->env); + __fesetenv (&ctx->env); } # define libc_feholdsetroundf_ctx libc_feholdsetround_ctx diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c index 2d28446..5b33ad6 100644 --- a/sysdeps/hppa/fpu/fesetenv.c +++ b/sysdeps/hppa/fpu/fesetenv.c @@ -22,7 +22,7 @@ #include <fenv.h> int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { union { unsigned long long buf[4]; fenv_t env; } temp; unsigned long long *bufptr; @@ -60,4 +60,6 @@ fesetenv (const fenv_t *envp) /* Success. */ return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c index 60c0f11..e6a07c3 100644 --- a/sysdeps/hppa/fpu/feupdateenv.c +++ b/sysdeps/hppa/fpu/feupdateenv.c @@ -33,7 +33,7 @@ feupdateenv (const fenv_t *envp) /* Currently raised exceptions not cleared */ temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27); /* Install new environment. */ - fesetenv (&temp); + __fesetenv (&temp); /* Success. */ return 0; } diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c index d692a93..9566e09 100644 --- a/sysdeps/i386/fpu/fesetenv.c +++ b/sysdeps/i386/fpu/fesetenv.c @@ -102,5 +102,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c index c96708b..2f58ab3 100644 --- a/sysdeps/i386/fpu/feupdateenv.c +++ b/sysdeps/i386/fpu/feupdateenv.c @@ -38,7 +38,7 @@ __feupdateenv (const fenv_t *envp) temp = (temp | xtemp) & FE_ALL_EXCEPT; /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the diff --git a/sysdeps/ia64/fpu/fesetenv.c b/sysdeps/ia64/fpu/fesetenv.c index f35f62c..62152f5 100644 --- a/sysdeps/ia64/fpu/fesetenv.c +++ b/sysdeps/ia64/fpu/fesetenv.c @@ -20,7 +20,7 @@ #include <fenv.h> int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { fenv_t env; @@ -38,4 +38,6 @@ fesetenv (const fenv_t *envp) return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/ia64/fpu/feupdateenv.c b/sysdeps/ia64/fpu/feupdateenv.c index 3047f91..c6415ed 100644 --- a/sysdeps/ia64/fpu/feupdateenv.c +++ b/sysdeps/ia64/fpu/feupdateenv.c @@ -29,7 +29,7 @@ feupdateenv (const fenv_t *envp) __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr)); /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the saved exceptions. */ __feraiseexcept ((int) (fpsr >> 13) & FE_ALL_EXCEPT); diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c index dd64242..5351ae9 100644 --- a/sysdeps/m68k/fpu/fesetenv.c +++ b/sysdeps/m68k/fpu/fesetenv.c @@ -70,5 +70,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c index 5d733cb..80bd593 100644 --- a/sysdeps/m68k/fpu/feupdateenv.c +++ b/sysdeps/m68k/fpu/feupdateenv.c @@ -29,7 +29,7 @@ __feupdateenv (const fenv_t *envp) fpsr &= FE_ALL_EXCEPT; /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c index 1470e9c..e1629aa 100644 --- a/sysdeps/mips/fpu/fesetenv.c +++ b/sysdeps/mips/fpu/fesetenv.c @@ -21,7 +21,7 @@ #include <fpu_control.h> int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { fpu_control_t cw; @@ -39,4 +39,6 @@ fesetenv (const fenv_t *envp) return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c index 4b3bda9..2fe8ebe 100644 --- a/sysdeps/mips/fpu/feupdateenv.c +++ b/sysdeps/mips/fpu/feupdateenv.c @@ -30,7 +30,7 @@ feupdateenv (const fenv_t *envp) temp &= FE_ALL_EXCEPT; /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the safed exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the diff --git a/sysdeps/powerpc/fpu/fesetenv.c b/sysdeps/powerpc/fpu/fesetenv.c index 4ce41a6..e7407cd 100644 --- a/sysdeps/powerpc/fpu/fesetenv.c +++ b/sysdeps/powerpc/fpu/fesetenv.c @@ -58,5 +58,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/sysdeps/powerpc/nofpu/fesetenv.c index e9ffb62..0385d21 100644 --- a/sysdeps/powerpc/nofpu/fesetenv.c +++ b/sysdeps/powerpc/nofpu/fesetenv.c @@ -42,5 +42,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c index 3afe548..892e463 100644 --- a/sysdeps/powerpc/nofpu/feupdateenv.c +++ b/sysdeps/powerpc/nofpu/feupdateenv.c @@ -31,7 +31,7 @@ __feupdateenv (const fenv_t *envp) saved_exceptions = __sim_exceptions_thread; /* Set environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise old exceptions. */ __sim_exceptions_thread |= saved_exceptions; diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c index 2e3acbe..f0ee1f0 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c @@ -45,5 +45,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c b/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c index 6132c7e..cb6a148 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c @@ -28,7 +28,7 @@ __feupdateenv (const fenv_t *envp) exc = fegetenv_register () & SPEFSCR_ALL_EXCEPT; /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise (if appropriate) saved exceptions. */ __feraiseexcept_spe (exc); diff --git a/sysdeps/s390/fpu/fesetenv.c b/sysdeps/s390/fpu/fesetenv.c index d675feb..467716a 100644 --- a/sysdeps/s390/fpu/fesetenv.c +++ b/sysdeps/s390/fpu/fesetenv.c @@ -25,7 +25,7 @@ #include <unistd.h> int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { fenv_t env; @@ -47,4 +47,6 @@ fesetenv (const fenv_t *envp) /* Success. */ return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/s390/fpu/feupdateenv.c b/sysdeps/s390/fpu/feupdateenv.c index 662b0df..957c8fe 100644 --- a/sysdeps/s390/fpu/feupdateenv.c +++ b/sysdeps/s390/fpu/feupdateenv.c @@ -31,7 +31,7 @@ feupdateenv (const fenv_t *envp) /* Raise the exceptions since the last call to feholdenv */ /* re install saved environment. */ - fesetenv (envp); + __fesetenv (envp); __feraiseexcept ((int) temp); /* Success. */ diff --git a/sysdeps/sh/sh4/fpu/fesetenv.c b/sysdeps/sh/sh4/fpu/fesetenv.c index 846e819..e4bfbe8 100644 --- a/sysdeps/sh/sh4/fpu/fesetenv.c +++ b/sysdeps/sh/sh4/fpu/fesetenv.c @@ -20,7 +20,7 @@ #include <fpu_control.h> int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { if (envp == FE_DFL_ENV) _FPU_SETCW (_FPU_DEFAULT); @@ -31,4 +31,6 @@ fesetenv (const fenv_t *envp) } return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/sh/sh4/fpu/feupdateenv.c b/sysdeps/sh/sh4/fpu/feupdateenv.c index 97d524b..25729d9 100644 --- a/sysdeps/sh/sh4/fpu/feupdateenv.c +++ b/sysdeps/sh/sh4/fpu/feupdateenv.c @@ -31,7 +31,7 @@ feupdateenv (const fenv_t *envp) /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the same as the ones specified using the FE_* constants. */ - fesetenv (envp); + __fesetenv (envp); __feraiseexcept ((int) temp); return 0; diff --git a/sysdeps/sparc/fpu/fesetenv.c b/sysdeps/sparc/fpu/fesetenv.c index 11954be..3f89ab7 100644 --- a/sysdeps/sparc/fpu/fesetenv.c +++ b/sysdeps/sparc/fpu/fesetenv.c @@ -50,5 +50,6 @@ strong_alias (__fesetenv, __old_fesetenv) compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); #endif +libm_hidden_def (__fesetenv) libm_hidden_ver (__fesetenv, fesetenv) versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/sparc/fpu/feupdateenv.c b/sysdeps/sparc/fpu/feupdateenv.c index db5f382..cb001e1 100644 --- a/sysdeps/sparc/fpu/feupdateenv.c +++ b/sysdeps/sparc/fpu/feupdateenv.c @@ -29,7 +29,7 @@ __feupdateenv (const fenv_t *envp) tmp &= FE_ALL_EXCEPT; /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the safed exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the diff --git a/sysdeps/tile/math_private.h b/sysdeps/tile/math_private.h index 6b9e761..8ff1435 100644 --- a/sysdeps/tile/math_private.h +++ b/sysdeps/tile/math_private.h @@ -32,6 +32,7 @@ extern inline int fegetenv (fenv_t *__e) { return 0; } extern inline int __fegetenv (fenv_t *__e) { return 0; } extern inline int fesetenv (const fenv_t *__e) { return 0; } +extern inline int __fesetenv (const fenv_t *__e) { return 0; } extern inline int feupdateenv (const fenv_t *__e) { return 0; } extern inline int fegetround (void) { return FE_TONEAREST; } extern inline int __fegetround (void) { return FE_TONEAREST; } diff --git a/sysdeps/x86_64/fpu/fesetenv.c b/sysdeps/x86_64/fpu/fesetenv.c index 40428a6..3e3fd84 100644 --- a/sysdeps/x86_64/fpu/fesetenv.c +++ b/sysdeps/x86_64/fpu/fesetenv.c @@ -21,7 +21,7 @@ int -fesetenv (const fenv_t *envp) +__fesetenv (const fenv_t *envp) { fenv_t temp; @@ -85,4 +85,6 @@ fesetenv (const fenv_t *envp) /* Success. */ return 0; } -libm_hidden_def (fesetenv) +libm_hidden_def (__fesetenv) +weak_alias (__fesetenv, fesetenv) +libm_hidden_weak (fesetenv) diff --git a/sysdeps/x86_64/fpu/feupdateenv.c b/sysdeps/x86_64/fpu/feupdateenv.c index aaff4d2..7aab1ad 100644 --- a/sysdeps/x86_64/fpu/feupdateenv.c +++ b/sysdeps/x86_64/fpu/feupdateenv.c @@ -30,7 +30,7 @@ __feupdateenv (const fenv_t *envp) temp = (temp | xtemp) & FE_ALL_EXCEPT; /* Install new environment. */ - fesetenv (envp); + __fesetenv (envp); /* Raise the saved exception. Incidently for us the implementation defined format of the values in objects of type fexcept_t is the |