From e65169000254858ef15c1c0b7db05b4966db6b65 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Thu, 15 Jul 2004 11:35:13 +0000 Subject: [PATCH] * mingwex/complex/cargs.c: New file. * mingwex/Makefile.in: Really add carg.o to libmingwex.a. --- winsup/mingw/ChangeLog | 5 +++++ winsup/mingw/mingwex/Makefile.in | 4 ++-- winsup/mingw/mingwex/complex/carg.c | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 winsup/mingw/mingwex/complex/carg.c diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 2e90a95aa..12768938a 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,8 @@ +2004-07-15 Danny Smith + + * mingwex/complex/cargs.c: New file. + * mingwex/Makefile.in: Really add carg.o to libmingwex.a. + 2004-07-15 Corinna Vinschen * Makefile.in (INCLUDES): Temporarily revert previous change. diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in index 10d4db4bd..8aa04f530 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 000000000..cb47accb6 --- /dev/null +++ b/winsup/mingw/mingwex/complex/carg.c @@ -0,0 +1,9 @@ +#include +double __attribute__ ((const)) carg (double _Complex _Z) +{ + double res; + __asm__ ("fpatan;" + : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)"); + return res; +} +