acconfig.h: Update comments.

2001-11-02  Phil Edwards  <pme@gcc.gnu.org>

	* acconfig.h:  Update comments.
	* acinclude.m4 (GLIBCPP_ENABLE_C99):  Move strtoll, strtoull tests...
	(GLIBCPP_ENABLE_LONG_LONG):  ...to here.  Don't check enable_c99.
	* aclocal.m4:  Regenerate.
	* config.h.in:  Regenerate.
	* configure:  Regenerate.

	* include/bits/boost_concept_check.h:  Unconditionally compile uses
	of 'long long' which require only compiler support, not C lib support.
	* include/bits/cpp_type_traits.h:  Likewise.
	* include/bits/std_limits.h:  Likewise.
	* include/bits/type_traits.h:  Likewise.
	* src/concept-inst.cc:  Likewise.
	* src/limits.cc:  Likewise.
	* include/c_shadow/stdlib.h:  Compile conditionally on _GLIBCPP_USE_C99
	instead of _GLIBCPP_USE_LONG_LONG.
	* include/c_shadow/bits/std_cstdlib.h:  Likewise.

From-SVN: r46723
This commit is contained in:
Phil Edwards 2001-11-02 22:31:03 +00:00
parent bafe341a4f
commit 222485455e
14 changed files with 899 additions and 922 deletions

View File

@ -1,3 +1,23 @@
2001-11-02 Phil Edwards <pme@gcc.gnu.org>
* acconfig.h: Update comments.
* acinclude.m4 (GLIBCPP_ENABLE_C99): Move strtoll, strtoull tests...
(GLIBCPP_ENABLE_LONG_LONG): ...to here. Don't check enable_c99.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/bits/boost_concept_check.h: Unconditionally compile uses
of 'long long' which require only compiler support, not C lib support.
* include/bits/cpp_type_traits.h: Likewise.
* include/bits/std_limits.h: Likewise.
* include/bits/type_traits.h: Likewise.
* src/concept-inst.cc: Likewise.
* src/limits.cc: Likewise.
* include/c_shadow/stdlib.h: Compile conditionally on _GLIBCPP_USE_C99
instead of _GLIBCPP_USE_LONG_LONG.
* include/c_shadow/bits/std_cstdlib.h: Likewise.
2001-11-02 Phil Edwards <pme@gcc.gnu.org>
* config/io/c_io_stdio.h: Correct grammar in comments.

View File

@ -10,16 +10,16 @@
#undef HAVE_GETTEXT
#undef HAVE_STPCPY
// Define if GCC supports weak symbols
// Define if GCC supports weak symbols.
#undef _GLIBCPP_SUPPORTS_WEAK
// Define if gthr-default.h exists (meaning that threading support is enabled)
// Define if gthr-default.h exists (meaning that threading support is enabled).
#undef HAVE_GTHR_DEFAULT
// Include support for 'long long' and 'unsigned long long'.
// Include I/O support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_LONG_LONG
// Define if code specialized for wchar_t should be used.
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
#undef _GLIBCPP_USE_C99
// Include support for 'long double'.

View File

@ -1433,10 +1433,6 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
[char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
@ -1478,7 +1474,8 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
dnl
dnl Check for template specializations for the 'long long' type extension.
dnl NB: Must check for C99 support before calling _GLIBCPP_ENABLE_LONG_LONG
dnl The result determines only whether 'long long' I/O is enabled; things
dnl like numeric_limits<> specializations are always available.
dnl
dnl GLIBCPP_ENABLE_LONG_LONG
dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
@ -1503,15 +1500,15 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
esac],
enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
# iostreams require strtoll, strtoull to compile. If the
# GLIBCPP_ENABLE_C99 tests found these, and if C99 support is enabled,
# go ahead and allow long long to be used.
if test x"$enable_c99" = x"no"; then
enable_long_long=no;
fi
AC_MSG_CHECKING([for enabled long long I/O support])
# iostreams require strtoll, strtoull to compile
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
# Option parsed, now set things appropriately
AC_MSG_CHECKING([for enabled long long support])
if test x"$enable_long_long" = xyes; then
AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
fi

View File

