about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-22 15:36:56 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-22 15:36:56 -0400
commit132f0a00831d3b64cc6ae35df69d6865516c64b5 (patch)
tree21a61ba2008f1316502b4d8a8835d0f1e8fac1e3 /include
parenta4a0c91275788407763b1e5a9da17b777495ca85 (diff)
downloadmusl-132f0a00831d3b64cc6ae35df69d6865516c64b5.tar.gz
musl-132f0a00831d3b64cc6ae35df69d6865516c64b5.tar.xz
musl-132f0a00831d3b64cc6ae35df69d6865516c64b5.zip
tgmath.h: suppress any existing macro definitions before defining macros
this is necessary so that we can freely add macro versions of some of
the math/complex functions without worrying about breaking tgmath.
Diffstat (limited to 'include')
-rw-r--r--include/tgmath.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/include/tgmath.h b/include/tgmath.h
index 52913913..a181ef00 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -121,6 +121,69 @@ sizeof(double) == sizeof(long double)
 	__LDBL(x) ? fabsl(x) : \
 	fabs(x) ))
 
+/* suppress any macros in math.h or complex.h */
+
+#undef acos
+#undef acosh
+#undef asin
+#undef asinh
+#undef atan
+#undef atan2
+#undef atanh
+#undef carg
+#undef cbrt
+#undef ceil
+#undef cimag
+#undef conj
+#undef copysign
+#undef cos
+#undef cosh
+#undef cproj
+#undef creal
+#undef erf
+#undef erfc
+#undef exp
+#undef exp2
+#undef expm1
+#undef fabs
+#undef fdim
+#undef floor
+#undef fma
+#undef fmax
+#undef fmin
+#undef fmod
+#undef frexp
+#undef hypot
+#undef ilogb
+#undef ldexp
+#undef lgamma
+#undef llrint
+#undef llround
+#undef log
+#undef log10
+#undef log1p
+#undef log2
+#undef logb
+#undef lrint
+#undef lround
+#undef nearbyint
+#undef nextafter
+#undef nexttoward
+#undef pow
+#undef remainder
+#undef remquo
+#undef rint
+#undef round
+#undef scalbln
+#undef scalbn
+#undef sin
+#undef sinh
+#undef sqrt
+#undef tan
+#undef tanh
+#undef tgamma
+#undef trunc
+
 /* tg functions */
 
 #define acos(x)         __tg_real_complex(acos, (x))