mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-23 14:21:20 +08:00
acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): New macro.
2000-10-21 Benjamin Kosnik <bkoz@purist.soma.redhat.com> * acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): New macro. * aclocal.m4: Regenerate. * configure.in: Use it. * configure: Regenerate. * src/complexl.cc: Fixup. * include/c_std/bits/std_cmath.h: Fixup. * include/c/bits/std_cmath.h: Fixup. From-SVN: r36998
This commit is contained in:
parent
4037042b88
commit
9fedcfd5a3
libstdc++-v3
@ -1,5 +1,13 @@
|
||||
2000-10-21 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
|
||||
|
||||
* acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): New macro.
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure.in: Use it.
|
||||
* configure: Regenerate.
|
||||
* src/complexl.cc: Fixup.
|
||||
* include/c_std/bits/std_cmath.h: Fixup.
|
||||
* include/c/bits/std_cmath.h: Fixup.
|
||||
|
||||
* docs/links.html: Add links to defects list, standards FAQ.
|
||||
|
||||
* testsuite/21_strings/ctor_copy_dtor.cc (test01): Disable tests
|
||||
|
@ -3,6 +3,9 @@
|
||||
// Include support for 'long long' and 'unsigned long long'.
|
||||
#undef _GLIBCPP_USE_LONG_LONG
|
||||
|
||||
// Include support for 'long double'.
|
||||
#undef _GLIBCPP_USE_LONG_DOUBLE
|
||||
|
||||
// Include support for shadow headers, ie --enable-cshadow-headers.
|
||||
#undef _GLIBCPP_USE_SHADOW_HEADERS
|
||||
|
||||
|
@ -1411,6 +1411,50 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for template specializations for the 'long double' type extension.
|
||||
dnl
|
||||
dnl GLIBCPP_ENABLE_LONG_DOUBLE
|
||||
dnl --enable-long-long defines _GLIBCPP_USE_LONG_DOUBLE
|
||||
dnl --disable-long-long leaves _GLIBCPP_USE_LONG_DOUBLE undefined
|
||||
dnl + Usage: GLIBCPP_ENABLE_LONG_DOUBLE[(DEFAULT)]
|
||||
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
|
||||
dnl defaults to `no'.
|
||||
dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
|
||||
dnl
|
||||
dnl GLIBCPP_ENABLE_LONG_DOUBLE
|
||||
AC_DEFUN(GLIBCPP_ENABLE_LONG_DOUBLE, [dnl
|
||||
define([GLIBCPP_ENABLE_LONG_DOUBLE_DEFAULT], ifelse($1, yes, yes, no))dnl
|
||||
|
||||
AC_ARG_ENABLE(long-double,
|
||||
changequote(<<, >>)dnl
|
||||
<<--enable-long-double turns on 'long double' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[case "$enableval" in
|
||||
yes) enable_long_double=yes ;;
|
||||
no) enable_long_double=no ;;
|
||||
*) AC_MSG_ERROR([Unknown argument to enable/disable long double]) ;;
|
||||
esac],
|
||||
enable_long_double=GLIBCPP_ENABLE_LONG_DOUBLE_DEFAULT)dnl
|
||||
|
||||
# Check for the existance of functions used if long double is enabled.
|
||||
AC_CHECK_FUNC(cosl,,ac_cosl=no)
|
||||
AC_CHECK_FUNC(sinl,,ac_sinl=no)
|
||||
|
||||
AC_MSG_CHECKING([for enabled long double])
|
||||
if test x"$ac_cosl" = xno || test x"$ac_sinl" = xno; then
|
||||
enable_long_double=no;
|
||||
fi;
|
||||
AC_MSG_RESULT($enable_long_double)
|
||||
|
||||
dnl Option parsed, now set things appropriately
|
||||
case "$enable_long_double" in
|
||||
yes) AC_DEFINE(_GLIBCPP_USE_LONG_DOUBLE)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for whether or not to do shadowed C headers.
|
||||
dnl
|
||||
|
44
libstdc++-v3/aclocal.m4
vendored
44
libstdc++-v3/aclocal.m4
vendored
@ -1423,6 +1423,50 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for template specializations for the 'long double' type extension.
|
||||
dnl
|
||||
dnl GLIBCPP_ENABLE_LONG_DOUBLE
|
||||
dnl --enable-long-long defines _GLIBCPP_USE_LONG_DOUBLE
|
||||
dnl --disable-long-long leaves _GLIBCPP_USE_LONG_DOUBLE undefined
|
||||
dnl + Usage: GLIBCPP_ENABLE_LONG_DOUBLE[(DEFAULT)]
|
||||
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
|
||||
dnl defaults to `no'.
|
||||
dnl + If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
|
||||
dnl
|
||||
dnl GLIBCPP_ENABLE_LONG_DOUBLE
|
||||
AC_DEFUN(GLIBCPP_ENABLE_LONG_DOUBLE, [dnl
|
||||
define([GLIBCPP_ENABLE_LONG_DOUBLE_DEFAULT], ifelse($1, yes, yes, no))dnl
|
||||
|
||||
AC_ARG_ENABLE(long-double,
|
||||
changequote(<<, >>)dnl
|
||||
<<--enable-long-double turns on 'long double' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[case "$enableval" in
|
||||
yes) enable_long_double=yes ;;
|
||||
no) enable_long_double=no ;;
|
||||
*) AC_MSG_ERROR([Unknown argument to enable/disable long double]) ;;
|
||||
esac],
|
||||
enable_long_double=GLIBCPP_ENABLE_LONG_DOUBLE_DEFAULT)dnl
|
||||
|
||||
# Check for the existance of functions used if long double is enabled.
|
||||
AC_CHECK_FUNC(cosl,,ac_cosl=no)
|
||||
AC_CHECK_FUNC(sinl,,ac_sinl=no)
|
||||
|
||||
AC_MSG_CHECKING([for enabled long double])
|
||||
if test x"$ac_cosl" = xno || test x"$ac_sinl" = xno; then
|
||||
enable_long_double=no;
|
||||
fi;
|
||||
AC_MSG_RESULT($enable_long_double)
|
||||
|
||||
dnl Option parsed, now set things appropriately
|
||||
case "$enable_long_double" in
|
||||
yes) AC_DEFINE(_GLIBCPP_USE_LONG_DOUBLE)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
dnl
|
||||
dnl Check for whether or not to do shadowed C headers.
|
||||
dnl
|
||||
|
@ -6,6 +6,9 @@
|
||||
// Include support for 'long long' and 'unsigned long long'.
|
||||
#undef _GLIBCPP_USE_LONG_LONG
|
||||
|
||||
// Include support for 'long double'.
|
||||
#undef _GLIBCPP_USE_LONG_DOUBLE
|
||||
|
||||
// Include support for shadow headers, ie --enable-cshadow-headers.
|
||||
#undef _GLIBCPP_USE_SHADOW_HEADERS
|
||||
|
||||
|
2120
libstdc++-v3/configure
vendored
2120
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,7 @@ AC_CACHE_SAVE
|
||||
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
|
||||
GLIBCPP_ENABLE_CSTDIO
|
||||
GLIBCPP_ENABLE_LONG_LONG(yes)
|
||||
GLIBCPP_ENABLE_LONG_DOUBLE(yes)
|
||||
GLIBCPP_ENABLE_SHADOW(no)
|
||||
GLIBCPP_ENABLE_THREADS
|
||||
GLIBCPP_ENABLE_ATOMICITY
|
||||
|
@ -367,6 +367,7 @@ namespace std {
|
||||
//
|
||||
// long double
|
||||
//
|
||||
#ifdef _GLIBCPP_USE_LONG_DOUBLE
|
||||
#if _GLIBCPP_HAVE___BUILTIN_FABSL
|
||||
inline long double abs(long double __x)
|
||||
{ return __builtin_fabsl(__x); }
|
||||
@ -499,6 +500,7 @@ namespace std {
|
||||
{ return ::tanhl(__x); }
|
||||
#endif
|
||||
|
||||
#endif // _GLIBCPP_USE_LONG_DOUBLE
|
||||
} // std
|
||||
|
||||
#endif // _CPP_CMATH
|
||||
|
@ -330,7 +330,7 @@ namespace _C_legacy {
|
||||
inline double
|
||||
_CPP_tanh_capture(double __x) { return tanh(__x); }
|
||||
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_DOUBLE
|
||||
#if _GLIBCPP_HAVE_ACOSL
|
||||
inline long double
|
||||
_CPP_acos_capture(long double __x) { return acosl(__x); }
|
||||
@ -535,9 +535,7 @@ namespace _C_legacy {
|
||||
inline long double
|
||||
_CPP_tanh_capture(long double __x) { return tanh(static_cast<double>(__x)); }
|
||||
#endif
|
||||
|
||||
namespace _C_shadow { }
|
||||
|
||||
#endif // _GLIBCPP_USE_LONG_DOUBLE
|
||||
} // namespace _C_legacy
|
||||
|
||||
# undef abs
|
||||
@ -720,6 +718,7 @@ namespace std {
|
||||
inline double
|
||||
tanh(double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_DOUBLE
|
||||
inline long double
|
||||
abs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
|
||||
|
||||
@ -797,6 +796,8 @@ namespace std {
|
||||
|
||||
inline long double
|
||||
tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
|
||||
#endif // _GLIBCPP_USE_LONG_DOUBLE
|
||||
|
||||
} // namespace std
|
||||
|
||||
# undef _IN_C_LEGACY_
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <bits/c++config.h>
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
#ifdef _GLIBCPP_USE_LONG_DOUBLE
|
||||
/* We compile these functions only when we have the long double functions
|
||||
available. */
|
||||
#define FLT long double
|
||||
|
Loading…
x
Reference in New Issue
Block a user