This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Move complex math functions to generic.
- From: Dwayne Grant McConnell <decimal at us dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 12 Dec 2005 12:51:23 -0600 (CST)
- Subject: [PATCH] Move complex math functions to generic.
This patch moves the complex math functions from libc/math to
libc/sysdeps/generic so they can be overridden. This patch is a small
piece from the long double patch I posted a while back.
http://sourceware.org/ml/libc-alpha/2005-11/msg00049.html
Is there any reason this cannot be committed in preparation for additional
long double patches?
Thanks,
Dwayne
--
Dwayne Grant McConnell <decimal@us.ibm.com>
Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS
Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS
2004-07-12 Jakub Jelinek <jakub@redhat.com>
* math/conj.c: Moved to...
* sysdeps/generic/conj.c: ... here. New file.
* math/carg.c: Moved to...
* sysdeps/generic/carg.c: ... here. New file.
* math/cabsl.c: Moved to...
* sysdeps/generic/cabsl.c: ... here. New file.
* math/cimagl.c: Moved to...
* sysdeps/generic/cimagl.c: ... here. New file.
* math/cabs.c: Moved to...
* sysdeps/generic/cabs.c: ... here. New file.
* math/conjl.c: Moved to...
* sysdeps/generic/conjl.c: ... here. New file.
* math/creall.c: Moved to...
* sysdeps/generic/creall.c: ... here. New file.
* math/creal.c: Moved to...
* sysdeps/generic/creal.c: ... here. New file.
* math/cimag.c: Moved to...
* sysdeps/generic/cimag.c: ... here. New file.
* math/cargl.c: Moved to...
* sysdeps/generic/cargl.c: ... here. New file.
diff -urN libc.1/math/cabs.c libc/math/cabs.c
--- libc.1/math/cabs.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/cabs.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,33 +0,0 @@
-/* Return the complex absolute value of double 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>
-
-double
-__cabs (double _Complex z)
-{
- return __hypot (__real__ z, __imag__ z);
-}
-weak_alias (__cabs, cabs)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cabs, __cabsl)
-weak_alias (__cabs, cabsl)
-#endif
diff -urN libc.1/math/cabsl.c libc/math/cabsl.c
--- libc.1/math/cabsl.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/cabsl.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,29 +0,0 @@
-/* Return the complex absolute value of long double 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>
-
-long double
-__cabsl (long double _Complex z)
-{
- return __hypotl (__real__ z, __imag__ z);
-}
-weak_alias (__cabsl, cabsl)
diff -urN libc.1/math/carg.c libc/math/carg.c
--- libc.1/math/carg.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/carg.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,33 +0,0 @@
-/* Compute argument of complex double 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>
-
-double
-__carg (__complex__ double x)
-{
- return __atan2 (__imag__ x, __real__ x);
-}
-weak_alias (__carg, carg)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__carg, __cargl)
-weak_alias (__carg, cargl)
-#endif
diff -urN libc.1/math/cargl.c libc/math/cargl.c
--- libc.1/math/cargl.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/cargl.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,29 +0,0 @@
-/* Compute argument of complex long double 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>
-
-long double
-__cargl (__complex__ long double x)
-{
- return __atan2l (__imag__ x, __real__ x);
-}
-weak_alias (__cargl, cargl)
diff -urN libc.1/math/cimag.c libc/math/cimag.c
--- libc.1/math/cimag.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/cimag.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,32 +0,0 @@
-/* Return imaginary part of complex double 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>
-
-double
-__cimag (double _Complex z)
-{
- return __imag__ z;
-}
-weak_alias (__cimag, cimag)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cimag, __cimagl)
-weak_alias (__cimag, cimagl)
-#endif
diff -urN libc.1/math/cimagl.c libc/math/cimagl.c
--- libc.1/math/cimagl.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/cimagl.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,28 +0,0 @@
-/* Return imaginary part of complex long double 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>
-
-long double
-__cimagl (long double _Complex z)
-{
- return __imag__ z;
-}
-weak_alias (__cimagl, cimagl)
diff -urN libc.1/math/conj.c libc/math/conj.c
--- libc.1/math/conj.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/conj.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,32 +0,0 @@
-/* Return complex conjugate of complex double 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>
-
-double _Complex
-__conj (double _Complex z)
-{
- return ~z;
-}
-weak_alias (__conj, conj)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__conj, __conjl)
-weak_alias (__conj, conjl)
-#endif
diff -urN libc.1/math/conjl.c libc/math/conjl.c
--- libc.1/math/conjl.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/conjl.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,28 +0,0 @@
-/* Return complex conjugate of complex long double 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>
-
-long double _Complex
-__conjl (long double _Complex z)
-{
- return ~z;
-}
-weak_alias (__conjl, conjl)
diff -urN libc.1/math/creal.c libc/math/creal.c
--- libc.1/math/creal.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/creal.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,32 +0,0 @@
-/* Return real part of complex double 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>
-
-double
-__creal (double _Complex z)
-{
- return __real__ z;
-}
-weak_alias (__creal, creal)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__creal, __creall)
-weak_alias (__creal, creall)
-#endif
diff -urN libc.1/math/creall.c libc/math/creall.c
--- libc.1/math/creall.c 2001-07-06 00:55:35.000000000 -0400
+++ libc/math/creall.c 1969-12-31 19:00:00.000000000 -0500
@@ -1,28 +0,0 @@
-/* Return real part of complex long double 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>
-
-long double
-__creall (long double _Complex z)
-{
- return __real__ z;
-}
-weak_alias (__creall, creall)
diff -urN libc.1/sysdeps/generic/cabs.c libc/sysdeps/generic/cabs.c
--- libc.1/sysdeps/generic/cabs.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/cabs.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,33 @@
+/* Return the complex absolute value of double 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>
+
+double
+__cabs (double _Complex z)
+{
+ return __hypot (__real__ z, __imag__ z);
+}
+weak_alias (__cabs, cabs)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__cabs, __cabsl)
+weak_alias (__cabs, cabsl)
+#endif
diff -urN libc.1/sysdeps/generic/cabsl.c libc/sysdeps/generic/cabsl.c
--- libc.1/sysdeps/generic/cabsl.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/cabsl.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,29 @@
+/* Return the complex absolute value of long double 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>
+
+long double
+__cabsl (long double _Complex z)
+{
+ return __hypotl (__real__ z, __imag__ z);
+}
+weak_alias (__cabsl, cabsl)
diff -urN libc.1/sysdeps/generic/carg.c libc/sysdeps/generic/carg.c
--- libc.1/sysdeps/generic/carg.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/carg.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,33 @@
+/* Compute argument of complex double 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>
+
+double
+__carg (__complex__ double x)
+{
+ return __atan2 (__imag__ x, __real__ x);
+}
+weak_alias (__carg, carg)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__carg, __cargl)
+weak_alias (__carg, cargl)
+#endif
diff -urN libc.1/sysdeps/generic/cargl.c libc/sysdeps/generic/cargl.c
--- libc.1/sysdeps/generic/cargl.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/cargl.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,29 @@
+/* Compute argument of complex long double 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>
+
+long double
+__cargl (__complex__ long double x)
+{
+ return __atan2l (__imag__ x, __real__ x);
+}
+weak_alias (__cargl, cargl)
diff -urN libc.1/sysdeps/generic/cimag.c libc/sysdeps/generic/cimag.c
--- libc.1/sysdeps/generic/cimag.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/cimag.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,32 @@
+/* Return imaginary part of complex double 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>
+
+double
+__cimag (double _Complex z)
+{
+ return __imag__ z;
+}
+weak_alias (__cimag, cimag)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__cimag, __cimagl)
+weak_alias (__cimag, cimagl)
+#endif
diff -urN libc.1/sysdeps/generic/cimagl.c libc/sysdeps/generic/cimagl.c
--- libc.1/sysdeps/generic/cimagl.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/cimagl.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,28 @@
+/* Return imaginary part of complex long double 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>
+
+long double
+__cimagl (long double _Complex z)
+{
+ return __imag__ z;
+}
+weak_alias (__cimagl, cimagl)
diff -urN libc.1/sysdeps/generic/conj.c libc/sysdeps/generic/conj.c
--- libc.1/sysdeps/generic/conj.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/conj.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,32 @@
+/* Return complex conjugate of complex double 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>
+
+double _Complex
+__conj (double _Complex z)
+{
+ return ~z;
+}
+weak_alias (__conj, conj)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__conj, __conjl)
+weak_alias (__conj, conjl)
+#endif
diff -urN libc.1/sysdeps/generic/conjl.c libc/sysdeps/generic/conjl.c
--- libc.1/sysdeps/generic/conjl.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/conjl.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,28 @@
+/* Return complex conjugate of complex long double 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>
+
+long double _Complex
+__conjl (long double _Complex z)
+{
+ return ~z;
+}
+weak_alias (__conjl, conjl)
diff -urN libc.1/sysdeps/generic/creal.c libc/sysdeps/generic/creal.c
--- libc.1/sysdeps/generic/creal.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/creal.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,32 @@
+/* Return real part of complex double 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>
+
+double
+__creal (double _Complex z)
+{
+ return __real__ z;
+}
+weak_alias (__creal, creal)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__creal, __creall)
+weak_alias (__creal, creall)
+#endif
diff -urN libc.1/sysdeps/generic/creall.c libc/sysdeps/generic/creall.c
--- libc.1/sysdeps/generic/creall.c 1969-12-31 19:00:00.000000000 -0500
+++ libc/sysdeps/generic/creall.c 2001-07-06 00:55:35.000000000 -0400
@@ -0,0 +1,28 @@
+/* Return real part of complex long double 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>
+
+long double
+__creall (long double _Complex z)
+{
+ return __real__ z;
+}
+weak_alias (__creall, creall)