mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-28 05:21:13 +00:00
8116321f65
Concluding the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of feupdateenv by making it a weak alias for __feupdateenv and making the affected code call __feupdateenv. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). Also tested for ARM (soft-float) that the math.h linknamespace tests now pass. [BZ #17748] * include/fenv.h (__feupdateenv): Use libm_hidden_proto. * math/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/arm/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__feupdateenv): New inline function. * sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/generic/math_private.h (default_libc_feupdateenv): Call __feupdateenv instead of feupdateenv. (default_libc_feupdateenv_test): Likewise. (libc_feresetround_ctx): Likewise.
48 lines
1.4 KiB
C
48 lines
1.4 KiB
C
#ifndef _FENV_H
|
|
#include <math/fenv.h>
|
|
|
|
#ifndef _ISOMAC
|
|
# include <stdbool.h>
|
|
/* Now define the internal interfaces. */
|
|
|
|
extern int __feclearexcept (int __excepts);
|
|
extern int __fegetexcept (void);
|
|
extern int __fegetexceptflag (fexcept_t *__flagp, int __excepts);
|
|
extern int __feraiseexcept (int __excepts);
|
|
extern int __fesetexceptflag (const fexcept_t *__flagp, int __excepts);
|
|
extern int __fegetenv (fenv_t *__envp);
|
|
extern int __fesetenv (const fenv_t *__envp);
|
|
extern int __feupdateenv (const fenv_t *__envp);
|
|
extern __typeof (fegetround) __fegetround;
|
|
extern __typeof (feholdexcept) __feholdexcept;
|
|
extern __typeof (fesetround) __fesetround;
|
|
|
|
libm_hidden_proto (feraiseexcept)
|
|
libm_hidden_proto (__feraiseexcept)
|
|
libm_hidden_proto (fegetenv)
|
|
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 (__fesetround)
|
|
libm_hidden_proto (feholdexcept)
|
|
libm_hidden_proto (__feholdexcept)
|
|
libm_hidden_proto (feupdateenv)
|
|
libm_hidden_proto (__feupdateenv)
|
|
libm_hidden_proto (fetestexcept)
|
|
libm_hidden_proto (feclearexcept)
|
|
|
|
/* Rounding mode context. This allows functions to set/restore rounding mode
|
|
only when the desired rounding mode is different from the current rounding
|
|
mode. */
|
|
struct rm_ctx
|
|
{
|
|
fenv_t env;
|
|
bool updated_status;
|
|
};
|
|
#endif
|
|
|
|
#endif
|