@ -1445,10 +1445,6 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
[char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
@ -1490,7 +1486,8 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
dnl
dnl Check for template specializations for the 'long long' type extension.
dnl NB: Must check for C99 support before calling _GLIBCPP_ENABLE_LONG_LONG
dnl The result determines only whether 'long long' I/O is enabled; things
dnl like numeric_limits<> specializations are always available.
dnl
dnl GLIBCPP_ENABLE_LONG_LONG
dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
@ -1515,15 +1512,15 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
esac],
enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
# iostreams require strtoll, strtoull to compile. If the
# GLIBCPP_ENABLE_C99 tests found these, and if C99 support is enabled,
# go ahead and allow long long to be used.
if test x"$enable_c99" = x"no"; then
enable_long_long=no;
fi
AC_MSG_CHECKING([for enabled long long I/O support])
# iostreams require strtoll, strtoull to compile
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
# Option parsed, now set things appropriately
AC_MSG_CHECKING([for enabled long long support])
if test x"$enable_long_long" = xyes; then
AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
fi

View File

@ -6,16 +6,16 @@
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
// Define if GCC supports weak symbols
// Define if GCC supports weak symbols.
#undef _GLIBCPP_SUPPORTS_WEAK
// Define if gthr-default.h exists (meaning that threading support is enabled)
// Define if gthr-default.h exists (meaning that threading support is enabled).
#undef HAVE_GTHR_DEFAULT
// Include support for 'long long' and 'unsigned long long'.
// Include I/O support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_LONG_LONG
// Define if code specialized for wchar_t should be used.
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
#undef _GLIBCPP_USE_C99
// Include support for shadow headers, ie --enable-cshadow-headers.

1700
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -97,11 +97,9 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <> struct _IntegerConcept<unsigned int> { void __constraints() {} };
template <> struct _IntegerConcept<long> { void __constraints() {} };
template <> struct _IntegerConcept<unsigned long> { void __constraints() {} };
#ifdef _GLIBCPP_USE_LONG_LONG
template <> struct _IntegerConcept<long long> { void __constraints() {} };
template <> struct _IntegerConcept<unsigned long long>
{ void __constraints() {} };
#endif
template <class _Tp>
struct _SignedIntegerConcept {
@ -112,9 +110,7 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
template <> struct _SignedIntegerConcept<short> { void __constraints() {} };
template <> struct _SignedIntegerConcept<int> { void __constraints() {} };
template <> struct _SignedIntegerConcept<long> { void __constraints() {} };
#ifdef _GLIBCPP_USE_LONG_LONG
template <> struct _SignedIntegerConcept<long long> { void __constraints(){}};
#endif
template <class _Tp>
struct _UnsignedIntegerConcept {
@ -128,10 +124,8 @@ struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
{ void __constraints() {} };
template <> struct _UnsignedIntegerConcept<unsigned long>
{ void __constraints() {} };
#ifdef _GLIBCPP_USE_LONG_LONG
template <> struct _UnsignedIntegerConcept<unsigned long long>
{ void __constraints() {} };
#endif
//===========================================================================
// Basic Concepts

View File

@ -200,7 +200,6 @@ namespace std
};
};
# ifdef _GLIBCPP_USE_LONG_LONG
template<>
struct __is_integer<long long>
{
@ -218,7 +217,6 @@ namespace std
_M_type = 1
};
};
# endif
//
// Floating point types

View File

