X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Finternal%2Flibm.h;h=dfecd83680647db220f8aeb8d8518d46e9c9664d;hp=a71c4c05ab092b77bfd2c24e8a6eaab569745bea;hb=cfbaba79a2dd380e580a247b8fd36af60c878e8f;hpb=e2fe959fe2a450f74271d4d3c4b0d9456f889125 diff --git a/src/internal/libm.h b/src/internal/libm.h index a71c4c05..dfecd836 100644 --- a/src/internal/libm.h +++ b/src/internal/libm.h @@ -170,25 +170,12 @@ long double __p1evll(long double, const long double *, int); #define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval)) #endif - /* complex */ -union dcomplex { - double complex z; - double a[2]; -}; -union fcomplex { - float complex z; - float a[2]; -}; -union lcomplex { - long double complex z; - long double a[2]; -}; - -/* x + y*I is not supported properly by gcc */ -#define cpack(x,y) ((union dcomplex){.a={(x),(y)}}.z) -#define cpackf(x,y) ((union fcomplex){.a={(x),(y)}}.z) -#define cpackl(x,y) ((union lcomplex){.a={(x),(y)}}.z) +#ifndef CMPLX +#define CMPLX(x, y) __CMPLX(x, y, double) +#define CMPLXF(x, y) __CMPLX(x, y, float) +#define CMPLXL(x, y) __CMPLX(x, y, long double) +#endif #endif