about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/fpu/Versions17
-rw-r--r--sysdeps/alpha/fpu/cabsf.c42
-rw-r--r--sysdeps/alpha/fpu/cargf.c42
-rw-r--r--sysdeps/alpha/fpu/cfloat-compat.h74
-rw-r--r--sysdeps/alpha/fpu/cimagf.c41
-rw-r--r--sysdeps/alpha/fpu/conjf.c43
-rw-r--r--sysdeps/alpha/fpu/crealf.c41
-rw-r--r--sysdeps/alpha/fpu/s_cacosf.c51
-rw-r--r--sysdeps/alpha/fpu/s_cacoshf.c51
-rw-r--r--sysdeps/alpha/fpu/s_casinf.c51
-rw-r--r--sysdeps/alpha/fpu/s_casinhf.c51
-rw-r--r--sysdeps/alpha/fpu/s_catanf.c51
-rw-r--r--sysdeps/alpha/fpu/s_catanhf.c51
-rw-r--r--sysdeps/alpha/fpu/s_ccosf.c51
-rw-r--r--sysdeps/alpha/fpu/s_ccoshf.c51
-rw-r--r--sysdeps/alpha/fpu/s_cexpf.c51
-rw-r--r--sysdeps/alpha/fpu/s_clog10f.c61
-rw-r--r--sysdeps/alpha/fpu/s_clogf.c51
-rw-r--r--sysdeps/alpha/fpu/s_cpowf.c51
-rw-r--r--sysdeps/alpha/fpu/s_cprojf.c51
-rw-r--r--sysdeps/alpha/fpu/s_csinf.c51
-rw-r--r--sysdeps/alpha/fpu/s_csinhf.c51
-rw-r--r--sysdeps/alpha/fpu/s_csqrtf.c51
-rw-r--r--sysdeps/alpha/fpu/s_ctanf.c51
-rw-r--r--sysdeps/alpha/fpu/s_ctanhf.c51
-rw-r--r--sysdeps/generic/cabsf.c29
-rw-r--r--sysdeps/generic/cargf.c29
-rw-r--r--sysdeps/generic/cimagf.c28
-rw-r--r--sysdeps/generic/conjf.c28
-rw-r--r--sysdeps/generic/crealf.c28
-rw-r--r--sysdeps/generic/s_cacosf.c2
-rw-r--r--sysdeps/generic/s_cacoshf.c2
-rw-r--r--sysdeps/generic/s_casinf.c2
-rw-r--r--sysdeps/generic/s_casinhf.c2
-rw-r--r--sysdeps/generic/s_catanf.c2
-rw-r--r--sysdeps/generic/s_catanhf.c2
-rw-r--r--sysdeps/generic/s_ccosf.c2
-rw-r--r--sysdeps/generic/s_ccoshf.c2
-rw-r--r--sysdeps/generic/s_cexpf.c2
-rw-r--r--sysdeps/generic/s_clog10f.c2
-rw-r--r--sysdeps/generic/s_clogf.c2
-rw-r--r--sysdeps/generic/s_cpowf.c2
-rw-r--r--sysdeps/generic/s_cprojf.c2
-rw-r--r--sysdeps/generic/s_csinf.c2
-rw-r--r--sysdeps/generic/s_csinhf.c2
-rw-r--r--sysdeps/generic/s_csqrtf.c2
-rw-r--r--sysdeps/generic/s_ctanf.c2
-rw-r--r--sysdeps/generic/s_ctanhf.c2
48 files changed, 1406 insertions, 0 deletions
diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions
index fa3d810c74..e2925e2ed6 100644
--- a/sysdeps/alpha/fpu/Versions
+++ b/sysdeps/alpha/fpu/Versions
@@ -4,3 +4,20 @@ libc {
     __ieee_get_fp_control; __ieee_set_fp_control;
   }
 }