@ -103,11 +103,9 @@
#ifndef __glibcpp_wchar_t_is_signed
#define __glibcpp_wchar_t_is_signed true
#endif
#ifdef _GLIBCPP_USE_LONG_LONG
#ifndef __glibcpp_long_long_bits
#define __glibcpp_long_long_bits 64
#endif
#endif
#ifndef __glibcpp_float_bits
#define __glibcpp_float_bits 32
#endif
@ -133,11 +131,9 @@
#ifndef __glibcpp_wchar_t_traps
#define __glibcpp_wchar_t_traps true
#endif
#ifdef _GLIBCPP_USE_LONG_LONG
#ifndef __glibcpp_long_long_traps
#define __glibcpp_long_long_traps true
#endif
#endif
// You should not need to define any macros below this point, unless
// you have a machine with non-standard bit-widths.
@ -433,8 +429,6 @@
// You must define these macros in the configuration file.
#endif
#ifdef _GLIBCPP_USE_LONG_LONG
// long long
#define __glibcpp_signed_long_long_traps true
@ -481,8 +475,6 @@
// You must define these macros in the configuration file.
#endif
#endif
// wchar_t
#define __glibcpp_wchar_t_traps true
@ -1645,8 +1637,6 @@ namespace std
#undef __glibcpp_unsigned_long_digits10
#undef __glibcpp_unsigned_long_traps
#ifdef _GLIBCPP_USE_LONG_LONG
template<>
struct numeric_limits<long long>
{
@ -1757,9 +1747,6 @@ namespace std
#undef __glibcpp_unsigned_long_long_digits
#undef __glibcpp_unsigned_long_long_digits10
#undef __glibcpp_unsigned_long_long_traps
#endif // _GLIBCPP_USE_LONG_LONG
template<>
struct numeric_limits<float>

View File

@ -208,8 +208,6 @@ template<> struct __type_traits<unsigned long> {
typedef __true_type is_POD_type;
};
#ifdef _GLIBCPP_USE_LONG_LONG
template<> struct __type_traits<long long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
@ -226,8 +224,6 @@ template<> struct __type_traits<unsigned long long> {
typedef __true_type is_POD_type;
};
#endif /* _GLIBCPP_USE_LONG_LONG */
template<> struct __type_traits<float> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
@ -313,8 +309,6 @@ template<> struct _Is_integer<unsigned long> {
typedef __true_type _Integral;
};
#ifdef _GLIBCPP_USE_LONG_LONG
template<> struct _Is_integer<long long> {
typedef __true_type _Integral;
};
@ -323,8 +317,6 @@ template<> struct _Is_integer<unsigned long long> {
typedef __true_type _Integral;
};
#endif /* _GLIBCPP_USE_LONG_LONG */
template<typename _Tp> struct _Is_normal_iterator {
typedef __false_type _Normal;
};

View File

@ -87,7 +87,7 @@ namespace _C_legacy {
# undef div
# undef labs
# undef ldiv
#ifdef _GLIBCPP_USE_LONG_LONG
#ifdef _GLIBCPP_USE_C99
# undef llabs
# undef lldiv
#endif
@ -101,7 +101,7 @@ namespace std {
struct div_t : _C_legacy::_CPP_div_t_capture { };
struct ldiv_t : _C_legacy::_CPP_ldiv_t_capture { };
#ifdef _GLIBCPP_USE_LONG_LONG
#ifdef _GLIBCPP_USE_C99
# ifdef _GLIBCPP_HAVE_LLDIV_T
struct lldiv_t : _C_legacy::_CPP_lldiv_t_capture { };
# else
@ -173,7 +173,7 @@ namespace std {
div(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#ifdef _GLIBCPP_USE_LONG_LONG
#ifdef _GLIBCPP_USE_C99
inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }

View File

@ -47,7 +47,7 @@
// some names and types with the std:: C++ version.
using std::div_t;
using std::ldiv_t;
#ifdef _GLIBCPP_USE_LONG_LONG
#ifdef _GLIBCPP_USE_C99
using std::lldiv_t;
#endif

View File

@ -94,9 +94,7 @@ namespace __gnu_cxx
_Instantiate(_LessThanComparableConcept<long> );
#ifdef _GLIBCPP_USE_LONG_LONG
_Instantiate(_LessThanComparableConcept<long long> );
#endif
_Instantiate(_LessThanComparableConcept<unsigned> );

View File

@ -305,8 +305,7 @@ namespace std
const bool numeric_limits<unsigned long>::tinyness_before;
const float_round_style numeric_limits<unsigned long>::round_style;
// XXX: Extensions
#ifdef _GLIBCPP_USE_LONG_LONG
// NOTA BENE: long long is an extension
const bool numeric_limits<long long>::is_specialized;
const int numeric_limits<long long>::digits;
const int numeric_limits<long long>::digits10;
@ -352,7 +351,6 @@ namespace std
const bool numeric_limits<unsigned long long>::traps;
const bool numeric_limits<unsigned long long>::tinyness_before;
const float_round_style numeric_limits<unsigned long long>::round_style;
#endif // _GLIBCPP_USE_LONG_LONG
// float
const bool numeric_limits<float>::is_specialized;