projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make pthread attribute types structs, even when they just have one field
[musl]
/
include
/
complex.h
diff --git
a/include/complex.h
b/include/complex.h
index
b4bcb22
..
13a45c5
100644
(file)
--- a/
include/complex.h
+++ b/
include/complex.h
@@
-112,6
+112,13
@@
long double creall(long double complex);
#define cimagf(x) __CIMAG(x, float)
#define cimagl(x) __CIMAG(x, long double)
#define cimagf(x) __CIMAG(x, float)
#define cimagl(x) __CIMAG(x, long double)
+#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)
+
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif