mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:33:59 +08:00
Makefile.am (sources): Remove complex.cc, complexf.cc and complexl.cc from list.
* src/Makefile.am (sources): Remove complex.cc, complexf.cc and complexl.cc from list. * src/Makefile.in: Regenerate. * src/complex.cc: Remove. * src/complexf.cc: Likewise. * src/complexl.cc: Likewise. * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove csqrtl.c (EXTRA_DIST): Remove csqrt.c and csqrtf.c. * libmath/Makefile.in: Regenerate. * libmath/complex-stub.h: Remove. * libmath/csqrt.c: Likewise. * libmath/sqrtf.c: Likewise. * libmath/sqrtl.c: Likewise. * libmath/mathconf.h: Remove <complex.h> and "complex-stub.h" #inclusion. * include/bits/std_complex.h (sqrt<>): Define primary template. (complex<>): Remove sqrt friend declarations. * configure.in: Initialize with src/ios.cc. * configure: Regenerate. * acinclude.m4: Remove check for csqrt* and <complex.h> * aclocal.m4: Regenerate. * config.h.in: Regenerate. * Makefile.in: Regenerate. From-SVN: r38409
This commit is contained in:
parent
4b01bd1658
commit
1228c7b6bd
@ -1,3 +1,32 @@
|
||||
2000-12-21 Gabriel Dos Reis <gdr@codesourcery.com>
|
||||
|
||||
* src/Makefile.am (sources): Remove complex.cc, complexf.cc and
|
||||
complexl.cc from list.
|
||||
* src/Makefile.in: Regenerate.
|
||||
* src/complex.cc: Remove.
|
||||
* src/complexf.cc: Likewise.
|
||||
* src/complexl.cc: Likewise.
|
||||
|
||||
* libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove csqrtl.c
|
||||
(EXTRA_DIST): Remove csqrt.c and csqrtf.c.
|
||||
* libmath/Makefile.in: Regenerate.
|
||||
* libmath/complex-stub.h: Remove.
|
||||
* libmath/csqrt.c: Likewise.
|
||||
* libmath/sqrtf.c: Likewise.
|
||||
* libmath/sqrtl.c: Likewise.
|
||||
* libmath/mathconf.h: Remove <complex.h> and "complex-stub.h"
|
||||
#inclusion.
|
||||
|
||||
* include/bits/std_complex.h (sqrt<>): Define primary template.
|
||||
(complex<>): Remove sqrt friend declarations.
|
||||
|
||||
* configure.in: Initialize with src/ios.cc.
|
||||
* configure: Regenerate.
|
||||
* acinclude.m4: Remove check for csqrt* and <complex.h>
|
||||
* aclocal.m4: Regenerate.
|
||||
* config.h.in: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2000-12-20 Phil Edwards <pme@sources.redhat.com>
|
||||
|
||||
* acinclude.m4 (SECTION_FLAGS, OPT_LDFLAGS): Fix minor thinko.
|
||||
|
@ -136,48 +136,7 @@ MULTICLEAN = true
|
||||
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
||||
# values defined in terms of make variables, as is the case for CC and
|
||||
# friends when we are called from the top level Makefile.
|
||||
AM_MAKEFLAGS = \
|
||||
"AR_FLAGS=$(AR_FLAGS)" \
|
||||
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
|
||||
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
|
||||
"CFLAGS=$(CFLAGS)" \
|
||||
"CXXFLAGS=$(CXXFLAGS)" \
|
||||
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
|
||||
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
|
||||
"INSTALL=$(INSTALL)" \
|
||||
"INSTALL_DATA=$(INSTALL_DATA)" \
|
||||
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
|
||||
"LDFLAGS=$(LDFLAGS)" \
|
||||
"LIBCFLAGS=$(LIBCFLAGS)" \
|
||||
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
|
||||
"MAKE=$(MAKE)" \
|
||||
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
|
||||
"PICFLAG=$(PICFLAG)" \
|
||||
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
|
||||
"SHELL=$(SHELL)" \
|
||||
"EXPECT=$(EXPECT)" \
|
||||
"RUNTEST=$(RUNTEST)" \
|
||||
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
||||
"exec_prefix=$(exec_prefix)" \
|
||||
"infodir=$(infodir)" \
|
||||
"libdir=$(libdir)" \
|
||||
"includedir=$(includedir)" \
|
||||
"prefix=$(prefix)" \
|
||||
"tooldir=$(tooldir)" \
|
||||
"AR=$(AR)" \
|
||||
"AS=$(AS)" \
|
||||
"CC=$(CC)" \
|
||||
"CXX=$(CXX)" \
|
||||
"LD=$(LD)" \
|
||||
"LIBCFLAGS=$(LIBCFLAGS)" \
|
||||
"PICFLAG=$(PICFLAG)" \
|
||||
"RANLIB=$(RANLIB)" \
|
||||
"NM=$(NM)" \
|
||||
"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
|
||||
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
|
||||
"DESTDIR=$(DESTDIR)" \
|
||||
"WERROR=$(WERROR)"
|
||||
AM_MAKEFLAGS = "AR_FLAGS=$(AR_FLAGS)" "CC_FOR_BUILD=$(CC_FOR_BUILD)" "CC_FOR_TARGET=$(CC_FOR_TARGET)" "CFLAGS=$(CFLAGS)" "CXXFLAGS=$(CXXFLAGS)" "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" "INSTALL=$(INSTALL)" "INSTALL_DATA=$(INSTALL_DATA)" "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" "LDFLAGS=$(LDFLAGS)" "LIBCFLAGS=$(LIBCFLAGS)" "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" "MAKE=$(MAKE)" "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" "PICFLAG=$(PICFLAG)" "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" "SHELL=$(SHELL)" "EXPECT=$(EXPECT)" "RUNTEST=$(RUNTEST)" "RUNTESTFLAGS=$(RUNTESTFLAGS)" "exec_prefix=$(exec_prefix)" "infodir=$(infodir)" "libdir=$(libdir)" "includedir=$(includedir)" "prefix=$(prefix)" "tooldir=$(tooldir)" "AR=$(AR)" "AS=$(AS)" "CC=$(CC)" "CXX=$(CXX)" "LD=$(LD)" "LIBCFLAGS=$(LIBCFLAGS)" "PICFLAG=$(PICFLAG)" "RANLIB=$(RANLIB)" "NM=$(NM)" "NM_FOR_BUILD=$(NM_FOR_BUILD)" "NM_FOR_TARGET=$(NM_FOR_TARGET)" "DESTDIR=$(DESTDIR)" "WERROR=$(WERROR)"
|
||||
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
|
@ -748,9 +748,8 @@ dnl
|
||||
dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
||||
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
|
||||
dnl Check for complex versions of math functions of platform.
|
||||
AC_CHECK_HEADERS([complex.h])
|
||||
AC_CHECK_LIB(m, main)
|
||||
AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf atan2f expf copysignf)
|
||||
AC_REPLACE_MATHFUNCS(nan hypot hypotf atan2f expf copysignf)
|
||||
|
||||
dnl Compile the long double complex functions only if the function
|
||||
dnl provides the non-complex long double functions that are needed.
|
||||
@ -760,7 +759,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
|
||||
if test x$ac_cv_func_atan2l = x"yes" \
|
||||
&& test x$ac_cv_func_copysignl = x"yes"; then
|
||||
USE_COMPLEX_LONG_DOUBLE=yes
|
||||
AC_REPLACE_MATHFUNCS(csqrtl hypotl signbitl)
|
||||
AC_REPLACE_MATHFUNCS(hypotl signbitl)
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
|
||||
|
5
libstdc++-v3/aclocal.m4
vendored
5
libstdc++-v3/aclocal.m4
vendored
@ -760,9 +760,8 @@ dnl
|
||||
dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
||||
AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
|
||||
dnl Check for complex versions of math functions of platform.
|
||||
AC_CHECK_HEADERS([complex.h])
|
||||
AC_CHECK_LIB(m, main)
|
||||
AC_REPLACE_MATHFUNCS(csqrt csqrtf nan hypot hypotf atan2f expf copysignf)
|
||||
AC_REPLACE_MATHFUNCS(nan hypot hypotf atan2f expf copysignf)
|
||||
|
||||
dnl Compile the long double complex functions only if the function
|
||||
dnl provides the non-complex long double functions that are needed.
|
||||
@ -772,7 +771,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
|
||||
if test x$ac_cv_func_atan2l = x"yes" \
|
||||
&& test x$ac_cv_func_copysignl = x"yes"; then
|
||||
USE_COMPLEX_LONG_DOUBLE=yes
|
||||
AC_REPLACE_MATHFUNCS(csqrtl hypotl signbitl)
|
||||
AC_REPLACE_MATHFUNCS(hypotl signbitl)
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_COMPLEX_LONG_DOUBLE)
|
||||
|
2205
libstdc++-v3/configure
vendored
2205
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
# aclocal, autoconf, autoheader, automake
|
||||
|
||||
AC_PREREQ(2.13)
|
||||
AC_INIT(src/complex.cc)
|
||||
AC_INIT(src/ios.cc)
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
|
||||
# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
|
||||
|
@ -450,6 +450,28 @@ namespace std
|
||||
return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
|
||||
}
|
||||
|
||||
template<typename _Tp>
|
||||
complex<_Tp>
|
||||
sqrt(const complex<_Tp>& __z)
|
||||
{
|
||||
_Tp __x = __z.real();
|
||||
_Tp __y = __z.imag();
|
||||
|
||||
if (__x == _Tp())
|
||||
{
|
||||
_Tp __t = sqrt(abs(__y) / 2);
|
||||
return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
|
||||
}
|
||||
else
|
||||
{
|
||||
_Tp __t = sqrt( 2 * abs(__z) + abs(__x));
|
||||
_Tp __u = __t / 2;
|
||||
return __x > _Tp()
|
||||
? complex<_Tp>(__u, __y / __t)
|
||||
: complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename _Tp>
|
||||
inline complex<_Tp>
|
||||
tan(const complex<_Tp>& __z)
|
||||
@ -537,8 +559,6 @@ namespace std
|
||||
|
||||
friend class complex<double>;
|
||||
friend class complex<long double>;
|
||||
|
||||
friend complex<float> sqrt<>(const complex<float>&);
|
||||
};
|
||||
|
||||
inline float
|
||||
@ -685,8 +705,6 @@ namespace std
|
||||
|
||||
friend class complex<float>;
|
||||
friend class complex<long double>;
|
||||
|
||||
friend complex<double> sqrt<>(const complex<double>&);
|
||||
};
|
||||
|
||||
inline double
|
||||
@ -833,8 +851,6 @@ namespace std
|
||||
|
||||
friend class complex<float>;
|
||||
friend class complex<double>;
|
||||
|
||||
friend complex<long double> sqrt<>(const complex<long double>&);
|
||||
};
|
||||
|
||||
inline
|
||||
|
@ -26,10 +26,10 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
|
||||
noinst_LTLIBRARIES = libmath.la
|
||||
|
||||
EXTRA_LONG_DOUBLE_yes = \
|
||||
csqrtl.c hypotl.c signbitl.c
|
||||
hypotl.c signbitl.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
csqrt.c csqrtf.c hypot.c hypotf.c atan2f.c expf.c \
|
||||
hypot.c hypotf.c atan2f.c expf.c \
|
||||
$(EXTRA_LONG_DOUBLE_yes)
|
||||
|
||||
libmath_la_LIBADD = \
|
||||
|
@ -114,24 +114,18 @@ AUTOMAKE_OPTIONS = 1.3 cygnus
|
||||
|
||||
noinst_LTLIBRARIES = libmath.la
|
||||
|
||||
EXTRA_LONG_DOUBLE_yes = \
|
||||
csqrtl.c hypotl.c signbitl.c
|
||||
EXTRA_LONG_DOUBLE_yes = hypotl.c signbitl.c
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
csqrt.c csqrtf.c hypot.c hypotf.c atan2f.c expf.c \
|
||||
$(EXTRA_LONG_DOUBLE_yes)
|
||||
EXTRA_DIST = hypot.c hypotf.c atan2f.c expf.c $(EXTRA_LONG_DOUBLE_yes)
|
||||
|
||||
|
||||
libmath_la_LIBADD = \
|
||||
@LIBMATHOBJS@ \
|
||||
$(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
|
||||
libmath_la_LIBADD = @LIBMATHOBJS@ $(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE))
|
||||
|
||||
|
||||
libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
|
||||
|
||||
libmath_la_SOURCES = \
|
||||
signbit.c signbitf.c
|
||||
libmath_la_SOURCES = signbit.c signbitf.c
|
||||
|
||||
|
||||
LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
@ -145,9 +139,7 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBIO_INCLUDES = @LIBIO_INCLUDES@
|
||||
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
|
||||
|
||||
INCLUDES = \
|
||||
-I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include \
|
||||
$(TOPLEVEL_INCLUDES)
|
||||
INCLUDES = -I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES)
|
||||
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
|
@ -1,42 +0,0 @@
|
||||
|
||||
/* Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU ISO C++ Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this library; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA.
|
||||
|
||||
As a special exception, you may use this file as part of a free software
|
||||
library without restriction. Specifically, if other files instantiate
|
||||
templates or use macros or inline functions from this file, or you compile
|
||||
this file and link it with other files to produce an executable, this
|
||||
file does not by itself cause the resulting executable to be covered by
|
||||
the GNU General Public License. This exception does not however
|
||||
invalidate any other reasons why the executable file might be covered by
|
||||
the GNU General Public License. */
|
||||
|
||||
|
||||
/* This is no header meant to be used in general. It's simply here to
|
||||
get libstdc++ compiled. It should never be installed in an official
|
||||
directory. */
|
||||
|
||||
#ifndef _COMPLEX_H
|
||||
#define _COMPLEX_H 1
|
||||
|
||||
__complex__ double csqrt (__complex__ double x);
|
||||
__complex__ float csqrtf (__complex__ float x);
|
||||
__complex__ long double csqrtl (__complex__ long double x);
|
||||
|
||||
#endif
|
||||
|
@ -1,110 +0,0 @@
|
||||
/* Complex square root of double value. */
|
||||
|
||||
/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU ISO C++ Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this library; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA.
|
||||
|
||||
As a special exception, you may use this file as part of a free software
|
||||
library without restriction. Specifically, if other files instantiate
|
||||
templates or use macros or inline functions from this file, or you compile
|
||||
this file and link it with other files to produce an executable, this
|
||||
file does not by itself cause the resulting executable to be covered by
|
||||
the GNU General Public License. This exception does not however
|
||||
invalidate any other reasons why the executable file might be covered by
|
||||
the GNU General Public License. */
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include "mathconf.h"
|
||||
|
||||
|
||||
__complex__ double
|
||||
csqrt (__complex__ double x)
|
||||
{
|
||||
__complex__ double res;
|
||||
|
||||
if (!FINITE_P (__real__ x) || !FINITE_P (__imag__ x))
|
||||
{
|
||||
if (INFINITE_P (__imag__ x))
|
||||
{
|
||||
__real__ res = HUGE_VAL;
|
||||
__imag__ res = __imag__ x;
|
||||
}
|
||||
else if (INFINITE_P (__real__ x))
|
||||
{
|
||||
if (__real__ x < 0.0)
|
||||
{
|
||||
__real__ res = __imag__ x != __imag__ x ? NAN : 0;
|
||||
__imag__ res = copysign (HUGE_VAL, __imag__ x);
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __real__ x;
|
||||
__imag__ res = (__imag__ x != __imag__ x
|
||||
? NAN : copysign (0.0, __imag__ x));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = NAN;
|
||||
__imag__ res = NAN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (__imag__ x == 0.0)
|
||||
{
|
||||
if (__real__ x < 0.0)
|
||||
{
|
||||
__real__ res = 0.0;
|
||||
__imag__ res = copysign (sqrt (-__real__ x), __imag__ x);
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = fabs (sqrt (__real__ x));
|
||||
__imag__ res = copysign (0.0, __imag__ x);
|
||||
}
|
||||
}
|
||||
else if (__real__ x == 0.0)
|
||||
{
|
||||
double r = sqrt (0.5 * fabs (__imag__ x));
|
||||
|
||||
__real__ res = copysign (r, __imag__ x);
|
||||
__imag__ res = r;
|
||||
}
|
||||
else
|
||||
{
|
||||
__complex__ double q;
|
||||
double t, r;
|
||||
|
||||
if (fabs (__imag__ x) < 2.0e-4 * fabs (__real__ x))
|
||||
t = 0.25 * __imag__ x * (__imag__ x / __real__ x);
|
||||
else
|
||||
t = 0.5 * (hypot (__real__ x, __imag__ x) - __real__ x);
|
||||
|
||||
r = sqrt (t);
|
||||
|
||||
__real__ q = __imag__ x / (2.0 * r);
|
||||
__imag__ q = r;
|
||||
|
||||
/* Heron iteration in complex arithmetic. */
|
||||
res = 0.5 * (q + q / x);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
/* Complex square root of float value. */
|
||||
|
||||
/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU ISO C++ Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this library; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA.
|
||||
|
||||
As a special exception, you may use this file as part of a free software
|
||||
library without restriction. Specifically, if other files instantiate
|
||||
templates or use macros or inline functions from this file, or you compile
|
||||
this file and link it with other files to produce an executable, this
|
||||
file does not by itself cause the resulting executable to be covered by
|
||||
the GNU General Public License. This exception does not however
|
||||
invalidate any other reasons why the executable file might be covered by
|
||||
the GNU General Public License. */
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include "mathconf.h"
|
||||
|
||||
|
||||
__complex__ float
|
||||
csqrtf (__complex__ float x)
|
||||
{
|
||||
__complex__ float res;
|
||||
|
||||
if (!FINITEF_P (__real__ x) || !FINITEF_P (__imag__ x))
|
||||
{
|
||||
if (INFINITEF_P (__imag__ x))
|
||||
{
|
||||
__real__ res = HUGE_VALF;
|
||||
__imag__ res = __imag__ x;
|
||||
}
|
||||
else if (INFINITEF_P (__real__ x))
|
||||
{
|
||||
if (__real__ x < 0.0)
|
||||
{
|
||||
__real__ res = __imag__ x != __imag__ x ? NAN : 0;
|
||||
__imag__ res = copysignf (HUGE_VALF, __imag__ x);
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __real__ x;
|
||||
__imag__ res = (__imag__ x != __imag__ x
|
||||
? NAN : copysignf (0.0, __imag__ x));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = NAN;
|
||||
__imag__ res = NAN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (__imag__ x == 0.0)
|
||||
{
|
||||
if (__real__ x < 0.0)
|
||||
{
|
||||
__real__ res = 0.0;
|
||||
__imag__ res = copysignf (sqrtf (-__real__ x), __imag__ x);
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = fabsf (sqrtf (__real__ x));
|
||||
__imag__ res = copysignf (0.0, __imag__ x);
|
||||
}
|
||||
}
|
||||
else if (__real__ x == 0.0)
|
||||
{
|
||||
float r = sqrtf (0.5 * fabsf (__imag__ x));
|
||||
|
||||
__real__ res = copysignf (r, __imag__ x);
|
||||
__imag__ res = r;
|
||||
}
|
||||
else
|
||||
{
|
||||
__complex__ float q;
|
||||
float t, r;
|
||||
|
||||
if (fabsf (__imag__ x) < 2.0e-4 * fabsf (__real__ x))
|
||||
t = 0.25 * __imag__ x * (__imag__ x / __real__ x);
|
||||
else
|
||||
t = 0.5 * (hypotf (__real__ x, __imag__ x) - __real__ x);
|
||||
|
||||
r = sqrtf (t);
|
||||
|
||||
__real__ q = __imag__ x / (2.0 * r);
|
||||
__imag__ q = r;
|
||||
|
||||
/* Heron iteration in complex arithmetic. */
|
||||
res = 0.5 * (q + q / x);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
/* Complex square root of long double value. */
|
||||
|
||||
/* Copyright (C) 1997-1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU ISO C++ Library. This library is free
|
||||
software; you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this library; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA.
|
||||
|
||||
As a special exception, you may use this file as part of a free software
|
||||
library without restriction. Specifically, if other files instantiate
|
||||
templates or use macros or inline functions from this file, or you compile
|
||||
this file and link it with other files to produce an executable, this
|
||||
file does not by itself cause the resulting executable to be covered by
|
||||
the GNU General Public License. This exception does not however
|
||||
invalidate any other reasons why the executable file might be covered by
|
||||
the GNU General Public License. */
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include "mathconf.h"
|
||||
|
||||
/* Thanks to SGI we have to trick here. At least Irix 6.2 provides hypotl,
|
||||
but it has a wrong prototype. Grrr. */
|
||||
extern long double local_hypotl (long double, long double) asm ("hypotl");
|
||||
|
||||
|
||||
__complex__ long double
|
||||
csqrtl (__complex__ long double x)
|
||||
{
|
||||
__complex__ long double res;
|
||||
|
||||
if (!FINITEL_P (__real__ x) || !FINITEL_P (__imag__ x))
|
||||
{
|
||||
if (INFINITEL_P (__imag__ x))
|
||||
{
|
||||
__real__ res = HUGE_VALL;
|
||||
__imag__ res = __imag__ x;
|
||||
}
|
||||
else if (INFINITEL_P (__real__ x))
|
||||
{
|
||||
if (__real__ x < 0.0)
|
||||
{
|
||||
__real__ res = __imag__ x != __imag__ x ? NAN : 0;
|
||||
__imag__ res = copysignl (HUGE_VALL, __imag__ x);
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = __real__ x;
|
||||
__imag__ res = (__imag__ x != __imag__ x
|
||||
? NAN : copysignl (0.0, __imag__ x));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = NAN;
|
||||
__imag__ res = NAN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (__imag__ x == 0.0)
|
||||
{
|
||||
if (__real__ x < 0.0)
|
||||
{
|
||||
__real__ res = 0.0;
|
||||
__imag__ res = copysignl (sqrtl (-__real__ x), __imag__ x);
|
||||
}
|
||||
else
|
||||
{
|
||||
__real__ res = fabsl (sqrtl (__real__ x));
|
||||
__imag__ res = copysignl (0.0, __imag__ x);
|
||||
}
|
||||
}
|
||||
else if (__real__ x == 0.0)
|
||||
{
|
||||
long double r = sqrtl (0.5 * fabsl (__imag__ x));
|
||||
|
||||
__real__ res = copysignl (r, __imag__ x);
|
||||
__imag__ res = r;
|
||||
}
|
||||
else
|
||||
{
|
||||
__complex__ long double q;
|
||||
long double t, r;
|
||||
|
||||
if (fabsl (__imag__ x) < 2.0e-4 * fabsl (__real__ x))
|
||||
t = 0.25 * __imag__ x * (__imag__ x / __real__ x);
|
||||
else
|
||||
t = 0.5 * (local_hypotl (__real__ x, __imag__ x) - __real__ x);
|
||||
|
||||
r = sqrtl (t);
|
||||
|
||||
__real__ q = __imag__ x / (2.0 * r);
|
||||
__imag__ q = r;
|
||||
|
||||
/* Heron iteration in complex arithmetic. */
|
||||
res = 0.5 * (q + q / x);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
@ -227,12 +227,6 @@ double nan (void);
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _GLIBCPP_HAVE_COMPLEX_H
|
||||
# include <complex.h>
|
||||
#else
|
||||
# include "complex-stub.h"
|
||||
#endif
|
||||
|
||||
/* signbit is a macro in ISO C99. */
|
||||
#ifndef signbit
|
||||
extern int __signbitf (float);
|
||||
|
@ -21,7 +21,7 @@
|
||||
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
## USA.
|
||||
|
||||
## $Id: Makefile.am,v 1.58 2000/12/15 00:55:02 bkoz Exp $
|
||||
## $Id: Makefile.am,v 1.59 2000/12/18 18:03:08 bkoz Exp $
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.3 gnits
|
||||
MAINT_CHARSET = latin1
|
||||
@ -174,7 +174,7 @@ build_headers = \
|
||||
|
||||
sources = \
|
||||
limitsMEMBERS.cc \
|
||||
complex.cc complexf.cc complexl.cc complex_io.cc \
|
||||
complex_io.cc \
|
||||
stdexcept.cc bitset.cc \
|
||||
c++io.cc ios.cc stdstreams.cc strstream.cc \
|
||||
locale.cc localename.cc codecvt.cc \
|
||||
|
@ -112,12 +112,12 @@ MAINT_CHARSET = latin1
|
||||
|
||||
# Cross compiler and multilib support.
|
||||
# Install a library built with a cross compiler in tooldir, not libdir.
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@gcc_version = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@@gcc_version@
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexecdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@$(libdir)/gcc-lib/$(target_alias)
|
||||
@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@$(toolexecdir)/$(gcc_version)
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@toolexeclibdir = @USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@$(libdir)$(MULTISUBDIR)
|
||||
@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@gcc_version = @gcc_version@
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexecdir = $(libdir)/gcc-lib/$(target_alias)
|
||||
@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_TRUE@toolexeclibdir = $(toolexecdir)/$(gcc_version)
|
||||
@USE_LIBDIR_TRUE@@VERSION_SPECIFIC_LIBS_FALSE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
|
||||
@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
|
||||
|
||||
toolexeclib_LTLIBRARIES = libstdc++.la
|
||||
EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
|
||||
@ -129,13 +129,11 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
|
||||
# These bits are all figured out from configure. Look in acinclude.m4
|
||||
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
|
||||
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
|
||||
CONFIG_CXXFLAGS = \
|
||||
@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
|
||||
CONFIG_CXXFLAGS = @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
|
||||
|
||||
|
||||
# Warning flags to use.
|
||||
WARN_CXXFLAGS = \
|
||||
@WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
|
||||
WARN_CXXFLAGS = @WARN_FLAGS@ $(WERROR) @WFMT_FLAGS@
|
||||
|
||||
|
||||
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
|
||||
@ -147,120 +145,35 @@ LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
|
||||
LIBIO_INCLUDES = @LIBIO_INCLUDES@
|
||||
CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
|
||||
|
||||
INCLUDES = \
|
||||
-nostdinc++ \
|
||||
$(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) \
|
||||
$(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) -I$(top_builddir)/include \
|
||||
$(TOPLEVEL_INCLUDES)
|
||||
INCLUDES = -nostdinc++ $(CSHADOW_INCLUDES) $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDE_DIR) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) -I$(top_builddir)/include $(TOPLEVEL_INCLUDES)
|
||||
|
||||
|
||||
base_headers = \
|
||||
bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h \
|
||||
bits/basic_string.h bits/std_string.h bits/string.tcc \
|
||||
bits/generic_shadow.h bits/std_utility.h \
|
||||
bits/std_complex.h \
|
||||
bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h \
|
||||
bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h \
|
||||
bits/gslice.h bits/gslice_array.h bits/indirect_array.h \
|
||||
bits/exception_support.h \
|
||||
bits/std_fstream.h bits/std_iomanip.h \
|
||||
bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc \
|
||||
bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h \
|
||||
bits/std_istream.h bits/istream.tcc bits/std_locale.h \
|
||||
bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc \
|
||||
bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h \
|
||||
bits/streambuf.tcc bits/basic_file.h \
|
||||
bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h \
|
||||
bits/stl_pthread_alloc.h bits/pthread_allocimpl.h \
|
||||
bits/stl_threads.h bits/stl_iterator_base.h \
|
||||
bits/std_bitset.h bits/std_deque.h bits/std_functional.h \
|
||||
bits/std_iterator.h bits/std_list.h \
|
||||
bits/std_map.h bits/std_memory.h bits/std_numeric.h \
|
||||
bits/std_queue.h bits/std_set.h bits/std_stack.h \
|
||||
bits/std_stdexcept.h bits/std_vector.h \
|
||||
bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h \
|
||||
bits/stl_deque.h bits/stl_function.h \
|
||||
bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h \
|
||||
bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h \
|
||||
bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h \
|
||||
bits/stl_relops.h bits/stl_set.h \
|
||||
bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h \
|
||||
bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h \
|
||||
bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h \
|
||||
bits/concept_checks.h bits/container_concepts.h \
|
||||
bits/sequence_concepts.h bits/stl_config.h bits/stl_construct.h
|
||||
base_headers = bits/cpp_type_traits.h bits/char_traits.h bits/codecvt.h bits/basic_string.h bits/std_string.h bits/string.tcc bits/generic_shadow.h bits/std_utility.h bits/std_complex.h bits/valarray_array.h bits/valarray_array.tcc bits/valarray_meta.h bits/std_valarray.h bits/mask_array.h bits/slice.h bits/slice_array.h bits/gslice.h bits/gslice_array.h bits/indirect_array.h bits/exception_support.h bits/std_fstream.h bits/std_iomanip.h bits/ios_base.h bits/fpos.h bits/basic_ios.h bits/basic_ios.tcc bits/std_ios.h bits/std_iosfwd.h bits/std_iostream.h bits/std_istream.h bits/istream.tcc bits/std_locale.h bits/fstream.tcc bits/ostream.tcc bits/sbuf_iter.h bits/sstream.tcc bits/std_ostream.h bits/std_sstream.h bits/std_streambuf.h bits/streambuf.tcc bits/basic_file.h bits/locale_facets.h bits/locale_facets.tcc bits/localefwd.h bits/stl_pthread_alloc.h bits/pthread_allocimpl.h bits/stl_threads.h bits/stl_iterator_base.h bits/std_bitset.h bits/std_deque.h bits/std_functional.h bits/std_iterator.h bits/std_list.h bits/std_map.h bits/std_memory.h bits/std_numeric.h bits/std_queue.h bits/std_set.h bits/std_stack.h bits/std_stdexcept.h bits/std_vector.h bits/stl_algo.h bits/stl_algobase.h bits/stl_alloc.h bits/stl_deque.h bits/stl_function.h bits/stl_heap.h bits/stl_iterator.h bits/stl_list.h bits/stl_map.h bits/stl_multimap.h bits/stl_multiset.h bits/stl_numeric.h bits/stl_pair.h bits/stl_queue.h bits/stl_raw_storage_iter.h bits/stl_relops.h bits/stl_set.h bits/stl_stack.h bits/stl_string_fwd.h bits/stl_tempbuf.h bits/stl_tree.h bits/stl_uninitialized.h bits/stl_vector.h bits/type_traits.h bits/stl_range_errors.h bits/std_algorithm.h bits/concept_checks.h bits/container_concepts.h bits/sequence_concepts.h bits/stl_config.h bits/stl_construct.h
|
||||
|
||||
|
||||
backward_headers = \
|
||||
backward/complex.h backward/iomanip.h backward/istream.h \
|
||||
backward/ostream.h backward/stream.h backward/streambuf.h \
|
||||
backward/algo.h backward/algobase.h backward/alloc.h \
|
||||
backward/bvector.h backward/defalloc.h backward/deque.h \
|
||||
backward/function.h backward/hash_map.h backward/hash_set.h \
|
||||
backward/hashtable.h backward/heap.h backward/iterator.h \
|
||||
backward/list.h backward/map.h backward/multimap.h backward/new.h \
|
||||
backward/multiset.h backward/pair.h backward/iostream.h \
|
||||
backward/rope.h backward/set.h backward/slist.h backward/stack.h \
|
||||
backward/tempbuf.h backward/tree.h backward/vector.h \
|
||||
backward/fstream.h backward/strstream.h backward/strstream
|
||||
backward_headers = backward/complex.h backward/iomanip.h backward/istream.h backward/ostream.h backward/stream.h backward/streambuf.h backward/algo.h backward/algobase.h backward/alloc.h backward/bvector.h backward/defalloc.h backward/deque.h backward/function.h backward/hash_map.h backward/hash_set.h backward/hashtable.h backward/heap.h backward/iterator.h backward/list.h backward/map.h backward/multimap.h backward/new.h backward/multiset.h backward/pair.h backward/iostream.h backward/rope.h backward/set.h backward/slist.h backward/stack.h backward/tempbuf.h backward/tree.h backward/vector.h backward/fstream.h backward/strstream.h backward/strstream
|
||||
|
||||
|
||||
ext_headers = \
|
||||
ext/ropeimpl.h ext/stl_rope.h \
|
||||
ext/stl_bvector.h ext/stl_hashtable.h ext/stl_hash_fun.h \
|
||||
ext/hash_map ext/hash_set ext/rope ext/slist \
|
||||
ext/tree ext/bvector
|
||||
ext_headers = ext/ropeimpl.h ext/stl_rope.h ext/stl_bvector.h ext/stl_hashtable.h ext/stl_hash_fun.h ext/hash_map ext/hash_set ext/rope ext/slist ext/tree ext/bvector
|
||||
|
||||
|
||||
c_base_headers = \
|
||||
bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h \
|
||||
bits/std_cfloat.h bits/std_climits.h bits/std_clocale.h \
|
||||
bits/std_cmath.h bits/std_csetjmp.h bits/std_csignal.h \
|
||||
bits/std_cstdarg.h bits/std_cstddef.h bits/std_cstdio.h \
|
||||
bits/std_cstdlib.h bits/std_cstring.h bits/std_ctime.h \
|
||||
bits/std_cwchar.h bits/std_cwctype.h bits/cmath.tcc
|
||||
c_base_headers = bits/std_cassert.h bits/std_cctype.h bits/std_cerrno.h bits/std_cfloat.h bits/std_climits.h bits/std_clocale.h bits/std_cmath.h bits/std_csetjmp.h bits/std_csignal.h bits/std_cstdarg.h bits/std_cstddef.h bits/std_cstdio.h bits/std_cstdlib.h bits/std_cstring.h bits/std_ctime.h bits/std_cwchar.h bits/std_cwctype.h bits/cmath.tcc
|
||||
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@c_shadow_headers = @GLIBCPP_USE_CSHADOW_TRUE@\
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ features.h langinfo.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ bits/wrap_features.h bits/wrap_langinfo.h \
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@ sys/cdefs.h
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@c_shadow_headers = assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stddef.h stdio.h stdlib.h string.h time.h wchar.h wctype.h fcntl.h libio.h iolibio.h libioP.h pthread.h iconv.h features.h langinfo.h bits/wrap_libio.h bits/wrap_iolibio.h bits/wrap_libioP.h bits/wrap_iconv.h bits/wrap_fcntl.h bits/wrap_pthread.h bits/wrap_features.h bits/wrap_langinfo.h sys/cdefs.h
|
||||
@GLIBCPP_USE_CSHADOW_FALSE@c_shadow_headers =
|
||||
|
||||
std_headers = \
|
||||
algorithm bitset complex deque fstream functional \
|
||||
iomanip ios iosfwd iostream istream iterator limits list locale \
|
||||
map memory numeric ostream queue set sstream stack stdexcept \
|
||||
streambuf string utility valarray vector \
|
||||
cassert cctype cerrno cfloat climits clocale ciso646 \
|
||||
cmath csetjmp csignal cstdarg cstddef cstdio cstdlib \
|
||||
cstring ctime cwchar cwctype
|
||||
std_headers = algorithm bitset complex deque fstream functional iomanip ios iosfwd iostream istream iterator limits list locale map memory numeric ostream queue set sstream stack stdexcept streambuf string utility valarray vector cassert cctype cerrno cfloat climits clocale ciso646 cmath csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime cwchar cwctype
|
||||
|
||||
@GLIBCPP_NEED_LIBIO_TRUE@libio_headers = @GLIBCPP_NEED_LIBIO_TRUE@\
|
||||
@GLIBCPP_NEED_LIBIO_TRUE@ $(top_srcdir)/libio/_G_config.h $(top_srcdir)/libio/libio.h
|
||||
@GLIBCPP_NEED_LIBIO_TRUE@libio_headers = $(top_srcdir)/libio/_G_config.h $(top_srcdir)/libio/libio.h
|
||||
@GLIBCPP_NEED_LIBIO_FALSE@libio_headers =
|
||||
|
||||
build_headers = \
|
||||
bits/std_limits.h bits/c++config.h bits/c++io.h bits/c++threads.h \
|
||||
bits/atomicity.h bits/os_defines.h \
|
||||
bits/ctype_base.h bits/ctype_noninline.h bits/ctype_inline.h
|
||||
build_headers = bits/std_limits.h bits/c++config.h bits/c++io.h bits/c++threads.h bits/atomicity.h bits/os_defines.h bits/ctype_base.h bits/ctype_noninline.h bits/ctype_inline.h
|
||||
|
||||
|
||||
sources = \
|
||||
limitsMEMBERS.cc \
|
||||
complex.cc complexf.cc complexl.cc complex_io.cc \
|
||||
stdexcept.cc bitset.cc \
|
||||
c++io.cc ios.cc stdstreams.cc strstream.cc \
|
||||
locale.cc localename.cc codecvt.cc \
|
||||
locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc string-inst.cc
|
||||
sources = limitsMEMBERS.cc complex_io.cc stdexcept.cc bitset.cc c++io.cc ios.cc stdstreams.cc strstream.cc locale.cc localename.cc codecvt.cc locale-inst.cc stl-inst.cc misc-inst.cc valarray-inst.cc string-inst.cc
|
||||
|
||||
|
||||
wstring_sources = \
|
||||
wstring-inst.cc
|
||||
wstring_sources = wstring-inst.cc
|
||||
|
||||
VPATH = $(top_srcdir) $(top_srcdir)/src $(GLIBCPP_INCLUDE_DIR) $(GLIBCPP_INCLUDE_DIR)/std $(C_INCLUDE_DIR)
|
||||
|
||||
@ -271,20 +184,17 @@ libstdc___la_SOURCES = $(sources)
|
||||
|
||||
libinst_wstring_la_SOURCES = $(wstring_sources)
|
||||
|
||||
libstdc___la_LIBADD = \
|
||||
../libmath/libmath.la @libio_la@ \
|
||||
../libsupc++/libsupc++convenience.la \
|
||||
@libinst_wstring_la@
|
||||
libstdc___la_LIBADD = ../libmath/libmath.la @libio_la@ ../libsupc++/libsupc++convenience.la @libinst_wstring_la@
|
||||
|
||||
|
||||
libstdc___la_LDFLAGS = -version-info 3:0:0 -lm
|
||||
|
||||
libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD)
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_H = @GLIBCPP_USE_CSHADOW_TRUE@$(top_builddir)/stamp-cshadow
|
||||
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_H = $(top_builddir)/stamp-cshadow
|
||||
@GLIBCPP_USE_CSHADOW_FALSE@CSHADOW_H =
|
||||
@GXX_INCLUDE_DIR_TRUE@myincludep = @GXX_INCLUDE_DIR_TRUE@@gxx_include_dir@
|
||||
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@myincludep = @GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@$(libdir)/gcc-lib/$(target_alias)/@gcc_version@/include/g++
|
||||
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@myincludep = @GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@$(prefix)/include/g++-@libstdcxx_interface@
|
||||
@GXX_INCLUDE_DIR_TRUE@myincludep = @gxx_include_dir@
|
||||
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_TRUE@myincludep = $(libdir)/gcc-lib/$(target_alias)/@gcc_version@/include/g++
|
||||
@GXX_INCLUDE_DIR_FALSE@@VERSION_SPECIFIC_LIBS_FALSE@myincludep = $(prefix)/include/g++-@libstdcxx_interface@
|
||||
|
||||
targetincludep = @gxx_target_include_dir@
|
||||
|
||||
@ -300,12 +210,7 @@ c_incdir = @C_INCLUDE_DIR@
|
||||
# set this option because CONFIG_CXXFLAGS has to be after
|
||||
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
|
||||
# as the occasion call for it. (ie, --enable-debug)
|
||||
AM_CXXFLAGS = \
|
||||
-fno-implicit-templates \
|
||||
$(LIBSUPCXX_CXXFLAGS) \
|
||||
$(WARN_CXXFLAGS) \
|
||||
$(OPTIMIZE_CXXFLAGS) \
|
||||
$(CONFIG_CXXFLAGS)
|
||||
AM_CXXFLAGS = -fno-implicit-templates $(LIBSUPCXX_CXXFLAGS) $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
|
||||
|
||||
|
||||
# libstdc++ libtool notes
|
||||
@ -326,16 +231,14 @@ AM_CXXFLAGS = \
|
||||
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
|
||||
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
|
||||
# attempt to infer which configuration to use
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
|
||||
|
||||
|
||||
# 3) We have a problem when building the shared libstdc++ object if
|
||||
# the rules automake generates would be used. We cannot allow CXX to
|
||||
# be used in libtool since this would add -lstdc++ to the link line
|
||||
# which of course is problematic at this point.
|
||||
CXXLINK = $(LIBTOOL) --mode=link "$(CC)" \
|
||||
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
@ -354,10 +257,10 @@ libinst_string_la_OBJECTS = libinst-string.la.lo
|
||||
libinst_wstring_la_LDFLAGS =
|
||||
libinst_wstring_la_LIBADD =
|
||||
libinst_wstring_la_OBJECTS = wstring-inst.lo
|
||||
libstdc___la_OBJECTS = limitsMEMBERS.lo complex.lo complexf.lo \
|
||||
complexl.lo complex_io.lo stdexcept.lo bitset.lo c++io.lo ios.lo \
|
||||
stdstreams.lo strstream.lo locale.lo localename.lo codecvt.lo \
|
||||
locale-inst.lo stl-inst.lo misc-inst.lo valarray-inst.lo string-inst.lo
|
||||
libstdc___la_OBJECTS = limitsMEMBERS.lo complex_io.lo stdexcept.lo \
|
||||
bitset.lo c++io.lo ios.lo stdstreams.lo strstream.lo locale.lo \
|
||||
localename.lo codecvt.lo locale-inst.lo stl-inst.lo misc-inst.lo \
|
||||
valarray-inst.lo string-inst.lo
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
|
@ -1,51 +0,0 @@
|
||||
// The template and inlines for the -*- C++ -*- complex number classes.
|
||||
|
||||
// Copyright (C) 1997-2000 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This 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 General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General Public License. This exception does not however
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#include <bits/std_complex.h>
|
||||
|
||||
// This is a ISO C99 header.
|
||||
#include <mathconf.h>
|
||||
#undef complex
|
||||
|
||||
#ifndef FLT
|
||||
# define FLT double
|
||||
#endif
|
||||
|
||||
// This file often breaks due to compiler bugs. May need to put in guards, ie:
|
||||
// #if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
|
||||
// and
|
||||
// #if defined(_GLIBCPP_FLOAT_SPECIALIZATION)
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
complex<FLT>
|
||||
sqrt(const complex<FLT>& __x)
|
||||
{ return complex<FLT>(csqrt(__x._M_value)); }
|
||||
} // namespace std
|
@ -1,4 +0,0 @@
|
||||
#define FLT float
|
||||
// Used in complex.cc to work around GCC's buggy __complex__ float support.
|
||||
#define _GLIBCPP_FLOAT_SPECIALIZATION 1
|
||||
#include "complex.cc"
|
@ -1,3 +0,0 @@
|
||||
#define FLT long double
|
||||
#include "complex.cc"
|
||||
|
Loading…
Reference in New Issue
Block a user