+libm {
+  GLIBC_2.3.3 {
+    # functions implementing old complex float abi
+    __c1_cabsf; __c1_cacosf; __c1_cacoshf; __c1_cargf; __c1_casinf;
+    __c1_casinhf; __c1_catanf; __c1_catanhf; __c1_ccosf; __c1_ccoshf;
+    __c1_cexpf; __c1_cimagf; __c1_clog10f; __c1_clogf; __c1_conjf;
+    __c1_cpowf; __c1_cprojf; __c1_crealf; __c1_csinf; __c1_csinhf;
+    __c1_csqrtf; __c1_ctanf; __c1_ctanhf;
+
+    # functions implementing new complex float abi
+    cabsf; cacosf; cacoshf; cargf; casinf;
+    casinhf; catanf; catanhf; ccosf; ccoshf;
+    cexpf; cimagf; clog10f; clogf; conjf;
+    cpowf; cprojf; crealf; csinf; csinhf;
+    csqrtf; ctanf; ctanhf;
+  }
+}
diff --git a/sysdeps/alpha/fpu/cabsf.c b/sysdeps/alpha/fpu/cabsf.c
new file mode 100644
index 0000000000..de8e6b5548
--- /dev/null
+++ b/sysdeps/alpha/fpu/cabsf.c
@@ -0,0 +1,42 @@
+/* Return the complex absolute value of float complex value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cabsf __cabsf_not_defined
+#define cabsf cabsf_not_defined
+
+#include <complex.h>
+#include <math.h>
+#include "cfloat-compat.h"
+
+#undef __cabsf
+#undef cabsf
+
+float
+__c1_cabsf (c1_cfloat_decl (z))
+{
+  return __hypotf (c1_cfloat_real (z), c1_cfloat_imag (z));
+}
+
+float
+__c2_cabsf (c2_cfloat_decl (z))
+{
+  return __hypotf (c2_cfloat_real (z), c2_cfloat_imag (z));
+}
+
+cfloat_versions (cabsf);
diff --git a/sysdeps/alpha/fpu/cargf.c b/sysdeps/alpha/fpu/cargf.c
new file mode 100644
index 0000000000..1d96e5897d
--- /dev/null
+++ b/sysdeps/alpha/fpu/cargf.c
@@ -0,0 +1,42 @@
+/* Compute argument of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cargf __cargf_not_defined
+#define cargf cargf_not_defined
+
+#include <complex.h>
+#include <math.h>
+#include "cfloat-compat.h"
+
+#undef __cargf
+#undef cargf
+
+float
+__c1_cargf (c1_cfloat_decl (x))
+{
+  return __atan2f (c1_cfloat_imag (x), c1_cfloat_real (x));
+}
+
+float
+__c2_cargf (c2_cfloat_decl (x))
+{
+  return __atan2f (c2_cfloat_imag (x), c2_cfloat_real (x));
+}
+
+cfloat_versions (cargf);
diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h
new file mode 100644
index 0000000000..cb40f55bdf
--- /dev/null
+++ b/sysdeps/alpha/fpu/cfloat-compat.h
@@ -0,0 +1,74 @@
+/* Compatibility macros for old and new Alpha complex float ABI.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* The behaviour of complex float changed between GCC 3.3 and 3.4.  
+
+   In 3.3 and before (below, complex version 1, or "c1"), complex float
+   values were packed into one floating point register.
+
+   In 3.4 and later (below, complex version 2, or "c2"), GCC changed to
+   follow the official Tru64 ABI, which passes the components of a complex
+   as separate parameters.  */
+
+#if __GNUC_PREREQ(3,4)
+  typedef union { double d; _Complex float cf; } c1_compat;
+# define c1_cfloat_decl(x)	double x
+# define c1_cfloat_real(x)	__real__ c1_cfloat_value (x)
+# define c1_cfloat_imag(x)	__imag__ c1_cfloat_value (x)
+# define c1_cfloat_value(x)	(((c1_compat *)(void *)&x)->cf)
+# define c1_cfloat_rettype	double
+# define c1_cfloat_return(x)	({ c1_compat _; _.cf = (x); _.d; })
+# define c2_cfloat_decl(x)	_Complex float x
+# define c2_cfloat_real(x)	__real__ x
+# define c2_cfloat_imag(x)	__imag__ x
+# define c2_cfloat_value(x)	x
+# define c2_cfloat_rettype	_Complex float
+# define c2_cfloat_return(x)	x
+#else
+# define c1_cfloat_decl(x)	_Complex float x
+# define c1_cfloat_real(x)	__real__ x
+# define c1_cfloat_imag(x)	__imag__ x
+# define c1_cfloat_value(x)	x
+# define c1_cfloat_rettype	_Complex float
+# define c1_cfloat_return(x)	x
+# define c2_cfloat_decl(x)	float x ## r, float x ## i
+# define c2_cfloat_real(x)	x ## r
+# define c2_cfloat_imag(x)	x ## i
+# define c2_cfloat_value(x) \
+    ({ _Complex float _; __real__ _ = x##r; __imag__ _ = x##i; _; })
+# define c2_cfloat_rettype	double _Complex
+# define c2_cfloat_return(x)	x
+#endif
+
+/* Get the proper symbol versions defined for each function.  */
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3)
+#define cfloat_versions_compat(func) \
+  compat_symbol (libm, __c1_##func, func, GLIBC_2_1)
+#else
+#define cfloat_versions_compat(func)
+#endif
+
+#define cfloat_versions(func) \
+  cfloat_versions_compat(func); \
+  versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_3); \
+  extern typeof(__c2_##func) __##func attribute_hidden; \
+  strong_alias (__c2_##func, __##func)
diff --git a/sysdeps/alpha/fpu/cimagf.c b/sysdeps/alpha/fpu/cimagf.c
new file mode 100644
index 0000000000..a9b351f188
--- /dev/null
+++ b/sysdeps/alpha/fpu/cimagf.c
@@ -0,0 +1,41 @@
+/* Return imaginary part of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cimagf __cimagf_not_defined
+#define cimagf cimagf_not_defined
+
+#include <complex.h>
+#include "cfloat-compat.h"
+
+#undef __cimagf
+#undef cimagf
+
+float
+__c1_cimagf (c1_cfloat_decl (z))
+{
+  return c1_cfloat_imag (z);
+}
+
+float
+__c2_cimagf (c2_cfloat_decl (z))
+{
+  return c2_cfloat_imag (z);
+}
+
+cfloat_versions (cimagf);
diff --git a/sysdeps/alpha/fpu/conjf.c b/sysdeps/alpha/fpu/conjf.c
new file mode 100644
index 0000000000..6ff92b9948
--- /dev/null
+++ b/sysdeps/alpha/fpu/conjf.c
@@ -0,0 +1,43 @@
+/* Return complex conjugate of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __conjf __conjf_not_defined
+#define conjf conjf_not_defined
+
+#include <complex.h>
+#include "cfloat-compat.h"
+
+#undef __conjf
+#undef conjf
+
+c1_cfloat_rettype
+__c1_conjf (c1_cfloat_decl (z))
+{
+  _Complex float r = ~ c1_cfloat_value (z);
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_conjf (c2_cfloat_decl (z))
+{
+  _Complex float r = ~ c2_cfloat_value (z);
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (conjf);
diff --git a/sysdeps/alpha/fpu/crealf.c b/sysdeps/alpha/fpu/crealf.c
new file mode 100644
index 0000000000..52ab271738
--- /dev/null
+++ b/sysdeps/alpha/fpu/crealf.c
@@ -0,0 +1,41 @@
+/* Return real part of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __crealf __crealf_not_defined
+#define crealf crealf_not_defined
+
+#include <complex.h>
+#include "cfloat-compat.h"
+
+#undef __crealf
+#undef crealf
+
+float
+__c1_crealf (c1_cfloat_decl (z))
+{
+  return c1_cfloat_real (z);
+}
+
+float
+__c2_crealf (c2_cfloat_decl (z))
+{
+  return c2_cfloat_real (z);
+}
+
+cfloat_versions (crealf);
diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c
new file mode 100644
index 0000000000..20e67f4ac9
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cacosf.c
@@ -0,0 +1,51 @@
+/* Return arc cosine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cacosf __cacosf_not_defined
+#define cacosf cacosf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cacosf
+#undef cacosf
+#define __cacosf internal_cacosf
+
+static _Complex float internal_cacosf (_Complex float x);
+
+#include <sysdeps/generic/s_cacosf.c>
+#include "cfloat-compat.h"
+
+#undef __cacosf
+
+c1_cfloat_rettype
+__c1_cacosf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_cacosf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cacosf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_cacosf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (cacosf);
diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c
new file mode 100644
index 0000000000..86cb4fbcaa
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cacoshf.c
@@ -0,0 +1,51 @@
+/* Return arc hyperbole cosine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cacoshf __cacoshf_not_defined
+#define cacoshf cacoshf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cacoshf
+#undef cacoshf
+#define __cacoshf internal_cacoshf
+
+static _Complex float internal_cacoshf (_Complex float x);
+
+#include <sysdeps/generic/s_cacoshf.c>
+#include "cfloat-compat.h"
+
+#undef __cacoshf
+
+c1_cfloat_rettype
+__c1_cacoshf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_cacoshf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cacoshf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_cacoshf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (cacoshf);
diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c
new file mode 100644
index 0000000000..3d0d4eadf2
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_casinf.c
@@ -0,0 +1,51 @@
+/* Return arc sine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __casinf __casinf_not_defined
+#define casinf casinf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __casinf
+#undef casinf
+#define __casinf internal_casinf
+
+static _Complex float internal_casinf (_Complex float x);
+
+#include <sysdeps/generic/s_casinf.c>
+#include "cfloat-compat.h"
+
+#undef __casinf
+
+c1_cfloat_rettype
+__c1_casinf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_casinf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_casinf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_casinf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (casinf);
diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c
new file mode 100644
index 0000000000..698ce10c04
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_casinhf.c
@@ -0,0 +1,51 @@
+/* Return arc hyperbole sine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __casinhf __casinhf_not_defined
+#define casinhf casinhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __casinhf
+#undef casinhf
+#define __casinhf internal_casinhf
+
+static _Complex float internal_casinhf (_Complex float x);
+
+#include <sysdeps/generic/s_casinhf.c>
+#include "cfloat-compat.h"
+
+#undef __casinhf
+
+c1_cfloat_rettype
+__c1_casinhf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_casinhf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_casinhf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_casinhf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (casinhf);
diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c
new file mode 100644
index 0000000000..221a461c1b
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_catanf.c
@@ -0,0 +1,51 @@
+/* Return arc tangent of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __catanf __catanf_not_defined
+#define catanf catanf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __catanf
+#undef catanf
+#define __catanf internal_catanf
+
+static _Complex float internal_catanf (_Complex float x);
+
+#include <sysdeps/generic/s_catanf.c>
+#include "cfloat-compat.h"
+
+#undef __catanf
+
+c1_cfloat_rettype
+__c1_catanf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_catanf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_catanf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_catanf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (catanf);
diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c
new file mode 100644
index 0000000000..7465a43cac
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_catanhf.c
@@ -0,0 +1,51 @@
+/* Return arc hyperbole tangent of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __catanhf __catanhf_not_defined
+#define catanhf catanhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __catanhf
+#undef catanhf
+#define __catanhf internal_catanhf
+
+static _Complex float internal_catanhf (_Complex float x);
+
+#include <sysdeps/generic/s_catanhf.c>
+#include "cfloat-compat.h"
+
+#undef __catanhf
+
+c1_cfloat_rettype
+__c1_catanhf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_catanhf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_catanhf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_catanhf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (catanhf);
diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c
new file mode 100644
index 0000000000..fd775903f0
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ccosf.c
@@ -0,0 +1,51 @@
+/* Return cosine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __ccosf __ccosf_not_defined
+#define ccosf ccosf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ccosf
+#undef ccosf
+#define __ccosf internal_ccosf
+
+static _Complex float internal_ccosf (_Complex float x);
+
+#include <sysdeps/generic/s_ccosf.c>
+#include "cfloat-compat.h"
+
+#undef __ccosf
+
+c1_cfloat_rettype
+__c1_ccosf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_ccosf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ccosf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_ccosf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (ccosf);
diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c
new file mode 100644
index 0000000000..0e8eab288f
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ccoshf.c
@@ -0,0 +1,51 @@
+/* Return hyperbole cosine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __ccoshf __ccoshf_not_defined
+#define ccoshf ccoshf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ccoshf
+#undef ccoshf
+#define __ccoshf internal_ccoshf
+
+static _Complex float internal_ccoshf (_Complex float x);
+
+#include <sysdeps/generic/s_ccoshf.c>
+#include "cfloat-compat.h"
+
+#undef __ccoshf
+
+c1_cfloat_rettype
+__c1_ccoshf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_ccoshf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ccoshf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_ccoshf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (ccoshf);
diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c
new file mode 100644
index 0000000000..2cf6db4b55
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cexpf.c
@@ -0,0 +1,51 @@
+/* Return exponent of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cexpf __cexpf_not_defined
+#define cexpf cexpf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cexpf
+#undef cexpf
+#define __cexpf internal_cexpf
+
+static _Complex float internal_cexpf (_Complex float x);
+
+#include <sysdeps/generic/s_cexpf.c>
+#include "cfloat-compat.h"
+
+#undef __cexpf
+
+c1_cfloat_rettype
+__c1_cexpf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_cexpf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cexpf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_cexpf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (cexpf);
diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c
new file mode 100644
index 0000000000..bd60ed1bb0
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_clog10f.c
@@ -0,0 +1,61 @@
+/* Return base 10 logarithm of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __clog10f __clog10f_not_defined
+#define clog10f clog10f_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __clog10f
+#undef clog10f
+#define __clog10f internal_clog10f
+
+static _Complex float internal_clog10f (_Complex float x);
+
+#include <sysdeps/generic/s_clog10f.c>
+#include "cfloat-compat.h"
+
+#undef __clog10f
+
+c1_cfloat_rettype
+__c1_clog10f (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_clog10f (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_clog10f (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_clog10f (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+/* Ug.  __clog10f was exported from GLIBC_2.1.  This is the only
+   complex function whose double-underscore symbol was exported,
+   so we get to handle that specially.  */
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3)
+strong_alias (__c1_clog10f, __c1_clog10f_2);
+compat_symbol (libm, __c1_clog10f, clog10f, GLIBC_2_1);
+compat_symbol (libm, __c1_clog10f_2, __clog10f, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_3);
+extern typeof(__c2_clog10f) __clog10f attribute_hidden;
+strong_alias (__c2_clog10f, __clog10f)
diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c
new file mode 100644
index 0000000000..9eefe9fa30
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_clogf.c
@@ -0,0 +1,51 @@
+/* Return natural logarithm of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __clogf __clogf_not_defined
+#define clogf clogf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __clogf
+#undef clogf
+#define __clogf internal_clogf
+
+static _Complex float internal_clogf (_Complex float x);
+
+#include <sysdeps/generic/s_clogf.c>
+#include "cfloat-compat.h"
+
+#undef __clogf
+
+c1_cfloat_rettype
+__c1_clogf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_clogf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_clogf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_clogf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (clogf);
diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c
new file mode 100644
index 0000000000..f4cb3547f6
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cpowf.c
@@ -0,0 +1,51 @@
+/* Return power of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cpowf __cpowf_not_defined
+#define cpowf cpowf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cpowf
+#undef cpowf
+#define __cpowf internal_cpowf
+
+static _Complex float internal_cpowf (_Complex float x, _Complex float c);
+
+#include <sysdeps/generic/s_cpowf.c>
+#include "cfloat-compat.h"
+
+#undef __cpowf
+
+c1_cfloat_rettype
+__c1_cpowf (c1_cfloat_decl (x), c1_cfloat_decl (c))
+{
+  _Complex float r = internal_cpowf (c1_cfloat_value (x), c1_cfloat_value (c));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cpowf (c2_cfloat_decl (x), c2_cfloat_decl (c))
+{
+  _Complex float r = internal_cpowf (c2_cfloat_value (x), c2_cfloat_value (c));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (cpowf);
diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c
new file mode 100644
index 0000000000..eac8687707
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cprojf.c
@@ -0,0 +1,51 @@
+/* Return projection of complex float value to Riemann sphere.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __cprojf __cprojf_not_defined
+#define cprojf cprojf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cprojf
+#undef cprojf
+#define __cprojf internal_cprojf
+
+static _Complex float internal_cprojf (_Complex float x);
+
+#include <sysdeps/generic/s_cprojf.c>
+#include "cfloat-compat.h"
+
+#undef __cprojf
+
+c1_cfloat_rettype
+__c1_cprojf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_cprojf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cprojf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_cprojf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (cprojf);
diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c
new file mode 100644
index 0000000000..eba70e9930
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_csinf.c
@@ -0,0 +1,51 @@
+/* Return sine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __csinf __csinf_not_defined
+#define csinf csinf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __csinf
+#undef csinf
+#define __csinf internal_csinf
+
+static _Complex float internal_csinf (_Complex float x);
+
+#include <sysdeps/generic/s_csinf.c>
+#include "cfloat-compat.h"
+
+#undef __csinf
+
+c1_cfloat_rettype
+__c1_csinf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_csinf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_csinf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_csinf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (csinf);
diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c
new file mode 100644
index 0000000000..9db81a81e4
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_csinhf.c
@@ -0,0 +1,51 @@
+/* Return hyperbole sine of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __csinhf __csinhf_not_defined
+#define csinhf csinhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __csinhf
+#undef csinhf
+#define __csinhf internal_csinhf
+
+static _Complex float internal_csinhf (_Complex float x);
+
+#include <sysdeps/generic/s_csinhf.c>
+#include "cfloat-compat.h"
+
+#undef __csinhf
+
+c1_cfloat_rettype
+__c1_csinhf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_csinhf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_csinhf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_csinhf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (csinhf);
diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c
new file mode 100644
index 0000000000..cc4a8e0245
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_csqrtf.c
@@ -0,0 +1,51 @@
+/* Return square root of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __csqrtf __csinhf_not_defined
+#define csqrtf csqrtf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __csqrtf
+#undef csqrtf
+#define __csqrtf internal_csqrtf
+
+static _Complex float internal_csqrtf (_Complex float x);
+
+#include <sysdeps/generic/s_csqrtf.c>
+#include "cfloat-compat.h"
+
+#undef __csqrtf
+
+c1_cfloat_rettype
+__c1_csqrtf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_csqrtf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_csqrtf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_csqrtf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (csqrtf);
diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c
new file mode 100644
index 0000000000..843ee53717
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ctanf.c
@@ -0,0 +1,51 @@
+/* Return tangent of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __ctanf __ctanf_not_defined
+#define ctanf ctanf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ctanf
+#undef ctanf
+#define __ctanf internal_ctanf
+
+static _Complex float internal_ctanf (_Complex float x);
+
+#include <sysdeps/generic/s_ctanf.c>
+#include "cfloat-compat.h"
+
+#undef __ctanf
+
+c1_cfloat_rettype
+__c1_ctanf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_ctanf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ctanf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_ctanf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (ctanf);
diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c
new file mode 100644
index 0000000000..f1f74ab12d
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ctanhf.c
@@ -0,0 +1,51 @@
+/* Return hyperbole tangent of complex float value.
+   Copyright (C) 2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define __ctanhf __ctanhf_not_defined
+#define ctanhf ctanhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ctanhf
+#undef ctanhf
+#define __ctanhf internal_ctanhf
+
+static _Complex float internal_ctanhf (_Complex float x);
+
+#include <sysdeps/generic/s_ctanhf.c>
+#include "cfloat-compat.h"
+
+#undef __ctanhf
+
+c1_cfloat_rettype
+__c1_ctanhf (c1_cfloat_decl (x))
+{
+  _Complex float r = internal_ctanhf (c1_cfloat_value (x));
+  return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ctanhf (c2_cfloat_decl (x))
+{
+  _Complex float r = internal_ctanhf (c2_cfloat_value (x));
+  return c2_cfloat_return (r);
+}
+
+cfloat_versions (ctanhf);
diff --git a/sysdeps/generic/cabsf.c b/sysdeps/generic/cabsf.c
new file mode 100644
index 0000000000..956db76ba1
--- /dev/null
+++ b/sysdeps/generic/cabsf.c
@@ -0,0 +1,29 @@
+/* Return the complex absolute value of float complex value.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <complex.h>
+#include <math.h>
+
+float
+__cabsf (float _Complex z)
+{
+  return __hypotf (__real__ z, __imag__ z);
+}
+weak_alias (__cabsf, cabsf)
diff --git a/sysdeps/generic/cargf.c b/sysdeps/generic/cargf.c
new file mode 100644
index 0000000000..df1f20bc48
--- /dev/null
+++ b/sysdeps/generic/cargf.c
@@ -0,0 +1,29 @@
+/* Compute argument of complex float value.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <complex.h>
+#include <math.h>
+
+float
+__cargf (__complex__ float x)
+{
+  return __atan2f (__imag__ x, __real__ x);
+}
+weak_alias (__cargf, cargf)
diff --git a/sysdeps/generic/cimagf.c b/sysdeps/generic/cimagf.c
new file mode 100644
index 0000000000..d4e441e69f
--- /dev/null
+++ b/sysdeps/generic/cimagf.c
@@ -0,0 +1,28 @@
+/* Return imaginary part of complex float value.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <complex.h>
+
+float
+__cimagf (float _Complex z)
+{
+  return __imag__ z;
+}
+weak_alias (__cimagf, cimagf)
diff --git a/sysdeps/generic/conjf.c b/sysdeps/generic/conjf.c
new file mode 100644
index 0000000000..7893891933
--- /dev/null
+++ b/sysdeps/generic/conjf.c
@@ -0,0 +1,28 @@
+/* Return complex conjugate of complex float value.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <complex.h>
+
+float _Complex
+__conjf (float _Complex z)
+{
+  return ~z;
+}
+weak_alias (__conjf, conjf)
diff --git a/sysdeps/generic/crealf.c b/sysdeps/generic/crealf.c
new file mode 100644
index 0000000000..e3235a874f
--- /dev/null
+++ b/sysdeps/generic/crealf.c
@@ -0,0 +1,28 @@
+/* Return real part of complex float value.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <complex.h>
+
+float
+__crealf (float _Complex z)
+{
+  return __real__ z;
+}
+weak_alias (__crealf, crealf)
diff --git a/sysdeps/generic/s_cacosf.c b/sysdeps/generic/s_cacosf.c
index 24070dc5fb..265184e38d 100644
--- a/sysdeps/generic/s_cacosf.c
+++ b/sysdeps/generic/s_cacosf.c
@@ -34,4 +34,6 @@ __cacosf (__complex__ float x)
 
   return res;
 }
+#ifndef __cacosf
 weak_alias (__cacosf, cacosf)
+#endif
diff --git a/sysdeps/generic/s_cacoshf.c b/sysdeps/generic/s_cacoshf.c
index 4a11285d0f..52c35505e0 100644
--- a/sysdeps/generic/s_cacoshf.c
+++ b/sysdeps/generic/s_cacoshf.c
@@ -96,4 +96,6 @@ __cacoshf (__complex__ float x)
 
   return res;
 }
+#ifndef __cacoshf
 weak_alias (__cacoshf, cacoshf)
+#endif
diff --git a/sysdeps/generic/s_casinf.c b/sysdeps/generic/s_casinf.c
index 83f147ba9f..5278dbbf78 100644
--- a/sysdeps/generic/s_casinf.c
+++ b/sysdeps/generic/s_casinf.c
@@ -59,4 +59,6 @@ __casinf (__complex__ float x)
 
   return res;
 }
+#ifndef __casinf
 weak_alias (__casinf, casinf)
+#endif
diff --git a/sysdeps/generic/s_casinhf.c b/sysdeps/generic/s_casinhf.c
index d678786731..7037ab937c 100644
--- a/sysdeps/generic/s_casinhf.c
+++ b/sysdeps/generic/s_casinhf.c
@@ -77,4 +77,6 @@ __casinhf (__complex__ float x)
 
   return res;
 }
+#ifndef __casinhf
 weak_alias (__casinhf, casinhf)
+#endif
diff --git a/sysdeps/generic/s_catanf.c b/sysdeps/generic/s_catanf.c
index cc9e5ea7a8..25eec2b1b5 100644
--- a/sysdeps/generic/s_catanf.c
+++ b/sysdeps/generic/s_catanf.c
@@ -82,4 +82,6 @@ __catanf (__complex__ float x)
 
   return res;
 }
+#ifndef __catanf
 weak_alias (__catanf, catanf)
+#endif
diff --git a/sysdeps/generic/s_catanhf.c b/sysdeps/generic/s_catanhf.c
index 30a5a1b8ac..d2422e6111 100644
--- a/sysdeps/generic/s_catanhf.c
+++ b/sysdeps/generic/s_catanhf.c
@@ -77,4 +77,6 @@ __catanhf (__complex__ float x)
 
   return res;
 }
+#ifndef __catanhf
 weak_alias (__catanhf, catanhf)
+#endif
diff --git a/sysdeps/generic/s_ccosf.c b/sysdeps/generic/s_ccosf.c
index efdcdcc221..4b154deac5 100644
--- a/sysdeps/generic/s_ccosf.c
+++ b/sysdeps/generic/s_ccosf.c
@@ -73,4 +73,6 @@ __ccosf (__complex__ float x)
 
   return res;
 }
+#ifndef __ccosf
 weak_alias (__ccosf, ccosf)
+#endif
diff --git a/sysdeps/generic/s_ccoshf.c b/sysdeps/generic/s_ccoshf.c
index 339b6bc1c8..f400d34f0b 100644
--- a/sysdeps/generic/s_ccoshf.c
+++ b/sysdeps/generic/s_ccoshf.c
@@ -98,4 +98,6 @@ __ccoshf (__complex__ float x)
 
   return retval;
 }
+#ifndef __ccoshf
 weak_alias (__ccoshf, ccoshf)
+#endif
diff --git a/sysdeps/generic/s_cexpf.c b/sysdeps/generic/s_cexpf.c
index 93bfe2049e..7b68fc365c 100644
--- a/sysdeps/generic/s_cexpf.c
+++ b/sysdeps/generic/s_cexpf.c
@@ -120,4 +120,6 @@ __cexpf (__complex__ float x)
 
   return retval;
 }
+#ifndef __cexpf
 weak_alias (__cexpf, cexpf)
+#endif
diff --git a/sysdeps/generic/s_clog10f.c b/sysdeps/generic/s_clog10f.c
index 6d60c5fc23..eed81f368c 100644
--- a/sysdeps/generic/s_clog10f.c
+++ b/sysdeps/generic/s_clog10f.c
@@ -58,4 +58,6 @@ __clog10f (__complex__ float x)
 
   return result;
 }
+#ifndef __clog10f
 weak_alias (__clog10f, clog10f)
+#endif
diff --git a/sysdeps/generic/s_clogf.c b/sysdeps/generic/s_clogf.c
index c7151f2e5f..21e3b57b7f 100644
--- a/sysdeps/generic/s_clogf.c
+++ b/sysdeps/generic/s_clogf.c
@@ -58,4 +58,6 @@ __clogf (__complex__ float x)
 
   return result;
 }
+#ifndef __clogf
 weak_alias (__clogf, clogf)
+#endif
diff --git a/sysdeps/generic/s_cpowf.c b/sysdeps/generic/s_cpowf.c
index 16a6302581..58eaa1aa06 100644
--- a/sysdeps/generic/s_cpowf.c
+++ b/sysdeps/generic/s_cpowf.c
@@ -27,4 +27,6 @@ __cpowf (__complex__ float x, __complex__ float c)
 {
   return __cexpf (c * __clogf (x));
 }
+#ifndef __cpowf
 weak_alias (__cpowf, cpowf)
+#endif
diff --git a/sysdeps/generic/s_cprojf.c b/sysdeps/generic/s_cprojf.c
index 83809eea0e..83df13cfa9 100644
--- a/sysdeps/generic/s_cprojf.c
+++ b/sysdeps/generic/s_cprojf.c
@@ -44,4 +44,6 @@ __cprojf (__complex__ float x)
 
   return res;
 }
+#ifndef __cprojf
 weak_alias (__cprojf, cprojf)
+#endif
diff --git a/sysdeps/generic/s_csinf.c b/sysdeps/generic/s_csinf.c
index b7278810de..8004743bd3 100644
--- a/sysdeps/generic/s_csinf.c
+++ b/sysdeps/generic/s_csinf.c
@@ -124,4 +124,6 @@ __csinf (__complex__ float x)
 
   return retval;
 }
+#ifndef __csinf
 weak_alias (__csinf, csinf)
+#endif
diff --git a/sysdeps/generic/s_csinhf.c b/sysdeps/generic/s_csinhf.c
index 5cf80d0f97..e4bb704268 100644
--- a/sysdeps/generic/s_csinhf.c
+++ b/sysdeps/generic/s_csinhf.c
@@ -119,4 +119,6 @@ __csinhf (__complex__ float x)
 
   return retval;
 }
+#ifndef __csinhf
 weak_alias (__csinhf, csinhf)
+#endif
diff --git a/sysdeps/generic/s_csqrtf.c b/sysdeps/generic/s_csqrtf.c
index f7b18368b5..b02c605a37 100644
--- a/sysdeps/generic/s_csqrtf.c
+++ b/sysdeps/generic/s_csqrtf.c
@@ -107,4 +107,6 @@ __csqrtf (__complex__ float x)
 
   return res;
 }
+#ifndef __csqrtf
 weak_alias (__csqrtf, csqrtf)
+#endif
diff --git a/sysdeps/generic/s_ctanf.c b/sysdeps/generic/s_ctanf.c
index 89bc84741c..e02971dd44 100644
--- a/sysdeps/generic/s_ctanf.c
+++ b/sysdeps/generic/s_ctanf.c
@@ -67,4 +67,6 @@ __ctanf (__complex__ float x)
 
   return res;
 }
+#ifndef __ctanf
 weak_alias (__ctanf, ctanf)
+#endif
diff --git a/sysdeps/generic/s_ctanhf.c b/sysdeps/generic/s_ctanhf.c
index b9e3c57fc4..cfcabab36a 100644
--- a/sysdeps/generic/s_ctanhf.c
+++ b/sysdeps/generic/s_ctanhf.c
@@ -67,4 +67,6 @@ __ctanhf (__complex__ float x)
 
   return res;
 }
+#ifndef __ctanhf
 weak_alias (__ctanhf, ctanhf)
+#endif