public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Move declare_mgen_finite_alias definition
@ 2018-05-11 19:39 Tulio Magno Quites Machado Filho
  2018-05-11 19:45 ` Joseph Myers
  0 siblings, 1 reply; 13+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2018-05-11 19:39 UTC (permalink / raw)
  To: libc-alpha

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-05-15 17:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 19:39 [PATCH] Move declare_mgen_finite_alias definition Tulio Magno Quites Machado Filho
2018-05-11 19:45 ` Joseph Myers
2018-05-11 20:36   ` Tulio Magno Quites Machado Filho
2018-05-11 21:01     ` Joseph Myers
2018-05-11 21:12       ` Joseph Myers
2018-05-11 22:01       ` Tulio Magno Quites Machado Filho
2018-05-11 22:19         ` Joseph Myers
2018-05-11 23:01           ` Tulio Magno Quites Machado Filho
2018-05-11 23:15             ` Tulio Magno Quites Machado Filho
2018-05-14 15:07               ` Joseph Myers
2018-05-14 14:52             ` Joseph Myers
2018-05-15 16:22           ` Tulio Magno Quites Machado Filho
2018-05-15 17:32             ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).