aboutsummaryrefslogtreecommitdiff
path: root/winsup/mingw/mingwex
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2004-07-15 11:35:13 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2004-07-15 11:35:13 +0000
commite65169000254858ef15c1c0b7db05b4966db6b65 (patch)
treee3a84dc88cbeac735bf1ea28c2d55836555e057d /winsup/mingw/mingwex
parenta062ed98401024cb3a6a37414a7199d1a8c384eb (diff)
downloadnewlib-e65169000254858ef15c1c0b7db05b4966db6b65.zip
newlib-e65169000254858ef15c1c0b7db05b4966db6b65.tar.gz
newlib-e65169000254858ef15c1c0b7db05b4966db6b65.tar.bz2
* mingwex/complex/cargs.c: New file.
* mingwex/Makefile.in: Really add carg.o to libmingwex.a.
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/Makefile.in4
-rwxr-xr-xwinsup/mingw/mingwex/complex/carg.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
index 10d4db4..8aa04f5 100644
--- a/winsup/mingw/mingwex/Makefile.in
+++ b/winsup/mingw/mingwex/Makefile.in
@@ -67,7 +67,7 @@ STDIO_DISTFILES = \
vfscanf.c vfwscanf.c vscanf.c vsscanf.c vswscanf.c vwscanf.c
COMPLEX_DISTFILES = \
- cabs.c cacos.c cacosh.c casin.c casinh.c carg.c catan.c catanh.c \
+ cabs.c cacos.c cacosh.c carg.c casin.c casinh.c catan.c catanh.c \
ccos.c ccosh.c cexp.c cimag.c clog.c cpow.c cproj.c creal.c \
csin.c csinh.c csqrt.c ctan.c ctanh.c
@@ -151,7 +151,7 @@ POSIX_OBJS = \
REPLACE_OBJS = \
mingw-fseek.o
COMPLEX_OBJS = \
- cabs.o cacos.o cacosh.o casin.o casinh.o catan.o catanh.o \
+ cabs.o cacos.o cacosh.o carg.o casin.o casinh.o catan.o catanh.o \
ccos.o ccosh.o cexp.o cimag.o clog.o cpow.o cproj.o creal.o \
csin.o csinh.o csqrt.o ctan.o ctanh.o
diff --git a/winsup/mingw/mingwex/complex/carg.c b/winsup/mingw/mingwex/complex/carg.c
new file mode 100755
index 0000000..cb47acc
--- /dev/null
+++ b/winsup/mingw/mingwex/complex/carg.c
@@ -0,0 +1,9 @@
+#include <complex.h>
+double __attribute__ ((const)) carg (double _Complex _Z)
+{
+ double res;
+ __asm__ ("fpatan;"
+ : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
+ return res;
+}
+