diff options
| author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-30 22:39:36 +0000 |
|---|---|---|
| committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-30 22:39:36 +0000 |
| commit | 2948dd21a7947545dbf6c4a9656a3607242f0966 (patch) | |
| tree | 6d218bc4cbdbfc108085ab6c6b673c951b45797c /libstdc++-v3/include/c_std | |
| parent | 7e44812a9719beaf834288013c2bb5f3b3cb5f35 (diff) | |
| download | ppe42-gcc-2948dd21a7947545dbf6c4a9656a3607242f0966.tar.gz ppe42-gcc-2948dd21a7947545dbf6c4a9656a3607242f0966.zip | |
2011-01-30 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36104 part four
* include/bits/c++config (_GLIBCXX_STD): Remove.
(_GLIBCXX_STD_D, _GLIBCXX_PR): Now _GLIBCXX_STD_C.
(_GLIBCXX_P): Now _GLIBCXX_STD_A.
(_GLIBCXX_NAMESPACE_DEBUG, _GLIBCXX_NAMESPACE_PARALLEL,
_GLIBCXX_NAMESPACE_PROFILE, _GLIBCXX_NAMESPACE_VERSION): Remove.
(_GLIBCXX_INLINE_DEBUG, _GLIBCXX_INLINE_PARALLEL,
_GLIBCXX_INLINE_PROFILE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE(X)): Remove.
(_GLIBCXX_END_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y)): Remove.
(_GLIBCXX_END_NESTED_NAMESPACE): Remove.
(_GLIBCXX_BEGIN_NAMESPACE_ALGO): Add.
(_GLIBCXX_END_NAMESPACE_ALGO): Add.
(_GLIBCXX_BEGIN_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_END_NAMESPACE_CONTAINER): Add.
(_GLIBCXX_BEGIN_NAMESPACE_VERSION): Add.
(_GLIBCXX_END_NAMESPACE_VERSION): Add.
(_GLIBCXX_BEGIN_LDBL_NAMESPACE): To _GLIBCXX_BEGIN_NAMESPACE_LDBL.
(_GLIBCXX_END_LDBL_NAMESPACE): To _GLIBCXX_END_NAMESPACE_LDBL.
(_GLIBCXX_VISIBILITY_ATTR): Revert to _GLIBCXX_VISIBILITY.
* include/*: Use new macros for namespace scope.
* config/*: Same.
* src/*: Same.
* src/Makefile.am (sources): Remove debug_list.cc, add
compatibility-debug_list-2.cc.
(parallel_sources): Remove parallel_list.cc, add
compatibility-parallel_list-2.cc.
(compatibility-parallel_list-2.[o,lo]): New rule.
* src/Makefile.in: Regenerate.
* src/debug_list.cc: Remove.
* src/parallel_list.cc: Remove.
* src/compatibility-list-2.cc: New.
* src/compatibility-debug_list-2.cc: New.
* src/compatibility-parallel_list-2.cc: New.
* doc/doxygen/user.cfg.in: Adjust macros.
* testsuite/20_util/auto_ptr/assign_neg.cc: Adjust line numbers, macros.
* testsuite/20_util/declval/requirements/1_neg.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Same.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Same.
* testsuite/20_util/forward/c_neg.cc: Same.
* testsuite/20_util/forward/f_neg.cc: Same.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Same.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Same.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/forward_list/capacity/1.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
assign_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/forward_list/requirements/dr438/
insert_neg.cc: Same.
* testsuite/23_containers/list/capacity/29134.cc: Same.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
* testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
* testsuite/23_containers/vector/bool/modifiers/insert/31370.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Same.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
* testsuite/25_algorithms/sort/35588.cc: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
* testsuite/ext/profile/mutex_extensions_neg.cc: Same.
* testsuite/ext/profile/profiler_algos.cc: Same.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Same.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Same.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169421 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/c_std')
| -rw-r--r-- | libstdc++-v3/include/c_std/cctype | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/clocale | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cmath | 14 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/csetjmp | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/csignal | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cstdarg | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cstdio | 21 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cstdlib | 28 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cstring | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/ctime | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cwchar | 28 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_std/cwctype | 7 |
12 files changed, 75 insertions, 72 deletions
diff --git a/libstdc++-v3/include/c_std/cctype b/libstdc++-v3/include/c_std/cctype index 7ba540b5b8a..7aa4b3108a0 100644 --- a/libstdc++-v3/include/c_std/cctype +++ b/libstdc++-v3/include/c_std/cctype @@ -60,8 +60,8 @@ #undef tolower #undef toupper -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::isalnum; using ::isalpha; using ::iscntrl; @@ -75,7 +75,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::isxdigit; using ::tolower; using ::toupper; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/clocale b/libstdc++-v3/include/c_std/clocale index 36d8bd77ff5..c3763136995 100644 --- a/libstdc++-v3/include/c_std/clocale +++ b/libstdc++-v3/include/c_std/clocale @@ -49,12 +49,11 @@ #undef setlocale #undef localeconv -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::lconv; using ::setlocale; using ::localeconv; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cmath b/libstdc++-v3/include/c_std/cmath index fcdfa15b95c..13eef408402 100644 --- a/libstdc++-v3/include/c_std/cmath +++ b/libstdc++-v3/include/c_std/cmath @@ -75,7 +75,9 @@ #undef tan #undef tanh -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION inline double abs(double __x) @@ -442,7 +444,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) tanh(_Tp __x) { return __builtin_tanh(__x); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99_MATH #if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC @@ -461,7 +464,9 @@ _GLIBCXX_END_NAMESPACE #undef islessgreater #undef isunordered -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, @@ -572,7 +577,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __builtin_isunordered(__type(__f1), __type(__f2)); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */ #endif diff --git a/libstdc++-v3/include/c_std/csetjmp b/libstdc++-v3/include/c_std/csetjmp index c5a91bd0683..e2cb388403e 100644 --- a/libstdc++-v3/include/c_std/csetjmp +++ b/libstdc++-v3/include/c_std/csetjmp @@ -53,11 +53,10 @@ #define setjmp(env) setjmp (env) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::jmp_buf; using ::longjmp; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/csignal b/libstdc++-v3/include/c_std/csignal index 7cba945b597..c1cff8e3682 100644 --- a/libstdc++-v3/include/c_std/csignal +++ b/libstdc++-v3/include/c_std/csignal @@ -48,12 +48,11 @@ // Get rid of those macros defined in <signal.h> in lieu of real functions. #undef raise -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::sig_atomic_t; using ::signal; using ::raise; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cstdarg b/libstdc++-v3/include/c_std/cstdarg index b033d9eb4e7..5053e4f80be 100644 --- a/libstdc++-v3/include/c_std/cstdarg +++ b/libstdc++-v3/include/c_std/cstdarg @@ -50,10 +50,9 @@ #define va_end(ap) va_end (ap) #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::va_list; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 6f648ad10a6..510f599d876 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -88,8 +88,8 @@ #undef vprintf #undef vsprintf -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::FILE; using ::fpos_t; @@ -134,8 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::vfprintf; using ::vprintf; using ::vsprintf; - -_GLIBCXX_END_NAMESPACE +} // namespace std #if _GLIBCXX_USE_C99 @@ -145,8 +144,8 @@ _GLIBCXX_END_NAMESPACE #undef vsnprintf #undef vsscanf -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx +{ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" int (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...) @@ -169,18 +168,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::vsnprintf; using ::vsscanf; #endif +} // namespace __gnu_cxx -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cstdlib b/libstdc++-v3/include/c_std/cstdlib index 443f1e7df75..c3fe8aa4507 100644 --- a/libstdc++-v3/include/c_std/cstdlib +++ b/libstdc++-v3/include/c_std/cstdlib @@ -53,13 +53,12 @@ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ extern "C" void abort(void) throw () _GLIBCXX_NORETURN; extern "C" int atexit(void (*)()) throw (); extern "C" void exit(int) throw () _GLIBCXX_NORETURN; - -_GLIBCXX_END_NAMESPACE +} // namespace #else @@ -95,7 +94,9 @@ _GLIBCXX_END_NAMESPACE #undef wcstombs #undef wctomb -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::div_t; using ::ldiv_t; @@ -139,7 +140,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99 @@ -152,7 +154,9 @@ _GLIBCXX_END_NAMESPACE #undef strtof #undef strtold -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) +namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::lldiv_t; @@ -192,10 +196,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::strtof; using ::strtold; -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace __gnu_cxx +namespace std +{ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::__gnu_cxx::lldiv_t; #endif @@ -211,8 +216,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif // _GLIBCXX_USE_C99 diff --git a/libstdc++-v3/include/c_std/cstring b/libstdc++-v3/include/c_std/cstring index 06bf12fba9d..6dd8ab6c27f 100644 --- a/libstdc++-v3/include/c_std/cstring +++ b/libstdc++-v3/include/c_std/cstring @@ -70,7 +70,9 @@ #undef strerror #undef strlen -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::memcpy; using ::memmove; @@ -117,6 +119,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return __builtin_strstr(__s1, __s2); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #endif diff --git a/libstdc++-v3/include/c_std/ctime b/libstdc++-v3/include/c_std/ctime index 459c8fc7b60..766d0929b72 100644 --- a/libstdc++-v3/include/c_std/ctime +++ b/libstdc++-v3/include/c_std/ctime @@ -56,8 +56,8 @@ #undef localtime #undef strftime -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::clock_t; using ::time_t; using ::tm; @@ -71,7 +71,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::gmtime; using ::localtime; using ::strftime; - -_GLIBCXX_END_NAMESPACE +} // namespace #endif diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar index f6676aa0402..8480dac46a8 100644 --- a/libstdc++-v3/include/c_std/cwchar +++ b/libstdc++-v3/include/c_std/cwchar @@ -61,11 +61,10 @@ extern "C" } #endif -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::mbstate_t; - -_GLIBCXX_END_NAMESPACE +} // namespace std // Get rid of those macros defined in <wchar.h> in lieu of real functions. #undef btowc @@ -135,7 +134,9 @@ _GLIBCXX_END_NAMESPACE #if _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION using ::wint_t; @@ -226,7 +227,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } #endif -_GLIBCXX_END_NAMESPACE +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace #if _GLIBCXX_USE_C99 @@ -234,8 +236,8 @@ _GLIBCXX_END_NAMESPACE #undef wcstoll #undef wcstoull -_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) - +namespace __gnu_cxx +{ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" long double (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); @@ -253,16 +255,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) using ::wcstoll; using ::wcstoull; #endif +} // namespace __gnu_cxx -_GLIBCXX_END_NAMESPACE - -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif diff --git a/libstdc++-v3/include/c_std/cwctype b/libstdc++-v3/include/c_std/cwctype index d6750390a0a..efaa338b974 100644 --- a/libstdc++-v3/include/c_std/cwctype +++ b/libstdc++-v3/include/c_std/cwctype @@ -78,8 +78,8 @@ #if _GLIBCXX_USE_WCHAR_T -_GLIBCXX_BEGIN_NAMESPACE(std) - +namespace std +{ using ::wint_t; // cwchar using ::wctype_t; @@ -105,8 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using ::towupper; using ::wctrans; using ::wctype; - -_GLIBCXX_END_NAMESPACE +} // namespace std #endif //_GLIBCXX_USE_WCHAR_T |

