mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 15:22:15 +00:00
make CMPLX macros available in complex.h in non-c11 mode as well
This commit is contained in:
parent
bcc20d2b94
commit
faea4c9937
@ -115,11 +115,9 @@ long double creall(long double complex);
|
|||||||
#define __CMPLX(x, y, t) \
|
#define __CMPLX(x, y, t) \
|
||||||
((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z)
|
((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z)
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L
|
|
||||||
#define CMPLX(x, y) __CMPLX(x, y, double)
|
#define CMPLX(x, y) __CMPLX(x, y, double)
|
||||||
#define CMPLXF(x, y) __CMPLX(x, y, float)
|
#define CMPLXF(x, y) __CMPLX(x, y, float)
|
||||||
#define CMPLXL(x, y) __CMPLX(x, y, long double)
|
#define CMPLXL(x, y) __CMPLX(x, y, long double)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -168,12 +168,4 @@ long double __p1evll(long double, const long double *, int);
|
|||||||
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval))
|
#define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* complex */
|
|
||||||
|
|
||||||
#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
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user