From f2b12ea516e936d275c6c720a57cde83b1ef59d0 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 26 Oct 2005 11:14:02 +0000 Subject: 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) --- libm/w_cabs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'libm/w_cabs.c') 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 #include -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); } -- cgit v1.2.3