sysmacros major/minor: result should have type unsigned int, not dev_t
[musl] / include / complex.h
index 8ee7057..436f32f 100644 (file)
@@ -97,6 +97,17 @@ double creal(double complex);
 float crealf(float complex);
 long double creall(long double complex);
 
+#define __CIMAG(x, t) \
+       ((union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1])
+
+#define creal(x) ((double)(x))
+#define crealf(x) ((float)(x))
+#define creall(x) ((long double)(x))
+
+#define cimag(x) __CIMAG(x, double)
+#define cimagf(x) __CIMAG(x, float)
+#define cimagl(x) __CIMAG(x, long double)
+
 #ifdef __cplusplus
 }
 #endif