]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't provide scalb/significand _FloatN aliases [BZ #31760]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 20 May 2024 16:56:36 +0000 (09:56 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 22 May 2024 13:10:54 +0000 (06:10 -0700)
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>
math/s_significand_template.c
math/w_scalb_template.c

index a3513904110ec24095302a6203de0f86a4136d92..0c8a1c3d758af091f4a8e580e687988891de9af2 100644 (file)
@@ -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)
index 2fd5ca18782aa1af678f229ac131d87c8750c235..f9f98508e9d14672b25d2ca8f54d2a330f4a3058 100644 (file)
@@ -52,6 +52,18 @@ FLOAT M_DECL_FUNC (__scalb) (FLOAT x, FLOAT fn)
   return z;
 }
 
+/* Don't provide _FloatN aliases for scalb which is a deprecated interface,
+   was obsolescent in POSIX.1-2001, removed in POSIX.1-2008, never made to
+   C 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 (__scalb, scalb);
 
 #endif /* __USE_WRAPPER_TEMPLATE.  */