mirror of git://git.musl-libc.org/musl
provide CMPLX macros in implementation-internal libm.h
this avoids assuming the presence of C11 macro definitions in the public complex.h, which need changes potentially incompatible with the way these macros are being used internally.
This commit is contained in:
parent
efa9d396f9
commit
a414e8374d
|
@ -128,6 +128,18 @@ do { \
|
|||
(d) = __u.f; \
|
||||
} while (0)
|
||||
|
||||
#undef __CMPLX
|
||||
#undef CMPLX
|
||||
#undef CMPLXF
|
||||
#undef CMPLXL
|
||||
|
||||
#define __CMPLX(x, y, t) \
|
||||
((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z)
|
||||
|
||||
#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)
|
||||
|
||||
/* fdlibm kernel functions */
|
||||
|
||||
int __rem_pio2_large(double*,double*,int,int,int);
|
||||
|
|
Loading…
Reference in New Issue