This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Move declare_mgen_finite_alias definition


Move declare_mgen_finite_alias, declare_mgen_finite_alias_s and
declare_mgen_finite_alias_x to a shared place in order to reuse them in
other files that also declare _finite aliases.

2018-05-11  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

	* math/e_exp2_template.c (declare_mgen_finite_alias,
	declare_mgen_finite_alias_s, declare_mgen_finite_alias_x): Move to...
	* sysdeps/generic/math-type-macros.h (declare_mgen_finite_alias,
	declare_mgen_finite_alias_s, declare_mgen_finite_alias_x): ... here.
---
 math/e_exp2_template.c             |  7 -------
 sysdeps/generic/math-type-macros.h | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/math/e_exp2_template.c b/math/e_exp2_template.c
index 94a21054c2..1408d76f25 100644
--- a/math/e_exp2_template.c
+++ b/math/e_exp2_template.c
@@ -20,13 +20,6 @@
 #include <math_private.h>
 #include <float.h>
 
-#define declare_mgen_finite_alias_x(from, to) \
-	strong_alias (from, to ## _finite)
-#define declare_mgen_finite_alias_s(from,to) \
-	declare_mgen_finite_alias_x (from, to)
-#define declare_mgen_finite_alias(from, to) \
-	declare_mgen_finite_alias_s (M_SUF (from), M_SUF (to))
-
 FLOAT
 M_DECL_FUNC (__ieee754_exp2) (FLOAT x)
 {
diff --git a/sysdeps/generic/math-type-macros.h b/sysdeps/generic/math-type-macros.h
index ffcf7b80b6..c86ac3361e 100644
--- a/sysdeps/generic/math-type-macros.h
+++ b/sysdeps/generic/math-type-macros.h
@@ -67,6 +67,21 @@
 # error "declare_mgen_alias_r must be defined."
 #endif
 
+#ifndef declare_mgen_finite_alias_x
+#define declare_mgen_finite_alias_x(from, to)	\
+  strong_alias (from, to ## _finite)
+#endif
+
+#ifndef declare_mgen_finite_alias_s
+# define declare_mgen_finite_alias_s(from,to)	\
+  declare_mgen_finite_alias_x (from, to)
+#endif
+
+#ifndef declare_mgen_finite_alias
+# define declare_mgen_finite_alias(from, to)	\
+  declare_mgen_finite_alias_s (M_SUF (from), M_SUF (to))
+#endif
+
 #define __M_CONCAT(a,b) a ## b
 #define __M_CONCATX(a,b) __M_CONCAT(a,b)
 
-- 
2.14.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]