summaryrefslogtreecommitdiff
path: root/libm/w_cabs.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-26 11:14:02 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-26 11:14:02 +0000
commitf2b12ea516e936d275c6c720a57cde83b1ef59d0 (patch)
tree1e312dea555d9ba1338d8eb6f65d40daa6a42bd9 /libm/w_cabs.c
parent6d0c300ebf07eafbda54a3caa3d9902265d1312a (diff)
Correct w_cabs.c so it can be added to IMA, add -D_POSIX_MODE for compiling s_lib_version.c (only in the new Makefile)
Diffstat (limited to 'libm/w_cabs.c')
-rw-r--r--libm/w_cabs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libm/w_cabs.c b/libm/w_cabs.c
index 69188a0dd..6743146c6 100644
--- a/libm/w_cabs.c
+++ b/libm/w_cabs.c
@@ -5,14 +5,10 @@
* Placed into the Public Domain, 1994.
*/
+#include <complex.h>
#include <math.h>
-struct complex {
- double x;
- double y;
-};
-
-double cabs(struct complex z)
+double cabs(double _Complex z)
{
- return hypot(z.x, z.y);
+ return hypot(__real__ z, __imag__ z);
}