so we can easily declare each function as both `name' and `__name',
and can declare the float versions `namef' and `__namef'. */
-#define __MATHCALL(function,suffix, args) \
- __MATHDECL (_Mdouble_,function,suffix, args)
-#define __MATHDECL(type, function,suffix, args) \
- __MATHDECL_1(type, function,suffix, args);
-
-#define __MATHCALLX(function,suffix, args, attrib) \
- __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
-#define __MATHDECL_1(type, function,suffix, args) \
+#define __MATHDECL_1(type,function,suffix,args) \
extern type __MATH_PRECNAME(function,suffix) args __THROW
-#define __MATHDECLX(type, function,suffix, args, attrib) \
- __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
+
+#define __MATHDECL(type,function,suffix,args) \
+ __MATHDECL_1(type,function,suffix,args);
+
+#define __MATHCALL(function,suffix,args) \
+ __MATHDECL(_Mdouble_,function,suffix,args)
+
+#define __MATHDECLX(type,function,suffix,args,attrib) \
+ __MATHDECL_1(type,function,suffix,args) __attribute__ (attrib); \
__MATHDECLI_MAINVARIANT(function)
+#define __MATHCALLX(function,suffix,args,attrib) \
+ __MATHDECLX(_Mdouble_,function,suffix,args,attrib)
+
/* Decls which are also used internally in libm.
Only the main variant is used internally, no need to try to avoid relocs
for the {l,f} variants. */
-#define __MATHCALLI(function,suffix, args) \
- __MATHDECLI (_Mdouble_,function,suffix, args)
-#define __MATHDECLI(type, function,suffix, args) \
- __MATHDECL_1(type, function,suffix, args); \
+#define __MATHDECLI(type,function,suffix,args) \
+ __MATHDECL_1(type,function,suffix,args); \
__MATHDECLI_MAINVARIANT(function)
+
+#define __MATHCALLI(function,suffix,args) \
+ __MATHDECLI(_Mdouble_,function,suffix,args)
+
/* Private helpers for purely macro impls below.
Only make __foo{,f,l} visible but not (the macro-only) foo. */
#if defined _LIBC
-# define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
- __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib); \
+# define __MATHDECL_PRIV(type,function,suffix,args,attrib) \
+ __MATHDECL_1(type,__CONCAT(__,function),suffix,args) __attribute__ (attrib); \
libm_hidden_proto(__MATH_PRECNAME(__##function,suffix))
#else
-# define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
- __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib);
+# define __MATHDECL_PRIV(type,function,suffix,args,attrib) \
+ __MATHDECL_1(type,__CONCAT(__,function),suffix,args) __attribute__ (attrib);
#endif
+
+/* Include the file of declarations, declaring souble versions */
+
#if defined _LIBC
# define __MATHDECLI_MAINVARIANT(x) libm_hidden_proto(x)
#else
# undef _Mdouble_END_NAMESPACE
# undef __MATH_PRECNAME
-# if (__STDC__ - 0 || __GNUC__ - 0) \
+
+# if (defined __STDC__ || defined __GNUC__) \
&& (defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ || defined __LDBL_COMPAT)
# ifdef __LDBL_COMPAT
instead of `double' and appending l to each function name. */
# undef __MATHDECL_1
-# define __MATHDECL_2(type, function,suffix, args, alias) \
- extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \
- args, alias)
-# define __MATHDECL_1(type, function,suffix, args) \
- __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))
+# define __MATHDECL_2(type,function,suffix,args,alias) \
+ extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix),args,alias)
+# define __MATHDECL_1(type,function,suffix,args) \
+ __MATHDECL_2(type,function,suffix,args,__CONCAT(function,suffix))
# endif
# ifndef _Mlong_double_
--- /dev/null
+#include <math.h>
+
+void testl(long double long_double_x, int int_x, long long_x)
+{
+__finitel(long_double_x);
+__fpclassifyl(long_double_x);
+__isinfl(long_double_x);
+__isnanl(long_double_x);
+__signbitl(long_double_x);
+acoshl(long_double_x);
+acosl(long_double_x);
+asinhl(long_double_x);
+asinl(long_double_x);
+atan2l(long_double_x, long_double_x);
+atanhl(long_double_x);
+atanl(long_double_x);
+cbrtl(long_double_x);
+ceill(long_double_x);
+copysignl(long_double_x, long_double_x);
+coshl(long_double_x);
+cosl(long_double_x);
+erfcl(long_double_x);
+erfl(long_double_x);
+exp2l(long_double_x);
+expl(long_double_x);
+expm1l(long_double_x);
+fabsl(long_double_x);
+fdiml(long_double_x, long_double_x);
+floorl(long_double_x);
+fmal(long_double_x, long_double_x, long_double_x);
+fmaxl(long_double_x, long_double_x);
+fminl(long_double_x, long_double_x);
+fmodl(long_double_x, long_double_x);
+frexpl(long_double_x, &int_x);
+hypotl(long_double_x, long_double_x);
+ilogbl(long_double_x);
+ldexpl(long_double_x, int_x);
+lgammal(long_double_x);
+llrintl(long_double_x);
+llroundl(long_double_x);
+log10l(long_double_x);
+log1pl(long_double_x);
+log2l(long_double_x);
+logbl(long_double_x);
+logl(long_double_x);
+lrintl(long_double_x);
+lroundl(long_double_x);
+modfl(long_double_x, &long_double_x);
+nearbyintl(long_double_x);
+nextafterl(long_double_x, long_double_x);
+nexttowardl(long_double_x, long_double_x);
+powl(long_double_x, long_double_x);
+remainderl(long_double_x, long_double_x);
+remquol(long_double_x, long_double_x, &int_x);
+rintl(long_double_x);
+roundl(long_double_x);
+scalblnl(long_double_x, long_x);
+scalbnl(long_double_x, int_x);
+sinhl(long_double_x);
+sinl(long_double_x);
+sqrtl(long_double_x);
+tanhl(long_double_x);
+tanl(long_double_x);
+tgammal(long_double_x);
+truncl(long_double_x);
+}
+
+int main(int argc, char **argv)
+{
+ return (long) &testl;
+}