Commit 9fedcfd5 by Benjamin Kosnik Committed by Benjamin Kosnik

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
parent 4037042b
2000-10-21 Benjamin Kosnik <bkoz@purist.soma.redhat.com> 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. * docs/links.html: Add links to defects list, standards FAQ.
* testsuite/21_strings/ctor_copy_dtor.cc (test01): Disable tests * testsuite/21_strings/ctor_copy_dtor.cc (test01): Disable tests
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
// Include support for 'long long' and 'unsigned long long'. // Include support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_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. // Include support for shadow headers, ie --enable-cshadow-headers.
#undef _GLIBCPP_USE_SHADOW_HEADERS #undef _GLIBCPP_USE_SHADOW_HEADERS
......
...@@ -1412,6 +1412,50 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl ...@@ -1412,6 +1412,50 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
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 Check for whether or not to do shadowed C headers.
dnl dnl
dnl GLIBCPP_ENABLE_SHADOW dnl GLIBCPP_ENABLE_SHADOW
......
...@@ -1424,6 +1424,50 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl ...@@ -1424,6 +1424,50 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
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 Check for whether or not to do shadowed C headers.
dnl dnl
dnl GLIBCPP_ENABLE_SHADOW dnl GLIBCPP_ENABLE_SHADOW
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
// Include support for 'long long' and 'unsigned long long'. // Include support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_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. // Include support for shadow headers, ie --enable-cshadow-headers.
#undef _GLIBCPP_USE_SHADOW_HEADERS #undef _GLIBCPP_USE_SHADOW_HEADERS
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -35,6 +35,7 @@ AC_CACHE_SAVE ...@@ -35,6 +35,7 @@ AC_CACHE_SAVE
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE) GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
GLIBCPP_ENABLE_CSTDIO GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_LONG_LONG(yes) GLIBCPP_ENABLE_LONG_LONG(yes)
GLIBCPP_ENABLE_LONG_DOUBLE(yes)
GLIBCPP_ENABLE_SHADOW(no) GLIBCPP_ENABLE_SHADOW(no)
GLIBCPP_ENABLE_THREADS GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_ATOMICITY GLIBCPP_ENABLE_ATOMICITY
......
...@@ -367,6 +367,7 @@ namespace std { ...@@ -367,6 +367,7 @@ namespace std {
// //
// long double // long double
// //
#ifdef _GLIBCPP_USE_LONG_DOUBLE
#if _GLIBCPP_HAVE___BUILTIN_FABSL #if _GLIBCPP_HAVE___BUILTIN_FABSL
inline long double abs(long double __x) inline long double abs(long double __x)
{ return __builtin_fabsl(__x); } { return __builtin_fabsl(__x); }
...@@ -499,6 +500,7 @@ namespace std { ...@@ -499,6 +500,7 @@ namespace std {
{ return ::tanhl(__x); } { return ::tanhl(__x); }
#endif #endif
#endif // _GLIBCPP_USE_LONG_DOUBLE
} // std } // std
#endif // _CPP_CMATH #endif // _CPP_CMATH
......
...@@ -330,7 +330,7 @@ namespace _C_legacy { ...@@ -330,7 +330,7 @@ namespace _C_legacy {
inline double inline double
_CPP_tanh_capture(double __x) { return tanh(__x); } _CPP_tanh_capture(double __x) { return tanh(__x); }
#ifdef _GLIBCPP_USE_LONG_DOUBLE
#if _GLIBCPP_HAVE_ACOSL #if _GLIBCPP_HAVE_ACOSL
inline long double inline long double
_CPP_acos_capture(long double __x) { return acosl(__x); } _CPP_acos_capture(long double __x) { return acosl(__x); }
...@@ -535,9 +535,7 @@ namespace _C_legacy { ...@@ -535,9 +535,7 @@ namespace _C_legacy {
inline long double inline long double
_CPP_tanh_capture(long double __x) { return tanh(static_cast<double>(__x)); } _CPP_tanh_capture(long double __x) { return tanh(static_cast<double>(__x)); }
#endif #endif
#endif // _GLIBCPP_USE_LONG_DOUBLE
namespace _C_shadow { }
} // namespace _C_legacy } // namespace _C_legacy
# undef abs # undef abs
...@@ -720,6 +718,7 @@ namespace std { ...@@ -720,6 +718,7 @@ namespace std {
inline double inline double
tanh(double __x) { return _C_legacy::_CPP_tanh_capture(__x); } tanh(double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
#ifdef _GLIBCPP_USE_LONG_DOUBLE
inline long double inline long double
abs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); } abs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
...@@ -797,6 +796,8 @@ namespace std { ...@@ -797,6 +796,8 @@ namespace std {
inline long double inline long double
tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); } tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
#endif // _GLIBCPP_USE_LONG_DOUBLE
} // namespace std } // namespace std
# undef _IN_C_LEGACY_ # undef _IN_C_LEGACY_
......
#include <bits/c++config.h> #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 /* We compile these functions only when we have the long double functions
available. */ available. */
#define FLT long double #define FLT long double
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment