diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-01-07 00:41:23 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-01-07 00:41:23 +0000 |
commit | 01238691bb03f0110455b663439eecf9a58c8f83 (patch) | |
tree | 8d113f83a27b4a5ecb08de1a6fff7f2b6e2be6e6 /sysdeps/generic/math_private.h | |
parent | cd42798aef204592b0165bcfacef975ff3ce2973 (diff) | |
download | glibc-01238691bb03f0110455b663439eecf9a58c8f83.tar.gz glibc-01238691bb03f0110455b663439eecf9a58c8f83.tar.xz glibc-01238691bb03f0110455b663439eecf9a58c8f83.zip |
Fix libm fesetround namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of fesetround by making it a weak alias of __fesetround and making the affected code call __fesetround. An existing __fesetround function in fenv_libc.h for powerpc is renamed to __fesetround_inline. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fesetround failures disappear from the linknamespace test results (feupdateenv remains to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__fesetround): Declare. Use libm_hidden_proto. * math/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/aarch64/fpu/fesetround.c (fesetround): Likewise. * sysdeps/alpha/fpu/fesetround.c (fesetround): Likewise. * sysdeps/arm/fesetround.c (fesetround): Likewise. * sysdeps/hppa/fpu/fesetround.c (fesetround): Likewise. * sysdeps/i386/fpu/fesetround.c (fesetround): Likewise. * sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise. * sysdeps/m68k/fpu/fesetround.c (fesetround): Likewise. * sysdeps/mips/fpu/fesetround.c (fesetround): Likewise. * sysdeps/powerpc/fpu/fenv_libc.h (__fesetround): Rename to __fesetround_inline. * sysdeps/powerpc/fpu/fenv_private.h (libc_fesetround_ppc): Call __fesetround_inline instead of __fesetround. * sysdeps/powerpc/fpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. Call __fesetround_inline instead of __fesetround. * sysdeps/powerpc/nofpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c (fesetround): Likewise. * sysdeps/s390/fpu/fesetround.c (fesetround): Likewise. * sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise. * sysdeps/sparc/fpu/fesetround.c (fesetround): Likewise. * sysdeps/tile/math_private.h (__fesetround): New inline function. * sysdeps/x86_64/fpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/generic/math_private.h (default_libc_fesetround): Call __fesetround instead of fesetround. (default_libc_feholdexcept_setround): Likewise. (libc_feholdsetround_ctx): Likewise. (libc_feholdsetround_noex_ctx): Likewise.
Diffstat (limited to 'sysdeps/generic/math_private.h')
-rw-r--r-- | sysdeps/generic/math_private.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h index 3d987383e9..24e2babd61 100644 --- a/sysdeps/generic/math_private.h +++ b/sysdeps/generic/math_private.h @@ -415,7 +415,7 @@ default_libc_feholdexcept (fenv_t *e) static __always_inline void default_libc_fesetround (int r) { - (void) fesetround (r); + (void) __fesetround (r); } #ifndef libc_fesetround @@ -432,7 +432,7 @@ static __always_inline void default_libc_feholdexcept_setround (fenv_t *e, int r) { __feholdexcept (e); - fesetround (r); + __fesetround (r); } #ifndef libc_feholdexcept_setround @@ -599,7 +599,7 @@ libc_feholdsetround_ctx (struct rm_ctx *ctx, int round) { ctx->updated_status = true; __fegetenv (&ctx->env); - fesetround (round); + __fesetround (round); } } @@ -619,7 +619,7 @@ libc_feholdsetround_noex_ctx (struct rm_ctx *ctx, int round) /* Update rounding mode only if different. */ if (__glibc_unlikely (round != get_rounding_mode ())) - fesetround (round); + __fesetround (round); } static __always_inline void |