about summary refs log tree commit diff
path: root/math/s_significand_template.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-05-20 09:56:36 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-05-22 06:10:54 -0700
commita34f76edbda8a0b143111e670ca33c97623bfe56 (patch)
tree61595cfaf991d59a3f419f2c76ee71ec0a8628a0 /math/s_significand_template.c
parent5d4999e519ec77e75bef920e2540e8605015680a (diff)
downloadglibc-a34f76edbda8a0b143111e670ca33c97623bfe56.tar.gz
glibc-a34f76edbda8a0b143111e670ca33c97623bfe56.tar.xz
glibc-a34f76edbda8a0b143111e670ca33c97623bfe56.zip
Don't provide scalb/significand _FloatN aliases [BZ #31760]
scalb is a deprecated interface which was obsolescent in POSIX.1-2001,
removed in POSIX.1-2008, never made to C standard.  significant was
originally from BSD and never made in any standard.  Fix BZ #31760 by
not providing _FloatN aliases for them.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'math/s_significand_template.c')
-rw-r--r--math/s_significand_template.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/math/s_significand_template.c b/math/s_significand_template.c
index a351390411..0c8a1c3d75 100644
--- a/math/s_significand_template.c
+++ b/math/s_significand_template.c
@@ -30,4 +30,16 @@ M_DECL_FUNC (__significand) (FLOAT x)
 {
   return M_SUF (__ieee754_scalb) (x,(FLOAT) - M_SUF (__ilogb) (x));
 }
+
+/* Don't provide _FloatN aliases for significand which was originally
+   from BSD and never made in any standard.  */
+#undef libm_alias_float_other_r
+#define libm_alias_float_other_r(from, to, r)
+#undef libm_alias_double_other_r
+#define libm_alias_double_other_r(from, to, r)
+#undef libm_alias_ldouble_other_r
+#define libm_alias_ldouble_other_r(from, to, r)
+#undef libm_alias_float128_other_r
+#define libm_alias_float128_other_r(from, to, r)
+
 declare_mgen_alias (__significand, significand)