OSDN Git Service

* mingwex/complex/cargs.c: New file.
authordannysmith <dannysmith>
Thu, 15 Jul 2004 11:35:12 +0000 (11:35 +0000)
committerdannysmith <dannysmith>
Thu, 15 Jul 2004 11:35:12 +0000 (11:35 +0000)
* mingwex/Makefile.in: Really add carg.o to libmingwex.a.

winsup/mingw/ChangeLog
winsup/mingw/mingwex/Makefile.in
winsup/mingw/mingwex/complex/carg.c [new file with mode: 0755]

index 2e90a95..1276893 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-15  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * mingwex/complex/cargs.c: New file.
+       * mingwex/Makefile.in: Really add carg.o to libmingwex.a.
+
 2004-07-15  Corinna Vinschen  <corinna@vinschen.de>
 
        * Makefile.in (INCLUDES): Temporarily revert previous change.
index 10d4db4..8aa04f5 100644 (file)
@@ -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 (executable)
index 0000000..cb47acc
--- /dev/null
@@ -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;
+}
+