summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-03 14:24:28 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-03 14:24:28 +0000
commitfeeb0301b31a5ad4ea0594b17e4720bbe3308a3b (patch)
treeae71a3f81309a3068335ec30f021333454bccbc6 /include
parent2ba017a2d5af01cc3ef0dc554252a521e8d7c4f8 (diff)
- add long double math wrappers (Ned Ludd)
Diffstat (limited to 'include')
-rw-r--r--include/complex.h8
-rw-r--r--include/math.h18
-rw-r--r--include/tgmath.h2
3 files changed, 14 insertions, 14 deletions
diff --git a/include/complex.h b/include/complex.h
index f005a9391..94fb6ea44 100644
--- a/include/complex.h
+++ b/include/complex.h
@@ -62,7 +62,7 @@ __BEGIN_DECLS
#define __MATHDECL_1(type, function, args) \
extern type __MATH_PRECNAME(function) args __THROW
-#define _Mdouble_ double
+#define _Mdouble_ double
#define __MATH_PRECNAME(name) name
#include <bits/cmathcalls.h>
#undef _Mdouble_
@@ -72,7 +72,7 @@ __BEGIN_DECLS
#ifndef _Mfloat_
# define _Mfloat_ float
#endif
-#define _Mdouble_ _Mfloat_
+#define _Mdouble_ _Mfloat_
#ifdef __STDC__
# define __MATH_PRECNAME(name) name##f
#else
@@ -84,11 +84,11 @@ __BEGIN_DECLS
/* And the long double versions. It is non-critical to define them
here unconditionally since `long double' is required in ISO C99. */
-#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
+#if __STDC__ - 0 || __GNUC__ - 0 && defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
# ifndef _Mlong_double_
# define _Mlong_double_ long double
# endif
-# define _Mdouble_ _Mlong_double_
+# define _Mdouble_ _Mlong_double_
# ifdef __STDC__
# define __MATH_PRECNAME(name) name##l
# else
diff --git a/include/math.h b/include/math.h
index 34c042dc5..ae5d6ec70 100644
--- a/include/math.h
+++ b/include/math.h
@@ -64,7 +64,7 @@ __BEGIN_DECLS
#define __MATHDECL_1(type, function,suffix, args) \
extern type __MATH_PRECNAME(function,suffix) args __THROW
-#define _Mdouble_ double
+#define _Mdouble_ double
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
# define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD
@@ -83,7 +83,7 @@ __BEGIN_DECLS
# ifndef _Mfloat_
# define _Mfloat_ float
# endif
-# define _Mdouble_ _Mfloat_
+# define _Mdouble_ _Mfloat_
# ifdef __STDC__
# define __MATH_PRECNAME(name,r) name##f##r
# else
@@ -98,7 +98,7 @@ __BEGIN_DECLS
# undef __MATH_PRECNAME
# if (__STDC__ - 0 || __GNUC__ - 0) \
- && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
+ && (defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ || defined __LDBL_COMPAT)
# ifdef __LDBL_COMPAT
# ifdef __USE_ISOC99
@@ -130,7 +130,7 @@ extern long double __REDIRECT_NTH (nexttowardl,
# ifndef _Mlong_double_
# define _Mlong_double_ long double
# endif
-# define _Mdouble_ _Mlong_double_
+# define _Mdouble_ _Mlong_double_
# ifdef __STDC__
# define __MATH_PRECNAME(name,r) name##l##r
# else
@@ -210,7 +210,7 @@ enum
};
/* Return number of classification appropriate for X. */
-# ifdef __NO_LONG_DOUBLE_MATH
+# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
# define fpclassify(x) \
(sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x))
# else
@@ -222,7 +222,7 @@ enum
# endif
/* Return nonzero value if sign of X is negative. */
-# ifdef __NO_LONG_DOUBLE_MATH
+# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
# define signbit(x) \
(sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x))
# else
@@ -234,7 +234,7 @@ enum
# endif
/* Return nonzero value if X is not +-Inf or NaN. */
-# ifdef __NO_LONG_DOUBLE_MATH
+# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
# define isfinite(x) \
(sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x))
# else
@@ -250,7 +250,7 @@ enum
/* Return nonzero value if X is a NaN. We could use `fpclassify' but
we already have this functions `__isnan' and it is faster. */
-# ifdef __NO_LONG_DOUBLE_MATH
+# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
# define isnan(x) \
(sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
# else
@@ -262,7 +262,7 @@ enum
# endif
/* Return nonzero value is X is positive or negative infinity. */
-# ifdef __NO_LONG_DOUBLE_MATH
+# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
# define isinf(x) \
(sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
# else
diff --git a/include/tgmath.h b/include/tgmath.h
index 5fb683fef..685a34588 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -36,7 +36,7 @@
#if __GNUC_PREREQ (2, 7)
-# ifdef __NO_LONG_DOUBLE_MATH
+# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
# define __tgml(fct) fct
# else
# define __tgml(fct) fct ## l