summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/Makefile.am43
-rw-r--r--libstdc++-v3/include/Makefile.in78
-rw-r--r--libstdc++-v3/include/bits/c++config35
-rw-r--r--libstdc++-v3/include/c_compatibility/assert.h14
-rw-r--r--libstdc++-v3/include/c_compatibility/complex.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/ctype.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/errno.h18
-rw-r--r--libstdc++-v3/include/c_compatibility/fenv.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/float.h18
-rw-r--r--libstdc++-v3/include/c_compatibility/inttypes.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/iso646.h18
-rw-r--r--libstdc++-v3/include/c_compatibility/limits.h18
-rw-r--r--libstdc++-v3/include/c_compatibility/locale.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/math.h21
-rw-r--r--libstdc++-v3/include/c_compatibility/setjmp.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/signal.h21
-rw-r--r--libstdc++-v3/include/c_compatibility/stdarg.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/stdbool.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/stddef.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/stdint.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/stdio.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/stdlib.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/string.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/tgmath.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/time.h20
-rw-r--r--libstdc++-v3/include/c_compatibility/wchar.h21
-rw-r--r--libstdc++-v3/include/c_compatibility/wctype.h20
-rw-r--r--libstdc++-v3/include/c_global/cassert49
-rw-r--r--libstdc++-v3/include/c_global/ccomplex46
-rw-r--r--libstdc++-v3/include/c_global/cctype90
-rw-r--r--libstdc++-v3/include/c_global/cerrno57
-rw-r--r--libstdc++-v3/include/c_global/cfenv46
-rw-r--r--libstdc++-v3/include/c_global/cfloat56
-rw-r--r--libstdc++-v3/include/c_global/cinttypes46
-rw-r--r--libstdc++-v3/include/c_global/ciso64638
-rw-r--r--libstdc++-v3/include/c_global/climits56
-rw-r--r--libstdc++-v3/include/c_global/clocale65
-rw-r--r--libstdc++-v3/include/c_global/cmath603
-rw-r--r--libstdc++-v3/include/c_global/cmath.tcc59
-rw-r--r--libstdc++-v3/include/c_global/csetjmp68
-rw-r--r--libstdc++-v3/include/c_global/csignal64
-rw-r--r--libstdc++-v3/include/c_global/cstdarg68
-rw-r--r--libstdc++-v3/include/c_global/cstdbool46
-rw-r--r--libstdc++-v3/include/c_global/cstddef60
-rw-r--r--libstdc++-v3/include/c_global/cstdint46
-rw-r--r--libstdc++-v3/include/c_global/cstdio194
-rw-r--r--libstdc++-v3/include/c_global/cstdlib231
-rw-r--r--libstdc++-v3/include/c_global/cstring130
-rw-r--r--libstdc++-v3/include/c_global/ctgmath46
-rw-r--r--libstdc++-v3/include/c_global/ctime86
-rw-r--r--libstdc++-v3/include/c_global/cwchar284
-rw-r--r--libstdc++-v3/include/c_global/cwctype116
-rw-r--r--libstdc++-v3/include/std/algorithm8
-rw-r--r--libstdc++-v3/include/std/array46
-rw-r--r--libstdc++-v3/include/std/bitset8
-rw-r--r--libstdc++-v3/include/std/c++0x_warning.h41
-rw-r--r--libstdc++-v3/include/std/complex14
-rw-r--r--libstdc++-v3/include/std/deque8
-rw-r--r--libstdc++-v3/include/std/fstream8
-rw-r--r--libstdc++-v3/include/std/functional12
-rw-r--r--libstdc++-v3/include/std/iomanip8
-rw-r--r--libstdc++-v3/include/std/ios8
-rw-r--r--libstdc++-v3/include/std/iosfwd8
-rw-r--r--libstdc++-v3/include/std/iostream8
-rw-r--r--libstdc++-v3/include/std/istream8
-rw-r--r--libstdc++-v3/include/std/iterator8
-rw-r--r--libstdc++-v3/include/std/limits8
-rw-r--r--libstdc++-v3/include/std/list8
-rw-r--r--libstdc++-v3/include/std/locale8
-rw-r--r--libstdc++-v3/include/std/map8
-rw-r--r--libstdc++-v3/include/std/memory12
-rw-r--r--libstdc++-v3/include/std/numeric8
-rw-r--r--libstdc++-v3/include/std/ostream8
-rw-r--r--libstdc++-v3/include/std/queue8
-rw-r--r--libstdc++-v3/include/std/random46
-rw-r--r--libstdc++-v3/include/std/regex46
-rw-r--r--libstdc++-v3/include/std/set8
-rw-r--r--libstdc++-v3/include/std/sstream8
-rw-r--r--libstdc++-v3/include/std/stack8
-rw-r--r--libstdc++-v3/include/std/stdexcept8
-rw-r--r--libstdc++-v3/include/std/streambuf8
-rw-r--r--libstdc++-v3/include/std/string8
-rw-r--r--libstdc++-v3/include/std/tuple46
-rw-r--r--libstdc++-v3/include/std/type_traits46
-rw-r--r--libstdc++-v3/include/std/unordered_map46
-rw-r--r--libstdc++-v3/include/std/unordered_set46
-rw-r--r--libstdc++-v3/include/std/utility14
-rw-r--r--libstdc++-v3/include/std/valarray8
-rw-r--r--libstdc++-v3/include/std/vector8
-rw-r--r--libstdc++-v3/include/tr1/array2
-rw-r--r--libstdc++-v3/include/tr1/boost_shared_ptr.h2
-rw-r--r--libstdc++-v3/include/tr1/ccomplex39
-rw-r--r--libstdc++-v3/include/tr1/cctype2
-rw-r--r--libstdc++-v3/include/tr1/cfenv2
-rw-r--r--libstdc++-v3/include/tr1/cinttypes2
-rw-r--r--libstdc++-v3/include/tr1/cmath6
-rw-r--r--libstdc++-v3/include/tr1/common.h2
-rw-r--r--libstdc++-v3/include/tr1/complex10
-rw-r--r--libstdc++-v3/include/tr1/complex.h39
-rw-r--r--libstdc++-v3/include/tr1/cstdint2
-rw-r--r--libstdc++-v3/include/tr1/cstdio2
-rw-r--r--libstdc++-v3/include/tr1/cstdlib2
-rw-r--r--libstdc++-v3/include/tr1/cwchar2
-rw-r--r--libstdc++-v3/include/tr1/cwctype2
-rw-r--r--libstdc++-v3/include/tr1/functional12
-rw-r--r--libstdc++-v3/include/tr1/functional_hash.h2
-rw-r--r--libstdc++-v3/include/tr1/functional_iterate.h8
-rw-r--r--libstdc++-v3/include/tr1/hashtable14
-rw-r--r--libstdc++-v3/include/tr1/hashtable_policy.h2
-rw-r--r--libstdc++-v3/include/tr1/math.h112
-rw-r--r--libstdc++-v3/include/tr1/memory18
-rw-r--r--libstdc++-v3/include/tr1/random2
-rw-r--r--libstdc++-v3/include/tr1/random.tcc26
-rw-r--r--libstdc++-v3/include/tr1/ref_fwd.h2
-rw-r--r--libstdc++-v3/include/tr1/regex37
-rw-r--r--libstdc++-v3/include/tr1/repeat.h42
-rw-r--r--libstdc++-v3/include/tr1/stdlib.h12
-rw-r--r--libstdc++-v3/include/tr1/tuple2
-rw-r--r--libstdc++-v3/include/tr1/tuple_iterate.h2
-rw-r--r--libstdc++-v3/include/tr1/type_traits2
-rw-r--r--libstdc++-v3/include/tr1/type_traits_fwd.h2
-rw-r--r--libstdc++-v3/include/tr1/unordered_map2
-rw-r--r--libstdc++-v3/include/tr1/unordered_set2
-rw-r--r--libstdc++-v3/include/tr1/utility4
124 files changed, 3999 insertions, 426 deletions
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 43c9f8ca3f8..0d24903ab88 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -29,7 +29,9 @@ std_srcdir = ${glibcxx_srcdir}/include/std
std_builddir = .
std_headers = \
${std_srcdir}/algorithm \
+ ${std_srcdir}/array \
${std_srcdir}/bitset \
+ ${std_srcdir}/c++0x_warning.h \
${std_srcdir}/complex \
${std_srcdir}/deque \
${std_srcdir}/fstream \
@@ -48,12 +50,18 @@ std_headers = \
${std_srcdir}/numeric \
${std_srcdir}/ostream \
${std_srcdir}/queue \
+ ${std_srcdir}/random \
+ ${std_srcdir}/regex \
${std_srcdir}/set \
${std_srcdir}/sstream \
${std_srcdir}/stack \
${std_srcdir}/stdexcept \
${std_srcdir}/streambuf \
${std_srcdir}/string \
+ ${std_srcdir}/tuple \
+ ${std_srcdir}/type_traits \
+ ${std_srcdir}/unordered_map \
+ ${std_srcdir}/unordered_set \
${std_srcdir}/utility \
${std_srcdir}/valarray \
${std_srcdir}/vector
@@ -164,7 +172,6 @@ backward_headers = \
${backward_srcdir}/strstream \
${backward_srcdir}/backward_warning.h
-
pb_srcdir = ${glibcxx_srcdir}/include/ext/pb_ds
pb_builddir = ./ext/pb_ds
@@ -528,6 +535,7 @@ tr1_headers = \
${tr1_srcdir}/bind_repeat.h \
${tr1_srcdir}/bind_iterate.h \
${tr1_srcdir}/boost_shared_ptr.h \
+ ${tr1_srcdir}/ccomplex \
${tr1_srcdir}/cctype \
${tr1_srcdir}/cfenv \
${tr1_srcdir}/cfloat \
@@ -536,6 +544,7 @@ tr1_headers = \
${tr1_srcdir}/cmath \
${tr1_srcdir}/common.h \
${tr1_srcdir}/complex \
+ ${tr1_srcdir}/complex.h \
${tr1_srcdir}/cstdarg \
${tr1_srcdir}/cstdbool \
${tr1_srcdir}/cstdint \
@@ -562,6 +571,7 @@ tr1_headers = \
${tr1_srcdir}/random.tcc \
${tr1_srcdir}/ref_fwd.h \
${tr1_srcdir}/ref_wrap_iterate.h \
+ ${tr1_srcdir}/regex \
${tr1_srcdir}/repeat.h \
${tr1_srcdir}/stdarg.h \
${tr1_srcdir}/stdbool.h \
@@ -581,14 +591,17 @@ tr1_headers = \
${tr1_srcdir}/wctype.h
-# This is the common subset of files that all three "C" header models use.
+# This is the common subset of C++ files that all three "C" header models use.
c_base_srcdir = $(C_INCLUDE_DIR)
c_base_builddir = .
c_base_headers = \
${c_base_srcdir}/cassert \
+ ${c_base_srcdir}/ccomplex \
${c_base_srcdir}/cctype \
${c_base_srcdir}/cerrno \
+ ${c_base_srcdir}/cfenv \
${c_base_srcdir}/cfloat \
+ ${c_base_srcdir}/cinttypes \
${c_base_srcdir}/ciso646 \
${c_base_srcdir}/climits \
${c_base_srcdir}/clocale \
@@ -596,10 +609,13 @@ c_base_headers = \
${c_base_srcdir}/csetjmp \
${c_base_srcdir}/csignal \
${c_base_srcdir}/cstdarg \
+ ${c_base_srcdir}/cstdbool \
${c_base_srcdir}/cstddef \
+ ${c_base_srcdir}/cstdint \
${c_base_srcdir}/cstdio \
${c_base_srcdir}/cstdlib \
${c_base_srcdir}/cstring \
+ ${c_base_srcdir}/ctgmath \
${c_base_srcdir}/ctime \
${c_base_srcdir}/cwchar \
${c_base_srcdir}/cwctype
@@ -607,11 +623,26 @@ c_base_headers = \
# "C" compatibility headers.
c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility
c_compatibility_builddir = .
+
+if GLIBCXX_C_HEADERS_C_STD
+c_compatibility_headers =
+endif
+
+if GLIBCXX_C_HEADERS_C_GLOBAL
+c_compatibility_headers = \
+ ${c_compatibility_srcdir}/complex.h \
+ ${c_compatibility_srcdir}/tgmath.h
+endif
+
+if GLIBCXX_C_HEADERS_C
c_compatibility_headers = \
${c_compatibility_srcdir}/assert.h \
+ ${c_compatibility_srcdir}/complex.h \
${c_compatibility_srcdir}/ctype.h \
${c_compatibility_srcdir}/errno.h \
+ ${c_compatibility_srcdir}/fenv.h \
${c_compatibility_srcdir}/float.h \
+ ${c_compatibility_srcdir}/inttypes.h \
${c_compatibility_srcdir}/iso646.h \
${c_compatibility_srcdir}/limits.h \
${c_compatibility_srcdir}/locale.h \
@@ -619,13 +650,17 @@ c_compatibility_headers = \
${c_compatibility_srcdir}/setjmp.h \
${c_compatibility_srcdir}/signal.h \
${c_compatibility_srcdir}/stdarg.h \
+ ${c_compatibility_srcdir}/stdbool.h \
${c_compatibility_srcdir}/stddef.h \
+ ${c_compatibility_srcdir}/stdint.h \
${c_compatibility_srcdir}/stdio.h \
${c_compatibility_srcdir}/stdlib.h \
${c_compatibility_srcdir}/string.h \
+ ${c_compatibility_srcdir}/tgmath.h \
${c_compatibility_srcdir}/time.h \
${c_compatibility_srcdir}/wchar.h \
${c_compatibility_srcdir}/wctype.h
+endif
# Debug mode headers
debug_srcdir = ${glibcxx_srcdir}/include/debug
@@ -660,7 +695,7 @@ debug_headers = \
# Some of the different "C" header models need extra files.
# Some "C" header schemes require the "C" compatibility headers.
# For --enable-cheaders=c_std
-if GLIBCXX_C_HEADERS_C_STD
+if GLIBCXX_C_HEADERS_EXTRA
c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
else
c_base_headers_extra =
@@ -962,7 +997,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
-e '/[ ]_GLIBCXX_LONG_DOUBLE_COMPAT[ ]/d' \
< ${CONFIG_HEADER} >> $@ ;\
echo "" >> $@ ;\
- echo "#endif // _CXXCONFIG_" >> $@
+ echo "#endif // _GLIBCXX_CXX_CONFIG_H" >> $@
# Host includes for threads
uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 17e949b9166..fb3ca7dada6 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -124,9 +124,13 @@ GLIBCXX_BUILD_PCH_TRUE = @GLIBCXX_BUILD_PCH_TRUE@
GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE = @GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@
GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE = @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@
GLIBCXX_C_HEADERS_C_FALSE = @GLIBCXX_C_HEADERS_C_FALSE@
+GLIBCXX_C_HEADERS_C_GLOBAL_FALSE = @GLIBCXX_C_HEADERS_C_GLOBAL_FALSE@
+GLIBCXX_C_HEADERS_C_GLOBAL_TRUE = @GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@
GLIBCXX_C_HEADERS_C_STD_FALSE = @GLIBCXX_C_HEADERS_C_STD_FALSE@
GLIBCXX_C_HEADERS_C_STD_TRUE = @GLIBCXX_C_HEADERS_C_STD_TRUE@
GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HEADERS_C_TRUE@
+GLIBCXX_C_HEADERS_EXTRA_FALSE = @GLIBCXX_C_HEADERS_EXTRA_FALSE@
+GLIBCXX_C_HEADERS_EXTRA_TRUE = @GLIBCXX_C_HEADERS_EXTRA_TRUE@
GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
@@ -259,7 +263,9 @@ std_srcdir = ${glibcxx_srcdir}/include/std
std_builddir = .
std_headers = \
${std_srcdir}/algorithm \
+ ${std_srcdir}/array \
${std_srcdir}/bitset \
+ ${std_srcdir}/c++0x_warning.h \
${std_srcdir}/complex \
${std_srcdir}/deque \
${std_srcdir}/fstream \
@@ -278,12 +284,18 @@ std_headers = \
${std_srcdir}/numeric \
${std_srcdir}/ostream \
${std_srcdir}/queue \
+ ${std_srcdir}/random \
+ ${std_srcdir}/regex \
${std_srcdir}/set \
${std_srcdir}/sstream \
${std_srcdir}/stack \
${std_srcdir}/stdexcept \
${std_srcdir}/streambuf \
${std_srcdir}/string \
+ ${std_srcdir}/tuple \
+ ${std_srcdir}/type_traits \
+ ${std_srcdir}/unordered_map \
+ ${std_srcdir}/unordered_set \
${std_srcdir}/utility \
${std_srcdir}/valarray \
${std_srcdir}/vector
@@ -753,6 +765,7 @@ tr1_headers = \
${tr1_srcdir}/bind_repeat.h \
${tr1_srcdir}/bind_iterate.h \
${tr1_srcdir}/boost_shared_ptr.h \
+ ${tr1_srcdir}/ccomplex \
${tr1_srcdir}/cctype \
${tr1_srcdir}/cfenv \
${tr1_srcdir}/cfloat \
@@ -761,6 +774,7 @@ tr1_headers = \
${tr1_srcdir}/cmath \
${tr1_srcdir}/common.h \
${tr1_srcdir}/complex \
+ ${tr1_srcdir}/complex.h \
${tr1_srcdir}/cstdarg \
${tr1_srcdir}/cstdbool \
${tr1_srcdir}/cstdint \
@@ -787,6 +801,7 @@ tr1_headers = \
${tr1_srcdir}/random.tcc \
${tr1_srcdir}/ref_fwd.h \
${tr1_srcdir}/ref_wrap_iterate.h \
+ ${tr1_srcdir}/regex \
${tr1_srcdir}/repeat.h \
${tr1_srcdir}/stdarg.h \
${tr1_srcdir}/stdbool.h \
@@ -806,14 +821,17 @@ tr1_headers = \
${tr1_srcdir}/wctype.h
-# This is the common subset of files that all three "C" header models use.
+# This is the common subset of C++ files that all three "C" header models use.
c_base_srcdir = $(C_INCLUDE_DIR)
c_base_builddir = .
c_base_headers = \
${c_base_srcdir}/cassert \
+ ${c_base_srcdir}/ccomplex \
${c_base_srcdir}/cctype \
${c_base_srcdir}/cerrno \
+ ${c_base_srcdir}/cfenv \
${c_base_srcdir}/cfloat \
+ ${c_base_srcdir}/cinttypes \
${c_base_srcdir}/ciso646 \
${c_base_srcdir}/climits \
${c_base_srcdir}/clocale \
@@ -821,10 +839,13 @@ c_base_headers = \
${c_base_srcdir}/csetjmp \
${c_base_srcdir}/csignal \
${c_base_srcdir}/cstdarg \
+ ${c_base_srcdir}/cstdbool \
${c_base_srcdir}/cstddef \
+ ${c_base_srcdir}/cstdint \
${c_base_srcdir}/cstdio \
${c_base_srcdir}/cstdlib \
${c_base_srcdir}/cstring \
+ ${c_base_srcdir}/ctgmath \
${c_base_srcdir}/ctime \
${c_base_srcdir}/cwchar \
${c_base_srcdir}/cwctype
@@ -833,25 +854,36 @@ c_base_headers = \
# "C" compatibility headers.
c_compatibility_srcdir = ${glibcxx_srcdir}/include/c_compatibility
c_compatibility_builddir = .
-c_compatibility_headers = \
- ${c_compatibility_srcdir}/assert.h \
- ${c_compatibility_srcdir}/ctype.h \
- ${c_compatibility_srcdir}/errno.h \
- ${c_compatibility_srcdir}/float.h \
- ${c_compatibility_srcdir}/iso646.h \
- ${c_compatibility_srcdir}/limits.h \
- ${c_compatibility_srcdir}/locale.h \
- ${c_compatibility_srcdir}/math.h \
- ${c_compatibility_srcdir}/setjmp.h \
- ${c_compatibility_srcdir}/signal.h \
- ${c_compatibility_srcdir}/stdarg.h \
- ${c_compatibility_srcdir}/stddef.h \
- ${c_compatibility_srcdir}/stdio.h \
- ${c_compatibility_srcdir}/stdlib.h \
- ${c_compatibility_srcdir}/string.h \
- ${c_compatibility_srcdir}/time.h \
- ${c_compatibility_srcdir}/wchar.h \
- ${c_compatibility_srcdir}/wctype.h
+@GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@c_compatibility_headers = \
+@GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@ ${c_compatibility_srcdir}/complex.h \
+@GLIBCXX_C_HEADERS_C_GLOBAL_TRUE@ ${c_compatibility_srcdir}/tgmath.h
+
+@GLIBCXX_C_HEADERS_C_STD_TRUE@c_compatibility_headers =
+@GLIBCXX_C_HEADERS_C_TRUE@c_compatibility_headers = \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/assert.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/complex.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/ctype.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/errno.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/fenv.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/float.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/inttypes.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/iso646.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/limits.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/locale.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/math.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/setjmp.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/signal.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/stdarg.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/stdbool.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/stddef.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/stdint.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/stdio.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/stdlib.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/string.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/tgmath.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/time.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/wchar.h \
+@GLIBCXX_C_HEADERS_C_TRUE@ ${c_compatibility_srcdir}/wctype.h
# Debug mode headers
@@ -884,12 +916,12 @@ debug_headers = \
${debug_srcdir}/string \
${debug_srcdir}/vector
-@GLIBCXX_C_HEADERS_C_STD_FALSE@c_base_headers_extra =
+@GLIBCXX_C_HEADERS_EXTRA_FALSE@c_base_headers_extra =
# Some of the different "C" header models need extra files.
# Some "C" header schemes require the "C" compatibility headers.
# For --enable-cheaders=c_std
-@GLIBCXX_C_HEADERS_C_STD_TRUE@c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
+@GLIBCXX_C_HEADERS_EXTRA_TRUE@c_base_headers_extra = ${c_base_srcdir}/cmath.tcc
@GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra =
@GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = ${c_compatibility_headers}
host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
@@ -1342,7 +1374,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
-e '/[ ]_GLIBCXX_LONG_DOUBLE_COMPAT[ ]/d' \
< ${CONFIG_HEADER} >> $@ ;\
echo "" >> $@ ;\
- echo "#endif // _CXXCONFIG_" >> $@
+ echo "#endif // _GLIBCXX_CXX_CONFIG_H" >> $@
${host_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${host_alias}
sed -e '/^#pragma/b' \
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 8e6084e9e10..b11d27a1640 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -45,20 +45,36 @@
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCXX__
+// Macro used to indicate that the native "C" includes, when compiled
+// as "C++", have declarations in namespace std and not the global
+// namespace. Note, this is unrelated to possible "C" compatibility
+// includes that inject C90/C99 names into the global namespace.
+// XXX May not be necessary
+#if __cplusplus == 199711L
+# define _GLIBCXX_NAMESPACE_C 1
+#endif
+
// Macros for visibility.
#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
-#define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
+# define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
#else
-#define _GLIBCXX_VISIBILITY(V)
+# define _GLIBCXX_VISIBILITY(V)
#endif
// Macros for controlling various namespace association schemes and modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+// _GLIBCXX_NAMESPACE_ASSOCIATION_CXX200x
#ifdef _GLIBCXX_DEBUG
# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
#endif
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_CXX0X 1
+#endif
+
#define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
// Macros for namespace scope.
@@ -91,7 +107,6 @@ namespace std
using namespace _6 __attribute__ ((strong));
}
-// In addition, other supported namespace configurations.
namespace __gnu_cxx
{
namespace _6 { }
@@ -140,7 +155,19 @@ namespace __gnu_cxx
#endif
#endif
-/* Define if compatibility should be provided for -mlong-double-64. */
+// Namespace associations for C++0x, TR1 in std.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_CXX0X
+namespace std
+{
+ namespace __cxx200x { }
+ using namespace __cxx200x __attribute__ ((strong));
+}
+# define _GLIBCXX_TR1 __cxx200x
+#else
+# define _GLIBCXX_TR1 tr1
+#endif
+
+// Define if compatibility should be provided for -mlong-double-64.
#undef _GLIBCXX_LONG_DOUBLE_COMPAT
// XXX GLIBCXX_ABI Deprecated
diff --git a/libstdc++-v3/include/c_compatibility/assert.h b/libstdc++-v3/include/c_compatibility/assert.h
index fc14c0f4bcd..7a0241505cf 100644
--- a/libstdc++-v3/include/c_compatibility/assert.h
+++ b/libstdc++-v3/include/c_compatibility/assert.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,4 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
+/** @file assert.h
+ * This is a Standard C++ Library header.
+ */
+
#include <cassert>
diff --git a/libstdc++-v3/include/c_compatibility/complex.h b/libstdc++-v3/include/c_compatibility/complex.h
new file mode 100644
index 00000000000..88acb1eebee
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/complex.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file complex.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <ccomplex>
+
+#ifndef _GLIBCXX_COMPLEX_H
+#define _GLIBCXX_COMPLEX_H 1
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/ctype.h b/libstdc++-v3/include/c_compatibility/ctype.h
index 1bd379dee4d..696621bec8e 100644
--- a/libstdc++-v3/include/c_compatibility/ctype.h
+++ b/libstdc++-v3/include/c_compatibility/ctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_CTYPE_H
-#define _GLIBCXX_CTYPE_H 1
+/** @file ctype.h
+ * This is a Standard C++ Library header.
+ */
#include <cctype>
+#ifndef _GLIBCXX_CTYPE_H
+#define _GLIBCXX_CTYPE_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::isalnum;
using std::isalpha;
using std::iscntrl;
@@ -45,5 +50,6 @@ using std::isupper;
using std::isxdigit;
using std::tolower;
using std::toupper;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/errno.h b/libstdc++-v3/include/c_compatibility/errno.h
index d7cc829452b..6d48a3f2686 100644
--- a/libstdc++-v3/include/c_compatibility/errno.h
+++ b/libstdc++-v3/include/c_compatibility/errno.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,9 +27,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_ERRNO_H
-#define _GLIBCXX_ERRNO_H 1
+/** @file errno.h
+ * This is a Standard C++ Library header.
+ */
#include <cerrno>
+#ifndef _GLIBCXX_ERRNO_H
+#define _GLIBCXX_ERRNO_H 1
+
#endif
diff --git a/libstdc++-v3/include/c_compatibility/fenv.h b/libstdc++-v3/include/c_compatibility/fenv.h
new file mode 100644
index 00000000000..c3eb4b4abce
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/fenv.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file fenv.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <cfenv>
+
+#ifndef _GLIBCXX_FENV_H
+#define _GLIBCXX_FENV_H 1
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/float.h b/libstdc++-v3/include/c_compatibility/float.h
index adeb73fef83..f2ec19a52fb 100644
--- a/libstdc++-v3/include/c_compatibility/float.h
+++ b/libstdc++-v3/include/c_compatibility/float.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,9 +27,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_FLOAT_H
-#define _GLIBCXX_FLOAT_H 1
+/** @file float.h
+ * This is a Standard C++ Library header.
+ */
#include <cfloat>
+#ifndef _GLIBCXX_FLOAT_H
+#define _GLIBCXX_FLOAT_H 1
+
#endif
diff --git a/libstdc++-v3/include/c_compatibility/inttypes.h b/libstdc++-v3/include/c_compatibility/inttypes.h
new file mode 100644
index 00000000000..d6eebdf6606
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/inttypes.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file inttypes.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <cinttypes>
+
+#ifndef _GLIBCXX_INTTYPES_H
+#define _GLIBCXX_INTTYPES_H 1
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/iso646.h b/libstdc++-v3/include/c_compatibility/iso646.h
index d5097ca7251..eb379c24329 100644
--- a/libstdc++-v3/include/c_compatibility/iso646.h
+++ b/libstdc++-v3/include/c_compatibility/iso646.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,9 +27,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_ISO646_H
-#define _GLIBCXX_ISO646_H 1
+/** @file iso646.h
+ * This is a Standard C++ Library header.
+ */
#include <ciso646>
+#ifndef _GLIBCXX_ISO646_H
+#define _GLIBCXX_ISO646_H 1
+
#endif
diff --git a/libstdc++-v3/include/c_compatibility/limits.h b/libstdc++-v3/include/c_compatibility/limits.h
index e7abd017fbf..6a20e592ebb 100644
--- a/libstdc++-v3/include/c_compatibility/limits.h
+++ b/libstdc++-v3/include/c_compatibility/limits.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,9 +27,13 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_LIMITS_H
-#define _GLIBCXX_LIMITS_H 1
+/** @file limits.h
+ * This is a Standard C++ Library header.
+ */
#include <climits>
+#ifndef _GLIBCXX_LIMITS_H
+#define _GLIBCXX_LIMITS_H 1
+
#endif
diff --git a/libstdc++-v3/include/c_compatibility/locale.h b/libstdc++-v3/include/c_compatibility/locale.h
index 8baf041e20f..e444460a806 100644
--- a/libstdc++-v3/include/c_compatibility/locale.h
+++ b/libstdc++-v3/include/c_compatibility/locale.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,13 +27,19 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_LOCALE_H
-#define _GLIBCXX_LOCALE_H 1
+/** @file locale.h
+ * This is a Standard C++ Library header.
+ */
#include <clocale>
+#ifndef _GLIBCXX_LOCALE_H
+#define _GLIBCXX_LOCALE_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::lconv;
using std::setlocale;
using std::localeconv;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/math.h b/libstdc++-v3/include/c_compatibility/math.h
index 38636e60c1b..69dc82ac514 100644
--- a/libstdc++-v3/include/c_compatibility/math.h
+++ b/libstdc++-v3/include/c_compatibility/math.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_MATH_H
-#define _GLIBCXX_MATH_H 1
+/** @file math.h
+ * This is a Standard C++ Library header.
+ */
#include <cmath>
+#ifndef _GLIBCXX_MATH_H
+#define _GLIBCXX_MATH_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::abs;
using std::acos;
using std::asin;
@@ -71,4 +76,6 @@ using std::islessgreater;
using std::isunordered;
#endif
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
#endif
diff --git a/libstdc++-v3/include/c_compatibility/setjmp.h b/libstdc++-v3/include/c_compatibility/setjmp.h
index f2d481ae17d..c9941325298 100644
--- a/libstdc++-v3/include/c_compatibility/setjmp.h
+++ b/libstdc++-v3/include/c_compatibility/setjmp.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,12 +27,18 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_SETJMP_H
-#define _GLIBCXX_SETJMP_H 1
+/** @file setjmp.h
+ * This is a Standard C++ Library header.
+ */
#include <csetjmp>
+#ifndef _GLIBCXX_SETJMP_H
+#define _GLIBCXX_SETJMP_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::jmp_buf;
using std::longjmp;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/signal.h b/libstdc++-v3/include/c_compatibility/signal.h
index ae1d23d56af..4e081335b4e 100644
--- a/libstdc++-v3/include/c_compatibility/signal.h
+++ b/libstdc++-v3/include/c_compatibility/signal.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,14 +27,19 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_SIGNAL_H
-#define _GLIBCXX_SIGNAL_H 1
+/** @file signal.h
+ * This is a Standard C++ Library header.
+ */
#include <csignal>
-using std::sig_atomic_t;
+#ifndef _GLIBCXX_SIGNAL_H
+#define _GLIBCXX_SIGNAL_H 1
+#ifdef _GLIBCXX_NAMESPACE_C
+using std::sig_atomic_t;
using std::raise;
using std::signal;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdarg.h b/libstdc++-v3/include/c_compatibility/stdarg.h
index 9b92a93f9c2..2a1df4983fc 100644
--- a/libstdc++-v3/include/c_compatibility/stdarg.h
+++ b/libstdc++-v3/include/c_compatibility/stdarg.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,17 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_STDARG_H
-#define _GLIBCXX_STDARG_H 1
+/** @file stdarg.h
+ * This is a Standard C++ Library header.
+ */
#include <cstdarg>
+#ifndef _GLIBCXX_STDARG_H
+#define _GLIBCXX_STDARG_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::va_list;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdbool.h b/libstdc++-v3/include/c_compatibility/stdbool.h
new file mode 100644
index 00000000000..a825d4fd365
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/stdbool.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file stdbool.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <cstdbool>
+
+#ifndef _GLIBCXX_STDBOOL_H
+#define _GLIBCXX_STDBOOL_H 1
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/stddef.h b/libstdc++-v3/include/c_compatibility/stddef.h
index 457cd0062d2..a6efd4048cf 100644
--- a/libstdc++-v3/include/c_compatibility/stddef.h
+++ b/libstdc++-v3/include/c_compatibility/stddef.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,12 +27,18 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_STDDEF_H
-#define _GLIBCXX_STDDEF_H 1
+/** @file stddef.h
+ * This is a Standard C++ Library header.
+ */
#include <cstddef>
+#ifndef _GLIBCXX_STDDEF_H
+#define _GLIBCXX_STDDEF_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::size_t;
using std::ptrdiff_t;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdint.h b/libstdc++-v3/include/c_compatibility/stdint.h
new file mode 100644
index 00000000000..359986f8ade
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/stdint.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file stdint.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <cstdint>
+
+#ifndef _GLIBCXX_STDINT_H
+#define _GLIBCXX_STDINT_H 1
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdio.h b/libstdc++-v3/include/c_compatibility/stdio.h
index 270852f5329..ac64d62f3b4 100644
--- a/libstdc++-v3/include/c_compatibility/stdio.h
+++ b/libstdc++-v3/include/c_compatibility/stdio.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_STDIO_H
-#define _GLIBCXX_STDIO_H 1
+/** @file stdio.h
+ * This is a Standard C++ Library header.
+ */
#include <cstdio>
+#ifndef _GLIBCXX_STDIO_H
+#define _GLIBCXX_STDIO_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::FILE;
using std::fpos_t;
@@ -81,5 +86,6 @@ using std::clearerr;
using std::feof;
using std::ferror;
using std::perror;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdlib.h b/libstdc++-v3/include/c_compatibility/stdlib.h
index dbf99b4a58f..f6eb56ba073 100644
--- a/libstdc++-v3/include/c_compatibility/stdlib.h
+++ b/libstdc++-v3/include/c_compatibility/stdlib.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_STDLIB_H
-#define _GLIBCXX_STDLIB_H 1
+/** @file stdlib.h
+ * This is a Standard C++ Library header.
+ */
#include <cstdlib>
+#ifndef _GLIBCXX_STDLIB_H
+#define _GLIBCXX_STDLIB_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::div_t;
using std::ldiv_t;
@@ -63,5 +68,6 @@ using std::strtoul;
using std::system;
using std::wcstombs;
using std::wctomb;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/string.h b/libstdc++-v3/include/c_compatibility/string.h
index 09e59cfef2c..d60b787e206 100644
--- a/libstdc++-v3/include/c_compatibility/string.h
+++ b/libstdc++-v3/include/c_compatibility/string.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_STRING_H
-#define _GLIBCXX_STRING_H 1
+/** @file string.h
+ * This is a Standard C++ Library header.
+ */
#include <cstring>
+#ifndef _GLIBCXX_STRING_H
+#define _GLIBCXX_STRING_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::memcpy;
using std::memmove;
using std::strcpy;
@@ -54,5 +59,6 @@ using std::strtok;
using std::memset;
using std::strerror;
using std::strlen;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/tgmath.h b/libstdc++-v3/include/c_compatibility/tgmath.h
new file mode 100644
index 00000000000..b2ce8b54328
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/tgmath.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file tgmath.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <ctgmath>
+
+#ifndef _GLIBCXX_TGMATH_H
+#define _GLIBCXX_TGMATH_H 1
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/time.h b/libstdc++-v3/include/c_compatibility/time.h
index d5684adf2d9..0c08945025f 100644
--- a/libstdc++-v3/include/c_compatibility/time.h
+++ b/libstdc++-v3/include/c_compatibility/time.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_TIME_H
-#define _GLIBCXX_TIME_H 1
+/** @file time.h
+ * This is a Standard C++ Library header.
+ */
#include <ctime>
+#ifndef _GLIBCXX_TIME_H
+#define _GLIBCXX_TIME_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
// Get rid of those macros defined in <time.h> in lieu of real functions.
#undef clock
#undef difftime
@@ -56,5 +61,6 @@ using std::ctime;
using std::gmtime;
using std::localtime;
using std::strftime;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
index 2071ae436de..09460d64e31 100644
--- a/libstdc++-v3/include/c_compatibility/wchar.h
+++ b/libstdc++-v3/include/c_compatibility/wchar.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2003, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_WCHAR_H
-#define _GLIBCXX_WCHAR_H 1
+/** @file wchar.h
+ * This is a Standard C++ Library header.
+ */
#include <cwchar>
+#ifndef _GLIBCXX_WCHAR_H
+#define _GLIBCXX_WCHAR_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::mbstate_t;
#if _GLIBCXX_USE_WCHAR_T
@@ -111,4 +116,6 @@ using std::wcstoull;
#endif //_GLIBCXX_USE_WCHAR_T
+#endif
+
#endif
diff --git a/libstdc++-v3/include/c_compatibility/wctype.h b/libstdc++-v3/include/c_compatibility/wctype.h
index c7ddc903ab9..d50f6ece658 100644
--- a/libstdc++-v3/include/c_compatibility/wctype.h
+++ b/libstdc++-v3/include/c_compatibility/wctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- compatibility header.
-// Copyright (C) 2002 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2007 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -27,11 +27,16 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCXX_CWCTYPE_H
-#define _GLIBCXX_CWCTYPE_H 1
+/** @file wctype.h
+ * This is a Standard C++ Library header.
+ */
#include <cwctype>
+#ifndef _GLIBCXX_CWCTYPE_H
+#define _GLIBCXX_CWCTYPE_H 1
+
+#ifdef _GLIBCXX_NAMESPACE_C
using std::wctype_t;
using std::wctrans_t;
using std::iswalpha;
@@ -51,5 +56,6 @@ using std::towlower;
using std::towupper;
using std::wctrans;
using std::wctype;
+#endif
#endif
diff --git a/libstdc++-v3/include/c_global/cassert b/libstdc++-v3/include/c_global/cassert
new file mode 100644
index 00000000000..6322b4fb360
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cassert
@@ -0,0 +1,49 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file cassert
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c assert.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 19.2 Assertions
+//
+
+// No include guards on this header...
+
+#pragma GCC system_header
+
+#include_next <assert.h>
diff --git a/libstdc++-v3/include/c_global/ccomplex b/libstdc++-v3/include/c_global/ccomplex
new file mode 100644
index 00000000000..1d080388f43
--- /dev/null
+++ b/libstdc++-v3/include/c_global/ccomplex
@@ -0,0 +1,46 @@
+// <ccomplex> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file include/ccomplex
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CCOMPLEX
+#define _GLIBCXX_CCOMPLEX 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/ccomplex>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/c_global/cctype b/libstdc++-v3/include/c_global/cctype
new file mode 100644
index 00000000000..05436e4c1d9
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cctype
@@ -0,0 +1,90 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file include/cctype
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c ctype.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: <ccytpe>
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include_next <ctype.h>
+
+#ifndef _GLIBCXX_CCTYPE
+#define _GLIBCXX_CCTYPE 1
+
+// Get rid of those macros defined in <ctype.h> in lieu of real functions.
+#undef isalnum
+#undef isalpha
+#undef iscntrl
+#undef isdigit
+#undef isgraph
+#undef islower
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef tolower
+#undef toupper
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::isalnum;
+ using ::isalpha;
+ using ::iscntrl;
+ using ::isdigit;
+ using ::isgraph;
+ using ::islower;
+ using ::isprint;
+ using ::ispunct;
+ using ::isspace;
+ using ::isupper;
+ using ::isxdigit;
+ using ::tolower;
+ using ::toupper;
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cctype>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cerrno b/libstdc++-v3/include/c_global/cerrno
new file mode 100644
index 00000000000..b7673668aaf
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cerrno
@@ -0,0 +1,57 @@
+// The -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file cerrno
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c errno.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 19.3 Error numbers
+//
+
+#pragma GCC system_header
+
+#include_next <errno.h>
+
+#ifndef _GLIBCXX_CERRNO
+#define _GLIBCXX_CERRNO 1
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef errno
+#define errno errno
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cfenv b/libstdc++-v3/include/c_global/cfenv
new file mode 100644
index 00000000000..f11c531b2d7
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cfenv
@@ -0,0 +1,46 @@
+// <cfenv> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cfenv
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CFENV
+#define _GLIBCXX_CFENV 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cfenv>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/c_global/cfloat b/libstdc++-v3/include/c_global/cfloat
new file mode 100644
index 00000000000..9d8c039587a
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cfloat
@@ -0,0 +1,56 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cfloat
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c float.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#pragma GCC system_header
+
+#include_next <float.h>
+
+#ifndef _GLIBCXX_CFLOAT
+#define _GLIBCXX_CFLOAT 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cfloat>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cinttypes b/libstdc++-v3/include/c_global/cinttypes
new file mode 100644
index 00000000000..d42c7a3f9e4
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cinttypes
@@ -0,0 +1,46 @@
+// <cinttypes> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cinttypes
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CINTTYPES
+#define _GLIBCXX_CINTTYPES 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cinttypes>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/c_global/ciso646 b/libstdc++-v3/include/c_global/ciso646
new file mode 100644
index 00000000000..414a706abbe
--- /dev/null
+++ b/libstdc++-v3/include/c_global/ciso646
@@ -0,0 +1,38 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file ciso646
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c iso646.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
diff --git a/libstdc++-v3/include/c_global/climits b/libstdc++-v3/include/c_global/climits
new file mode 100644
index 00000000000..396bbcbd49b
--- /dev/null
+++ b/libstdc++-v3/include/c_global/climits
@@ -0,0 +1,56 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/climits
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c limits.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#pragma GCC system_header
+
+#include_next <limits.h>
+
+#ifndef _GLIBCXX_CLIMITS
+#define _GLIBCXX_CLIMITS 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/climits>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/clocale b/libstdc++-v3/include/c_global/clocale
new file mode 100644
index 00000000000..7feac30975e
--- /dev/null
+++ b/libstdc++-v3/include/c_global/clocale
@@ -0,0 +1,65 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file clocale
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c locale.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include_next <locale.h>
+
+#ifndef _GLIBCXX_CLOCALE
+#define _GLIBCXX_CLOCALE 1
+
+// Get rid of those macros defined in <locale.h> in lieu of real functions.
+#undef setlocale
+#undef localeconv
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::lconv;
+ using ::setlocale;
+ using ::localeconv;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cmath b/libstdc++-v3/include/c_global/cmath
new file mode 100644
index 00000000000..ab21c9acc06
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cmath
@@ -0,0 +1,603 @@
+// -*- C++ -*- C forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cmath
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c math.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 26.5 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include_next <math.h>
+
+#ifndef _GLIBCXX_CMATH
+#define _GLIBCXX_CMATH 1
+
+// Get rid of those macros defined in <math.h> in lieu of real functions.
+#undef abs
+#undef div
+#undef acos
+#undef asin
+#undef atan
+#undef atan2
+#undef ceil
+#undef cos
+#undef cosh
+#undef exp
+#undef fabs
+#undef floor
+#undef fmod
+#undef frexp
+#undef ldexp
+#undef log
+#undef log10
+#undef modf
+#undef pow
+#undef sin
+#undef sinh
+#undef sqrt
+#undef tan
+#undef tanh
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Forward declaration of a helper function. This really should be
+ // an `exported' forward declaration.
+ template<typename _Tp> _Tp __cmath_power(_Tp, unsigned int);
+
+ inline double
+ abs(double __x)
+ { return __builtin_fabs(__x); }
+
+ inline float
+ abs(float __x)
+ { return __builtin_fabsf(__x); }
+
+ inline long double
+ abs(long double __x)
+ { return __builtin_fabsl(__x); }
+
+ using ::acos;
+
+ inline float
+ acos(float __x)
+ { return __builtin_acosf(__x); }
+
+ inline long double
+ acos(long double __x)
+ { return __builtin_acosl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ acos(_Tp __x)
+ { return __builtin_acos(__x); }
+
+ using ::asin;
+
+ inline float
+ asin(float __x)
+ { return __builtin_asinf(__x); }
+
+ inline long double
+ asin(long double __x)
+ { return __builtin_asinl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ asin(_Tp __x)
+ { return __builtin_asin(__x); }
+
+ using ::atan;
+
+ inline float
+ atan(float __x)
+ { return __builtin_atanf(__x); }
+
+ inline long double
+ atan(long double __x)
+ { return __builtin_atanl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ atan(_Tp __x)
+ { return __builtin_atan(__x); }
+
+ using ::atan2;
+
+ inline float
+ atan2(float __y, float __x)
+ { return __builtin_atan2f(__y, __x); }
+
+ inline long double
+ atan2(long double __y, long double __x)
+ { return __builtin_atan2l(__y, __x); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value
+ && __is_integer<_Up>::__value,
+ double>::__type
+ atan2(_Tp __y, _Up __x)
+ { return __builtin_atan2(__y, __x); }
+
+ using ::ceil;
+
+ inline float
+ ceil(float __x)
+ { return __builtin_ceilf(__x); }
+
+ inline long double
+ ceil(long double __x)
+ { return __builtin_ceill(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ ceil(_Tp __x)
+ { return __builtin_ceil(__x); }
+
+ using ::cos;
+
+ inline float
+ cos(float __x)
+ { return __builtin_cosf(__x); }
+
+ inline long double
+ cos(long double __x)
+ { return __builtin_cosl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ cos(_Tp __x)
+ { return __builtin_cos(__x); }
+
+ using ::cosh;
+
+ inline float
+ cosh(float __x)
+ { return __builtin_coshf(__x); }
+
+ inline long double
+ cosh(long double __x)
+ { return __builtin_coshl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ cosh(_Tp __x)
+ { return __builtin_cosh(__x); }
+
+ using ::exp;
+
+ inline float
+ exp(float __x)
+ { return __builtin_expf(__x); }
+
+ inline long double
+ exp(long double __x)
+ { return __builtin_expl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ exp(_Tp __x)
+ { return __builtin_exp(__x); }
+
+ using ::fabs;
+
+ inline float
+ fabs(float __x)
+ { return __builtin_fabsf(__x); }
+
+ inline long double
+ fabs(long double __x)
+ { return __builtin_fabsl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ fabs(_Tp __x)
+ { return __builtin_fabs(__x); }
+
+ using ::floor;
+
+ inline float
+ floor(float __x)
+ { return __builtin_floorf(__x); }
+
+ inline long double
+ floor(long double __x)
+ { return __builtin_floorl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ floor(_Tp __x)
+ { return __builtin_floor(__x); }
+
+ using ::fmod;
+
+ inline float
+ fmod(float __x, float __y)
+ { return __builtin_fmodf(__x, __y); }
+
+ inline long double
+ fmod(long double __x, long double __y)
+ { return __builtin_fmodl(__x, __y); }
+
+ using ::frexp;
+
+ inline float
+ frexp(float __x, int* __exp)
+ { return __builtin_frexpf(__x, __exp); }
+
+ inline long double
+ frexp(long double __x, int* __exp)
+ { return __builtin_frexpl(__x, __exp); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ frexp(_Tp __x, int* __exp)
+ { return __builtin_frexp(__x, __exp); }
+
+ using ::ldexp;
+
+ inline float
+ ldexp(float __x, int __exp)
+ { return __builtin_ldexpf(__x, __exp); }
+
+ inline long double
+ ldexp(long double __x, int __exp)
+ { return __builtin_ldexpl(__x, __exp); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ ldexp(_Tp __x, int __exp)
+ { return __builtin_ldexp(__x, __exp); }
+
+ using ::log;
+
+ inline float
+ log(float __x)
+ { return __builtin_logf(__x); }
+
+ inline long double
+ log(long double __x)
+ { return __builtin_logl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ log(_Tp __x)
+ { return __builtin_log(__x); }
+
+ using ::log10;
+
+ inline float
+ log10(float __x)
+ { return __builtin_log10f(__x); }
+
+ inline long double
+ log10(long double __x)
+ { return __builtin_log10l(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ log10(_Tp __x)
+ { return __builtin_log10(__x); }
+
+ using ::modf;
+
+ inline float
+ modf(float __x, float* __iptr)
+ { return __builtin_modff(__x, __iptr); }
+
+ inline long double
+ modf(long double __x, long double* __iptr)
+ { return __builtin_modfl(__x, __iptr); }
+
+ template<typename _Tp>
+ inline _Tp
+ __pow_helper(_Tp __x, int __n)
+ {
+ return __n < 0
+ ? _Tp(1)/__cmath_power(__x, -__n)
+ : __cmath_power(__x, __n);
+ }
+
+ using ::pow;
+
+ inline float
+ pow(float __x, float __y)
+ { return __builtin_powf(__x, __y); }
+
+ inline long double
+ pow(long double __x, long double __y)
+ { return __builtin_powl(__x, __y); }
+
+ inline double
+ pow(double __x, int __i)
+ { return __builtin_powi(__x, __i); }
+
+ inline float
+ pow(float __x, int __n)
+ { return __builtin_powif(__x, __n); }
+
+ inline long double
+ pow(long double __x, int __n)
+ { return __builtin_powil(__x, __n); }
+
+ using ::sin;
+
+ inline float
+ sin(float __x)
+ { return __builtin_sinf(__x); }
+
+ inline long double
+ sin(long double __x)
+ { return __builtin_sinl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sin(_Tp __x)
+ { return __builtin_sin(__x); }
+
+ using ::sinh;
+
+ inline float
+ sinh(float __x)
+ { return __builtin_sinhf(__x); }
+
+ inline long double
+ sinh(long double __x)
+ { return __builtin_sinhl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sinh(_Tp __x)
+ { return __builtin_sinh(__x); }
+
+ using ::sqrt;
+
+ inline float
+ sqrt(float __x)
+ { return __builtin_sqrtf(__x); }
+
+ inline long double
+ sqrt(long double __x)
+ { return __builtin_sqrtl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sqrt(_Tp __x)
+ { return __builtin_sqrt(__x); }
+
+ using ::tan;
+
+ inline float
+ tan(float __x)
+ { return __builtin_tanf(__x); }
+
+ inline long double
+ tan(long double __x)
+ { return __builtin_tanl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ tan(_Tp __x)
+ { return __builtin_tan(__x); }
+
+ using ::tanh;
+
+ inline float
+ tanh(float __x)
+ { return __builtin_tanhf(__x); }
+
+ inline long double
+ tanh(long double __x)
+ { return __builtin_tanhl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ tanh(_Tp __x)
+ { return __builtin_tanh(__x); }
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99_MATH
+#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
+// These are possible macros imported from C99-land. For strict
+// conformance, remove possible C99-injected names from the global
+// namespace, and sequester them in the __gnu_cxx extension namespace.
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ template<typename _Tp>
+ inline int
+ __capture_fpclassify(_Tp __f) { return fpclassify(__f); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isfinite(_Tp __f) { return isfinite(__f); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isinf(_Tp __f) { return isinf(__f); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isnan(_Tp __f) { return isnan(__f); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isnormal(_Tp __f) { return isnormal(__f); }
+
+ template<typename _Tp>
+ inline int
+ __capture_signbit(_Tp __f) { return signbit(__f); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isgreater(_Tp __f1, _Tp __f2)
+ { return isgreater(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isgreaterequal(_Tp __f1, _Tp __f2)
+ { return isgreaterequal(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ __capture_islessequal(_Tp __f1, _Tp __f2)
+ { return islessequal(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ __capture_islessgreater(_Tp __f1, _Tp __f2)
+ { return islessgreater(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ __capture_isunordered(_Tp __f1, _Tp __f2)
+ { return isunordered(__f1, __f2); }
+
+_GLIBCXX_END_NAMESPACE
+
+// Only undefine the C99 FP macros, if actually captured for namespace movement
+#undef fpclassify
+#undef isfinite
+#undef isinf
+#undef isnan
+#undef isnormal
+#undef signbit
+#undef isgreater
+#undef isgreaterequal
+#undef isless
+#undef islessequal
+#undef islessgreater
+#undef isunordered
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Tp>
+ inline int
+ fpclassify(_Tp __f) { return ::__gnu_cxx::__capture_fpclassify(__f); }
+
+ template<typename _Tp>
+ inline int
+ isfinite(_Tp __f) { return ::__gnu_cxx::__capture_isfinite(__f); }
+
+ template<typename _Tp>
+ inline int
+ isinf(_Tp __f) { return ::__gnu_cxx::__capture_isinf(__f); }
+
+ template<typename _Tp>
+ inline int
+ isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); }
+
+ template<typename _Tp>
+ inline int
+ isnormal(_Tp __f) { return ::__gnu_cxx::__capture_isnormal(__f); }
+
+ template<typename _Tp>
+ inline int
+ signbit(_Tp __f) { return ::__gnu_cxx::__capture_signbit(__f); }
+
+ template<typename _Tp>
+ inline int
+ isgreater(_Tp __f1, _Tp __f2)
+ { return ::__gnu_cxx::__capture_isgreater(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ isgreaterequal(_Tp __f1, _Tp __f2)
+ { return ::__gnu_cxx::__capture_isgreaterequal(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ isless(_Tp __f1, _Tp __f2)
+ { return ::__gnu_cxx::__capture_isless(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ islessequal(_Tp __f1, _Tp __f2)
+ { return ::__gnu_cxx::__capture_islessequal(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ islessgreater(_Tp __f1, _Tp __f2)
+ { return ::__gnu_cxx::__capture_islessgreater(__f1, __f2); }
+
+ template<typename _Tp>
+ inline int
+ isunordered(_Tp __f1, _Tp __f2)
+ { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
+#endif
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/cmath.tcc>
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cmath>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cmath.tcc b/libstdc++-v3/include/c_global/cmath.tcc
new file mode 100644
index 00000000000..ff875640caf
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cmath.tcc
@@ -0,0 +1,59 @@
+// -*- C++ -*- C math library.
+
+// Copyright (C) 2000, 2003, 2004, 2006 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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 file was written by Gabriel Dos Reis <gdr@codesourcery.com>
+
+/** @file cmath.tcc
+ * This is a Standard C++ Library file.
+ */
+
+#ifndef _GLIBCXX_CMATH_TCC
+#define _GLIBCXX_CMATH_TCC 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Tp>
+ inline _Tp
+ __cmath_power(_Tp __x, unsigned int __n)
+ {
+ _Tp __y = __n % 2 ? __x : 1;
+
+ while (__n >>= 1)
+ {
+ __x = __x * __x;
+ if (__n % 2)
+ __y = __y * __x;
+ }
+
+ return __y;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/c_global/csetjmp b/libstdc++-v3/include/c_global/csetjmp
new file mode 100644
index 00000000000..3c2863475cb
--- /dev/null
+++ b/libstdc++-v3/include/c_global/csetjmp
@@ -0,0 +1,68 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file csetjmp
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c setjmp.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include_next <setjmp.h>
+
+#ifndef _GLIBCXX_CSETJMP
+#define _GLIBCXX_CSETJMP 1
+
+// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
+#undef longjmp
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef setjmp
+#define setjmp(env) setjmp (env)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::jmp_buf;
+ using ::longjmp;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/c_global/csignal b/libstdc++-v3/include/c_global/csignal
new file mode 100644
index 00000000000..cf89c5abfaa
--- /dev/null
+++ b/libstdc++-v3/include/c_global/csignal
@@ -0,0 +1,64 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file csignal
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c signal.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include_next <signal.h>
+
+#ifndef _GLIBCXX_CSIGNAL
+#define _GLIBCXX_CSIGNAL 1
+
+// Get rid of those macros defined in <signal.h> in lieu of real functions.
+#undef raise
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::sig_atomic_t;
+ using ::signal;
+ using ::raise;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cstdarg b/libstdc++-v3/include/c_global/cstdarg
new file mode 100644
index 00000000000..9acd24e0578
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstdarg
@@ -0,0 +1,68 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cstdarg
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdarg.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include_next <stdarg.h>
+
+#ifndef _GLIBCXX_CSTDARG
+#define _GLIBCXX_CSTDARG 1
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef va_end
+#define va_end(ap) va_end (ap)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::va_list;
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cstdarg>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cstdbool b/libstdc++-v3/include/c_global/cstdbool
new file mode 100644
index 00000000000..ac18c74a6c9
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstdbool
@@ -0,0 +1,46 @@
+// <cstdbool> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cstdbool
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CSTDBOOL
+#define _GLIBCXX_CSTDBOOL 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cstdbool>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/c_global/cstddef b/libstdc++-v3/include/c_global/cstddef
new file mode 100644
index 00000000000..5196aeb9e81
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstddef
@@ -0,0 +1,60 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file cstddef
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stddef.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.1 Types
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include_next <stddef.h>
+
+#ifndef _GLIBCXX_CSTDDEF
+#define _GLIBCXX_CSTDDEF 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::ptrdiff_t;
+ using ::size_t;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cstdint b/libstdc++-v3/include/c_global/cstdint
new file mode 100644
index 00000000000..ece67a3b784
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstdint
@@ -0,0 +1,46 @@
+// <cstdint> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cstdint
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CSTDINT
+#define _GLIBCXX_CSTDINT 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cstdint>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio
new file mode 100644
index 00000000000..ec25b994cc2
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstdio
@@ -0,0 +1,194 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cstdio
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdio.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 27.8.2 C Library files
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include_next <stdio.h>
+
+#ifndef _GLIBCXX_CSTDIO
+#define _GLIBCXX_CSTDIO 1
+
+// Get rid of those macros defined in <stdio.h> in lieu of real functions.
+#undef clearerr
+#undef fclose
+#undef feof
+#undef ferror
+#undef fflush
+#undef fgetc
+#undef fgetpos
+#undef fgets
+#undef fopen
+#undef fprintf
+#undef fputc
+#undef fputs
+#undef fread
+#undef freopen
+#undef fscanf
+#undef fseek
+#undef fsetpos
+#undef ftell
+#undef fwrite
+#undef getc
+#undef getchar
+#undef gets
+#undef perror
+#undef printf
+#undef putc
+#undef putchar
+#undef puts
+#undef remove
+#undef rename
+#undef rewind
+#undef scanf
+#undef setbuf
+#undef setvbuf
+#undef sprintf
+#undef sscanf
+#undef tmpfile
+#undef tmpnam
+#undef ungetc
+#undef vfprintf
+#undef vprintf
+#undef vsprintf
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::FILE;
+ using ::fpos_t;
+
+ using ::clearerr;
+ using ::fclose;
+ using ::feof;
+ using ::ferror;
+ using ::fflush;
+ using ::fgetc;
+ using ::fgetpos;
+ using ::fgets;
+ using ::fopen;
+ using ::fprintf;
+ using ::fputc;
+ using ::fputs;
+ using ::fread;
+ using ::freopen;
+ using ::fscanf;
+ using ::fseek;
+ using ::fsetpos;
+ using ::ftell;
+ using ::fwrite;
+ using ::getc;
+ using ::getchar;
+ using ::gets;
+ using ::perror;
+ using ::printf;
+ using ::putc;
+ using ::putchar;
+ using ::puts;
+ using ::remove;
+ using ::rename;
+ using ::rewind;
+ using ::scanf;
+ using ::setbuf;
+ using ::setvbuf;
+ using ::sprintf;
+ using ::sscanf;
+ using ::tmpfile;
+ using ::tmpnam;
+ using ::ungetc;
+ using ::vfprintf;
+ using ::vprintf;
+ using ::vsprintf;
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99
+
+#undef snprintf
+#undef vfscanf
+#undef vscanf
+#undef vsnprintf
+#undef vsscanf
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
+ extern "C" int
+ (snprintf)(char * restrict, size_t, const char * restrict, ...);
+ extern "C" int
+ (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
+ extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
+ extern "C" int
+ (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
+ extern "C" int
+ (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
+#endif
+
+#if !_GLIBCXX_USE_C99_DYNAMIC
+ using ::snprintf;
+ using ::vfscanf;
+ using ::vscanf;
+ using ::vsnprintf;
+ using ::vsscanf;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_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
+
+#endif // _GLIBCXX_USE_C99
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cstdio>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib
new file mode 100644
index 00000000000..e4ab8f9911d
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstdlib
@@ -0,0 +1,231 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cstdlib
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdlib.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+
+#ifndef _GLIBCXX_CSTDLIB
+#define _GLIBCXX_CSTDLIB 1
+
+#if !_GLIBCXX_HOSTED
+// The C standard does not require a freestanding implementation to
+// provide <stdlib.h>. However, the C++ standard does still require
+// <cstdlib> -- but only the functionality mentioned in
+// [lib.support.start.term].
+
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ extern "C" void abort(void);
+ extern "C" int atexit(void (*)());
+ extern "C" void exit(int);
+
+_GLIBCXX_END_NAMESPACE
+
+#else
+
+#include_next <stdlib.h>
+
+// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
+#undef abort
+#undef abs
+#undef atexit
+#undef atof
+#undef atoi
+#undef atol
+#undef bsearch
+#undef calloc
+#undef div
+#undef exit
+#undef free
+#undef getenv
+#undef labs
+#undef ldiv
+#undef malloc
+#undef mblen
+#undef mbstowcs
+#undef mbtowc
+#undef qsort
+#undef rand
+#undef realloc
+#undef srand
+#undef strtod
+#undef strtol
+#undef strtoul
+#undef system
+#undef wcstombs
+#undef wctomb
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::div_t;
+ using ::ldiv_t;
+
+ using ::abort;
+ using ::abs;
+ using ::atexit;
+ using ::atof;
+ using ::atoi;
+ using ::atol;
+ using ::bsearch;
+ using ::calloc;
+ using ::div;
+ using ::exit;
+ using ::free;
+ using ::getenv;
+ using ::labs;
+ using ::ldiv;
+ using ::malloc;
+#ifdef _GLIBCXX_HAVE_MBSTATE_T
+ using ::mblen;
+ using ::mbstowcs;
+ using ::mbtowc;
+#endif // _GLIBCXX_HAVE_MBSTATE_T
+ using ::qsort;
+ using ::rand;
+ using ::realloc;
+ using ::srand;
+ using ::strtod;
+ using ::strtol;
+ using ::strtoul;
+ using ::system;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ using ::wcstombs;
+ using ::wctomb;
+#endif // _GLIBCXX_USE_WCHAR_T
+
+ inline long
+ abs(long __i) { return labs(__i); }
+
+ inline ldiv_t
+ div(long __i, long __j) { return ldiv(__i, __j); }
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99
+
+#undef _Exit
+#undef llabs
+#undef lldiv
+#undef atoll
+#undef strtoll
+#undef strtoull
+#undef strtof
+#undef strtold
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::lldiv_t;
+#endif
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
+ extern "C" void (_Exit)(int);
+#endif
+#if !_GLIBCXX_USE_C99_DYNAMIC
+ using ::_Exit;
+#endif
+
+ inline long long
+ abs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::llabs;
+
+ inline lldiv_t
+ div(long long __n, long long __d)
+ { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+ using ::lldiv;
+#endif
+
+#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ extern "C" long long int (atoll)(const char *);
+ extern "C" long long int
+ (strtoll)(const char * restrict, char ** restrict, int);
+ extern "C" unsigned long long int
+ (strtoull)(const char * restrict, char ** restrict, int);
+#endif
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::atoll;
+ using ::strtoll;
+ using ::strtoull;
+#endif
+ using ::strtof;
+ using ::strtold;
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::__gnu_cxx::lldiv_t;
+#endif
+ using ::__gnu_cxx::_Exit;
+ using ::__gnu_cxx::abs;
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::__gnu_cxx::llabs;
+ using ::__gnu_cxx::div;
+ using ::__gnu_cxx::lldiv;
+#endif
+ using ::__gnu_cxx::atoll;
+ using ::__gnu_cxx::strtof;
+ using ::__gnu_cxx::strtoll;
+ using ::__gnu_cxx::strtoull;
+ using ::__gnu_cxx::strtold;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _GLIBCXX_USE_C99
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cstdlib>
+#endif
+
+#endif // !_GLIBCXX_HOSTED
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cstring b/libstdc++-v3/include/c_global/cstring
new file mode 100644
index 00000000000..c797aca16b4
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cstring
@@ -0,0 +1,130 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file cstring
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c string.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include_next <string.h>
+
+#ifndef _GLIBCXX_CSTRING
+#define _GLIBCXX_CSTRING 1
+
+// Get rid of those macros defined in <string.h> in lieu of real functions.
+#undef memcpy
+#undef memmove
+#undef strcpy
+#undef strncpy
+#undef strcat
+#undef strncat
+#undef memcmp
+#undef strcmp
+#undef strcoll
+#undef strncmp
+#undef strxfrm
+#undef memchr
+#undef strchr
+#undef strcspn
+#undef strpbrk
+#undef strrchr
+#undef strspn
+#undef strstr
+#undef strtok
+#undef memset
+#undef strerror
+#undef strlen
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::memcpy;
+ using ::memmove;
+ using ::strcpy;
+ using ::strncpy;
+ using ::strcat;
+ using ::strncat;
+ using ::memcmp;
+ using ::strcmp;
+ using ::strcoll;
+ using ::strncmp;
+ using ::strxfrm;
+ using ::strcspn;
+ using ::strspn;
+ using ::strtok;
+ using ::memset;
+ using ::strerror;
+ using ::strlen;
+
+ using ::memchr;
+
+ inline void*
+ memchr(void* __p, int __c, size_t __n)
+ { return memchr(const_cast<const void*>(__p), __c, __n); }
+
+ using ::strchr;
+
+ inline char*
+ strchr(char* __s1, int __n)
+ { return __builtin_strchr(const_cast<const char*>(__s1), __n); }
+
+ using ::strpbrk;
+
+ inline char*
+ strpbrk(char* __s1, const char* __s2)
+ { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
+
+ using ::strrchr;
+
+ inline char*
+ strrchr(char* __s1, int __n)
+ { return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
+
+ using ::strstr;
+
+ inline char*
+ strstr(char* __s1, const char* __s2)
+ { return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/libstdc++-v3/include/c_global/ctgmath b/libstdc++-v3/include/c_global/ctgmath
new file mode 100644
index 00000000000..623ed9be592
--- /dev/null
+++ b/libstdc++-v3/include/c_global/ctgmath
@@ -0,0 +1,46 @@
+// <ctgmath> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/ctgmath
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CTGMATH
+#define _GLIBCXX_CTGMATH 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/ctgmath>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/c_global/ctime b/libstdc++-v3/include/c_global/ctime
new file mode 100644
index 00000000000..8b563ba1bf4
--- /dev/null
+++ b/libstdc++-v3/include/c_global/ctime
@@ -0,0 +1,86 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/ctime
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c time.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.5 Date and time
+//
+
+#pragma GCC system_header
+
+#include <cstddef>
+#include_next <time.h>
+
+#ifndef _GLIBCXX_CTIME
+#define _GLIBCXX_CTIME 1
+
+// Get rid of those macros defined in <time.h> in lieu of real functions.
+#undef clock
+#undef difftime
+#undef mktime
+#undef time
+#undef asctime
+#undef ctime
+#undef gmtime
+#undef localtime
+#undef strftime
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::clock_t;
+ using ::time_t;
+ using ::tm;
+
+ using ::clock;
+ using ::difftime;
+ using ::mktime;
+ using ::time;
+ using ::asctime;
+ using ::ctime;
+ using ::gmtime;
+ using ::localtime;
+ using ::strftime;
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/ctime>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cwchar b/libstdc++-v3/include/c_global/cwchar
new file mode 100644
index 00000000000..6e867342478
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cwchar
@@ -0,0 +1,284 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cwchar
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c wchar.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 21.4
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <ctime>
+
+#if _GLIBCXX_HAVE_WCHAR_H
+#include_next <wchar.h>
+#endif
+
+#ifndef _GLIBCXX_CWCHAR
+#define _GLIBCXX_CWCHAR 1
+
+// Need to do a bit of trickery here with mbstate_t as char_traits
+// assumes it is in wchar.h, regardless of wchar_t specializations.
+#ifndef _GLIBCXX_HAVE_MBSTATE_T
+extern "C"
+{
+ typedef struct
+ {
+ int __fill[6];
+ } mbstate_t;
+}
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::mbstate_t;
+
+_GLIBCXX_END_NAMESPACE
+
+// Get rid of those macros defined in <wchar.h> in lieu of real functions.
+#undef btowc
+#undef fgetwc
+#undef fgetws
+#undef fputwc
+#undef fputws
+#undef fwide
+#undef fwprintf
+#undef fwscanf
+#undef getwc
+#undef getwchar
+#undef mbrlen
+#undef mbrtowc
+#undef mbsinit
+#undef mbsrtowcs
+#undef putwc
+#undef putwchar
+#undef swprintf
+#undef swscanf
+#undef ungetwc
+#undef vfwprintf
+#if _GLIBCXX_HAVE_VFWSCANF
+# undef vfwscanf
+#endif
+#undef vswprintf
+#if _GLIBCXX_HAVE_VSWSCANF
+# undef vswscanf
+#endif
+#undef vwprintf
+#if _GLIBCXX_HAVE_VWSCANF
+# undef vwscanf
+#endif
+#undef wcrtomb
+#undef wcscat
+#undef wcschr
+#undef wcscmp
+#undef wcscoll
+#undef wcscpy
+#undef wcscspn
+#undef wcsftime
+#undef wcslen
+#undef wcsncat
+#undef wcsncmp
+#undef wcsncpy
+#undef wcspbrk
+#undef wcsrchr
+#undef wcsrtombs
+#undef wcsspn
+#undef wcsstr
+#undef wcstod
+#if _GLIBCXX_HAVE_WCSTOF
+# undef wcstof
+#endif
+#undef wcstok
+#undef wcstol
+#undef wcstoul
+#undef wcsxfrm
+#undef wctob
+#undef wmemchr
+#undef wmemcmp
+#undef wmemcpy
+#undef wmemmove
+#undef wmemset
+#undef wprintf
+#undef wscanf
+
+#if _GLIBCXX_USE_WCHAR_T
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::wint_t;
+
+ using ::btowc;
+ using ::fgetwc;
+ using ::fgetws;
+ using ::fputwc;
+ using ::fputws;
+ using ::fwide;
+ using ::fwprintf;
+ using ::fwscanf;
+ using ::getwc;
+ using ::getwchar;
+ using ::mbrlen;
+ using ::mbrtowc;
+ using ::mbsinit;
+ using ::mbsrtowcs;
+ using ::putwc;
+ using ::putwchar;
+ using ::swprintf;
+ using ::swscanf;
+ using ::ungetwc;
+ using ::vfwprintf;
+#if _GLIBCXX_HAVE_VFWSCANF
+ using ::vfwscanf;
+#endif
+ using ::vswprintf;
+#if _GLIBCXX_HAVE_VSWSCANF
+ using ::vswscanf;
+#endif
+ using ::vwprintf;
+#if _GLIBCXX_HAVE_VWSCANF
+ using ::vwscanf;
+#endif
+ using ::wcrtomb;
+ using ::wcscat;
+ using ::wcscmp;
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
+ using ::wcsftime;
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
+ using ::wcsncpy;
+ using ::wcsrtombs;
+ using ::wcsspn;
+ using ::wcstod;
+#if _GLIBCXX_HAVE_WCSTOF
+ using ::wcstof;
+#endif
+ using ::wcstok;
+ using ::wcstol;
+ using ::wcstoul;
+ using ::wcsxfrm;
+ using ::wctob;
+ using ::wmemcmp;
+ using ::wmemcpy;
+ using ::wmemmove;
+ using ::wmemset;
+ using ::wprintf;
+ using ::wscanf;
+
+ using ::wcschr;
+
+ inline wchar_t*
+ wcschr(wchar_t* __p, wchar_t __c)
+ { return wcschr(const_cast<const wchar_t*>(__p), __c); }
+
+ using ::wcspbrk;
+
+ inline wchar_t*
+ wcspbrk(wchar_t* __s1, const wchar_t* __s2)
+ { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
+
+ using ::wcsrchr;
+
+ inline wchar_t*
+ wcsrchr(wchar_t* __p, wchar_t __c)
+ { return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
+
+ using ::wcsstr;
+
+ inline wchar_t*
+ wcsstr(wchar_t* __s1, const wchar_t* __s2)
+ { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
+
+ using ::wmemchr;
+
+ inline wchar_t*
+ wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
+ { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99
+
+#undef wcstold
+#undef wcstoll
+#undef wcstoull
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
+ extern "C" long double
+ (wcstold)(const wchar_t * restrict, wchar_t ** restrict);
+#endif
+#if !_GLIBCXX_USE_C99_DYNAMIC
+ using ::wcstold;
+#endif
+#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ extern "C" long long int
+ (wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int);
+ extern "C" unsigned long long int
+ (wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int);
+#endif
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::wcstoll;
+ using ::wcstoull;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::__gnu_cxx::wcstold;
+ using ::__gnu_cxx::wcstoll;
+ using ::__gnu_cxx::wcstoull;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+#endif //_GLIBCXX_USE_WCHAR_T
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cwchar>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_global/cwctype b/libstdc++-v3/include/c_global/cwctype
new file mode 100644
index 00000000000..ab97b8dc9b5
--- /dev/null
+++ b/libstdc++-v3/include/c_global/cwctype
@@ -0,0 +1,116 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/cwctype
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c wctype.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: <cwctype>
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+#if _GLIBCXX_HAVE_WCTYPE_H
+#include_next <wctype.h>
+#endif
+
+#ifndef _GLIBCXX_CWCTYPE
+#define _GLIBCXX_CWCTYPE 1
+
+// Get rid of those macros defined in <wctype.h> in lieu of real functions.
+#undef iswalnum
+#undef iswalpha
+#if _GLIBCXX_HAVE_ISWBLANK
+# undef iswblank
+#endif
+#undef iswcntrl
+#undef iswctype
+#undef iswdigit
+#undef iswgraph
+#undef iswlower
+#undef iswprint
+#undef iswpunct
+#undef iswspace
+#undef iswupper
+#undef iswxdigit
+#undef towctrans
+#undef towlower
+#undef towupper
+#undef wctrans
+#undef wctype
+
+#if _GLIBCXX_USE_WCHAR_T
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::wint_t; // cwchar
+
+ using ::wctype_t;
+ using ::wctrans_t;
+
+ using ::iswalnum;
+ using ::iswalpha;
+#if _GLIBCXX_HAVE_ISWBLANK
+ using ::iswblank;
+#endif
+ using ::iswcntrl;
+ using ::iswctype;
+ using ::iswdigit;
+ using ::iswgraph;
+ using ::iswlower;
+ using ::iswprint;
+ using ::iswpunct;
+ using ::iswspace;
+ using ::iswupper;
+ using ::iswxdigit;
+ using ::towctrans;
+ using ::towlower;
+ using ::towupper;
+ using ::wctrans;
+ using ::wctype;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif //_GLIBCXX_USE_WCHAR_T
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/cwctype>
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/std/algorithm b/libstdc++-v3/include/std/algorithm
index d579bbd1b8d..8f88cc0378c 100644
--- a/libstdc++-v3/include/std/algorithm
+++ b/libstdc++-v3/include/std/algorithm
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array
new file mode 100644
index 00000000000..5ca2604655d
--- /dev/null
+++ b/libstdc++-v3/include/std/array
@@ -0,0 +1,46 @@
+// <array> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/array
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ARRAY
+#define _GLIBCXX_ARRAY 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/array>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset
index b0bc55545f5..3a7d40b209e 100644
--- a/libstdc++-v3/include/std/bitset
+++ b/libstdc++-v3/include/std/bitset
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/c++0x_warning.h b/libstdc++-v3/include/std/c++0x_warning.h
new file mode 100644
index 00000000000..642e542b360
--- /dev/null
+++ b/libstdc++-v3/include/std/c++0x_warning.h
@@ -0,0 +1,41 @@
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/c++0x_warning.h
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _CXX0X_WARNING_H
+#define _CXX0X_WARNING_H 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#error This file requires compiler and library support for the upcoming \
+ISO C++ standard, C++0x. This support is currently experimental, and must be \
+enabled with the -std=c++0x or -std=gnu++0x compiler options.
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex
index 26f31f6150f..b91732b0c85 100644
--- a/libstdc++-v3/include/std/complex
+++ b/libstdc++-v3/include/std/complex
@@ -1,6 +1,6 @@
// The template and inlines for the -*- C++ -*- complex number classes.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -1486,4 +1486,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_END_NAMESPACE
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/complex>
+#endif
+
#endif /* _GLIBCXX_COMPLEX */
diff --git a/libstdc++-v3/include/std/deque b/libstdc++-v3/include/std/deque
index 93ca4caa776..1891b34dcb3 100644
--- a/libstdc++-v3/include/std/deque
+++ b/libstdc++-v3/include/std/deque
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/fstream b/libstdc++-v3/include/std/fstream
index f664f2de9f4..adcf3eb7c6e 100644
--- a/libstdc++-v3/include/std/fstream
+++ b/libstdc++-v3/include/std/fstream
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional
index 18413142161..33bab643b1f 100644
--- a/libstdc++-v3/include/std/functional
+++ b/libstdc++-v3/include/std/functional
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -54,4 +54,8 @@
#include <bits/c++config.h>
#include <bits/stl_function.h>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/functional>
+#endif
+
#endif /* _GLIBCXX_FUNCTIONAL */
diff --git a/libstdc++-v3/include/std/iomanip b/libstdc++-v3/include/std/iomanip
index 13079e4fb04..53c013c2be8 100644
--- a/libstdc++-v3/include/std/iomanip
+++ b/libstdc++-v3/include/std/iomanip
@@ -15,10 +15,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/ios b/libstdc++-v3/include/std/ios
index f081115e9b7..95d845081cd 100644
--- a/libstdc++-v3/include/std/ios
+++ b/libstdc++-v3/include/std/ios
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/iosfwd b/libstdc++-v3/include/std/iosfwd
index d2da12bf6a3..f80d34b607e 100644
--- a/libstdc++-v3/include/std/iosfwd
+++ b/libstdc++-v3/include/std/iosfwd
@@ -15,10 +15,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/iostream b/libstdc++-v3/include/std/iostream
index 0ff0da2177f..a4bdf86377a 100644
--- a/libstdc++-v3/include/std/iostream
+++ b/libstdc++-v3/include/std/iostream
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/istream b/libstdc++-v3/include/std/istream
index d6b0dfb0816..0a4e5c73755 100644
--- a/libstdc++-v3/include/std/istream
+++ b/libstdc++-v3/include/std/istream
@@ -15,10 +15,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/iterator b/libstdc++-v3/include/std/iterator
index f0317b44a7c..5533590f15c 100644
--- a/libstdc++-v3/include/std/iterator
+++ b/libstdc++-v3/include/std/iterator
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits
index fffa875d91f..621a6fc347f 100644
--- a/libstdc++-v3/include/std/limits
+++ b/libstdc++-v3/include/std/limits
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/list b/libstdc++-v3/include/std/list
index 10461a18317..8e58586f51d 100644
--- a/libstdc++-v3/include/std/list
+++ b/libstdc++-v3/include/std/list
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/locale b/libstdc++-v3/include/std/locale
index 5223f90c878..328332a86b3 100644
--- a/libstdc++-v3/include/std/locale
+++ b/libstdc++-v3/include/std/locale
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/map b/libstdc++-v3/include/std/map
index a7e8f9c2107..29a5f6e015c 100644
--- a/libstdc++-v3/include/std/map
+++ b/libstdc++-v3/include/std/map
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/memory b/libstdc++-v3/include/std/memory
index f604ac9f39e..2dd64763fb0 100644
--- a/libstdc++-v3/include/std/memory
+++ b/libstdc++-v3/include/std/memory
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -380,4 +380,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_END_NAMESPACE
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/memory>
+#endif
+
#endif /* _GLIBCXX_MEMORY */
diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric
index 55ab7a8e1ee..7f21b3d9e8e 100644
--- a/libstdc++-v3/include/std/numeric
+++ b/libstdc++-v3/include/std/numeric
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/ostream b/libstdc++-v3/include/std/ostream
index 2a84f808d7e..942a5a4a609 100644
--- a/libstdc++-v3/include/std/ostream
+++ b/libstdc++-v3/include/std/ostream
@@ -15,10 +15,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/queue b/libstdc++-v3/include/std/queue
index 2d919d0dfdc..42cc43217ae 100644
--- a/libstdc++-v3/include/std/queue
+++ b/libstdc++-v3/include/std/queue
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/random b/libstdc++-v3/include/std/random
new file mode 100644
index 00000000000..6faf5f56506
--- /dev/null
+++ b/libstdc++-v3/include/std/random
@@ -0,0 +1,46 @@
+// <random> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/random
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_RANDOM
+#define _GLIBCXX_RANDOM 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/random>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/regex b/libstdc++-v3/include/std/regex
new file mode 100644
index 00000000000..4b4e4827c29
--- /dev/null
+++ b/libstdc++-v3/include/std/regex
@@ -0,0 +1,46 @@
+// <regex> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/regex
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_REGEX
+#define _GLIBCXX_REGEX 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/regex>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/set b/libstdc++-v3/include/std/set
index 65ebe8a10cc..801a8b1ef26 100644
--- a/libstdc++-v3/include/std/set
+++ b/libstdc++-v3/include/std/set
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
index a09815c1945..66159c844f1 100644
--- a/libstdc++-v3/include/std/sstream
+++ b/libstdc++-v3/include/std/sstream
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/stack b/libstdc++-v3/include/std/stack
index b51155e64a3..318d4b9533b 100644
--- a/libstdc++-v3/include/std/stack
+++ b/libstdc++-v3/include/std/stack
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/stdexcept b/libstdc++-v3/include/std/stdexcept
index 2d56b3817d4..d246428f4de 100644
--- a/libstdc++-v3/include/std/stdexcept
+++ b/libstdc++-v3/include/std/stdexcept
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/streambuf b/libstdc++-v3/include/std/streambuf
index 9de7907120f..5e710377ab4 100644
--- a/libstdc++-v3/include/std/streambuf
+++ b/libstdc++-v3/include/std/streambuf
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/string b/libstdc++-v3/include/std/string
index 0899cfe5a10..781901587cb 100644
--- a/libstdc++-v3/include/std/string
+++ b/libstdc++-v3/include/std/string
@@ -15,10 +15,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
new file mode 100644
index 00000000000..7ea9aff4c5d
--- /dev/null
+++ b/libstdc++-v3/include/std/tuple
@@ -0,0 +1,46 @@
+// <tuple> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/tuple
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TUPLE
+#define _GLIBCXX_TUPLE 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/tuple>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
new file mode 100644
index 00000000000..1d83dabd861
--- /dev/null
+++ b/libstdc++-v3/include/std/type_traits
@@ -0,0 +1,46 @@
+// <type_traits> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/type_traits
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TYPE_TRAITS
+#define _GLIBCXX_TYPE_TRAITS 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/type_traits>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/unordered_map b/libstdc++-v3/include/std/unordered_map
new file mode 100644
index 00000000000..9eee766dd0a
--- /dev/null
+++ b/libstdc++-v3/include/std/unordered_map
@@ -0,0 +1,46 @@
+// <unordered_map> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/unordered_map
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_UNORDERED_MAP
+#define _GLIBCXX_UNORDERED_MAP 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/unordered_map>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/unordered_set b/libstdc++-v3/include/std/unordered_set
new file mode 100644
index 00000000000..d83cfa3663d
--- /dev/null
+++ b/libstdc++-v3/include/std/unordered_set
@@ -0,0 +1,46 @@
+// <unordered_set> -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, 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.
+
+/** @file include/unordered_set
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_UNORDERED_SET
+#define _GLIBCXX_UNORDERED_SET 1
+
+#pragma GCC system_header
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/unordered_set>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#endif
+
diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility
index 84c9131d82b..c17b355bcdf 100644
--- a/libstdc++-v3/include/std/utility
+++ b/libstdc++-v3/include/std/utility
@@ -1,6 +1,6 @@
// <utility> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2006 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
@@ -13,10 +13,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
@@ -66,4 +66,8 @@
#include <bits/stl_relops.h>
#include <bits/stl_pair.h>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <tr1/utility>
+#endif
+
#endif /* _GLIBCXX_UTILITY */
diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray
index 6b9d63f03ce..b23c867a567 100644
--- a/libstdc++-v3/include/std/valarray
+++ b/libstdc++-v3/include/std/valarray
@@ -15,10 +15,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/std/vector b/libstdc++-v3/include/std/vector
index d7aba96e0bf..83a08ff4a1b 100644
--- a/libstdc++-v3/include/std/vector
+++ b/libstdc++-v3/include/std/vector
@@ -14,10 +14,10 @@
// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// 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, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
diff --git a/libstdc++-v3/include/tr1/array b/libstdc++-v3/include/tr1/array
index 23808b33462..d08aa830ebe 100644
--- a/libstdc++-v3/include/tr1/array
+++ b/libstdc++-v3/include/tr1/array
@@ -44,7 +44,7 @@
//namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
/// @brief struct array [6.2.2].
/// NB: Requires complete type _Tp.
diff --git a/libstdc++-v3/include/tr1/boost_shared_ptr.h b/libstdc++-v3/include/tr1/boost_shared_ptr.h
index fc79cfc70c2..524a98ccc04 100644
--- a/libstdc++-v3/include/tr1/boost_shared_ptr.h
+++ b/libstdc++-v3/include/tr1/boost_shared_ptr.h
@@ -56,7 +56,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
class bad_weak_ptr : public std::exception
{
diff --git a/libstdc++-v3/include/tr1/ccomplex b/libstdc++-v3/include/tr1/ccomplex
new file mode 100644
index 00000000000..a9196458fd1
--- /dev/null
+++ b/libstdc++-v3/include/tr1/ccomplex
@@ -0,0 +1,39 @@
+// TR1 ccomplex -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file tr1/ccomplex
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_CCOMPLEX
+#define _TR1_CCOMPLEX 1
+
+#include <tr1/complex>
+
+#endif
diff --git a/libstdc++-v3/include/tr1/cctype b/libstdc++-v3/include/tr1/cctype
index 8ddfa89002e..7d428f9430b 100644
--- a/libstdc++-v3/include/tr1/cctype
+++ b/libstdc++-v3/include/tr1/cctype
@@ -44,7 +44,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
using ::isblank;
diff --git a/libstdc++-v3/include/tr1/cfenv b/libstdc++-v3/include/tr1/cfenv
index ddcce74c591..a468526ab9c 100644
--- a/libstdc++-v3/include/tr1/cfenv
+++ b/libstdc++-v3/include/tr1/cfenv
@@ -55,7 +55,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// types
using ::fenv_t;
diff --git a/libstdc++-v3/include/tr1/cinttypes b/libstdc++-v3/include/tr1/cinttypes
index 03bdd30c615..398ab1d2e18 100644
--- a/libstdc++-v3/include/tr1/cinttypes
+++ b/libstdc++-v3/include/tr1/cinttypes
@@ -46,7 +46,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// types
using ::imaxdiv_t;
diff --git a/libstdc++-v3/include/tr1/cmath b/libstdc++-v3/include/tr1/cmath
index f08e86f73de..65115e67350 100644
--- a/libstdc++-v3/include/tr1/cmath
+++ b/libstdc++-v3/include/tr1/cmath
@@ -151,7 +151,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
#if _GLIBCXX_USE_C99_MATH_TR1
@@ -375,10 +375,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__gnu_cxx::__enable_if<std::__is_floating<_Tp>::__value
|| std::__is_floating<_Up>::__value,
typename
- std::tr1::__promote_2<_Tp, _Up>::__type>::__type
+ std::_GLIBCXX_TR1::__promote_2<_Tp, _Up>::__type>::__type
atan2(_Tp __y, _Up __x)
{
- typedef typename std::tr1::__promote_2<_Tp, _Up>::__type __type;
+ typedef typename std::_GLIBCXX_TR1::__promote_2<_Tp, _Up>::__type __type;
return std::atan2(__type(__y), __type(__x));
}
} // namespace __detail
diff --git a/libstdc++-v3/include/tr1/common.h b/libstdc++-v3/include/tr1/common.h
index 7d098f863dd..fb13cdea320 100644
--- a/libstdc++-v3/include/tr1/common.h
+++ b/libstdc++-v3/include/tr1/common.h
@@ -39,7 +39,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
template<typename _Tp, bool = is_integral<_Tp>::value>
struct __promote
diff --git a/libstdc++-v3/include/tr1/complex b/libstdc++-v3/include/tr1/complex
index 0817ef761e3..666cae9e81d 100644
--- a/libstdc++-v3/include/tr1/complex
+++ b/libstdc++-v3/include/tr1/complex
@@ -1,6 +1,6 @@
// TR1 complex -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
@@ -34,13 +34,13 @@
#ifndef _TR1_COMPLEX
#define _TR1_COMPLEX 1
-#include "../complex"
+#include <complex>
#include <tr1/common.h>
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// Forward declarations.
template<typename _Tp> std::complex<_Tp> acos(const std::complex<_Tp>&);
@@ -59,7 +59,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
inline std::complex<_Tp>
__complex_acos(const std::complex<_Tp>& __z)
{
- const std::complex<_Tp> __t = std::tr1::asin(__z);
+ const std::complex<_Tp> __t = std::_GLIBCXX_TR1::asin(__z);
const _Tp __pi_2 = 1.5707963267948966192313216916397514L;
return std::complex<_Tp>(__pi_2 - __t.real(), -__t.imag());
}
@@ -96,7 +96,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__complex_asin(const std::complex<_Tp>& __z)
{
std::complex<_Tp> __t(-__z.imag(), __z.real());
- __t = std::tr1::asinh(__t);
+ __t = std::_GLIBCXX_TR1::asinh(__t);
return std::complex<_Tp>(__t.imag(), -__t.real());
}
diff --git a/libstdc++-v3/include/tr1/complex.h b/libstdc++-v3/include/tr1/complex.h
new file mode 100644
index 00000000000..12fadec33ff
--- /dev/null
+++ b/libstdc++-v3/include/tr1/complex.h
@@ -0,0 +1,39 @@
+// TR1 complex.h -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file tr1/complex.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_COMPLEX_H
+#define _TR1_COMPLEX_H 1
+
+#include <tr1/ccomplex>
+
+#endif
diff --git a/libstdc++-v3/include/tr1/cstdint b/libstdc++-v3/include/tr1/cstdint
index af5a90f288c..a8dce52245f 100644
--- a/libstdc++-v3/include/tr1/cstdint
+++ b/libstdc++-v3/include/tr1/cstdint
@@ -46,7 +46,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
using ::int8_t;
using ::int16_t;
diff --git a/libstdc++-v3/include/tr1/cstdio b/libstdc++-v3/include/tr1/cstdio
index 1cf41b5018a..b016a1527df 100644
--- a/libstdc++-v3/include/tr1/cstdio
+++ b/libstdc++-v3/include/tr1/cstdio
@@ -40,7 +40,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
#if _GLIBCXX_USE_C99
using std::snprintf;
diff --git a/libstdc++-v3/include/tr1/cstdlib b/libstdc++-v3/include/tr1/cstdlib
index f7f8d7d9c44..5096fa8ca53 100644
--- a/libstdc++-v3/include/tr1/cstdlib
+++ b/libstdc++-v3/include/tr1/cstdlib
@@ -43,7 +43,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
#if _GLIBCXX_USE_C99
diff --git a/libstdc++-v3/include/tr1/cwchar b/libstdc++-v3/include/tr1/cwchar
index b918b37dd9f..abc88bb4fdc 100644
--- a/libstdc++-v3/include/tr1/cwchar
+++ b/libstdc++-v3/include/tr1/cwchar
@@ -43,7 +43,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
#if _GLIBCXX_HAVE_WCSTOF
using std::wcstof;
diff --git a/libstdc++-v3/include/tr1/cwctype b/libstdc++-v3/include/tr1/cwctype
index 7cc7a36c68b..f6e99be4981 100644
--- a/libstdc++-v3/include/tr1/cwctype
+++ b/libstdc++-v3/include/tr1/cwctype
@@ -43,7 +43,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
#if _GLIBCXX_HAVE_ISWBLANK
using std::iswblank;
diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional
index f3cc78de751..736b7701d70 100644
--- a/libstdc++-v3/include/tr1/functional
+++ b/libstdc++-v3/include/tr1/functional
@@ -36,16 +36,18 @@
#pragma GCC system_header
-#include "../functional"
+#include <cstdlib> // for std::abort
+#include <cmath> // for std::frexp
+#include <string> // for std::tr1::hash
+#include <functional>
#include <typeinfo>
+#include <tr1/tuple>
#include <tr1/type_traits>
#include <ext/type_traits.h>
-#include <cstdlib> // for std::abort
-#include <tr1/tuple>
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
template<typename _MemberPointer>
class _Mem_fn;
@@ -636,7 +638,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typename result<_Mu(_Arg, _Tuple)>::type
operator()(const volatile _Arg&, const _Tuple& __tuple) const volatile
{
- return ::std::tr1::get<(is_placeholder<_Arg>::value - 1)>(__tuple);
+ return ::std::_GLIBCXX_TR1::get<(is_placeholder<_Arg>::value - 1)>(__tuple);
}
};
diff --git a/libstdc++-v3/include/tr1/functional_hash.h b/libstdc++-v3/include/tr1/functional_hash.h
index 3e592b45ab7..9c6f69a3f51 100644
--- a/libstdc++-v3/include/tr1/functional_hash.h
+++ b/libstdc++-v3/include/tr1/functional_hash.h
@@ -40,7 +40,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// Definition of default hash function std::tr1::hash<>. The types for
// which std::tr1::hash<T> is defined is in clause 6.3.3. of the PDTR.
diff --git a/libstdc++-v3/include/tr1/functional_iterate.h b/libstdc++-v3/include/tr1/functional_iterate.h
index c9c1e833461..3772e15c714 100644
--- a/libstdc++-v3/include/tr1/functional_iterate.h
+++ b/libstdc++-v3/include/tr1/functional_iterate.h
@@ -1,6 +1,6 @@
// TR1 functional -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
// Written by Douglas Gregor <doug.gregor -at- gmail.com>
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -35,7 +35,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
template<typename _Res _GLIBCXX_COMMA _GLIBCXX_TEMPLATE_PARAMS>
struct _Weak_result_type_impl<_Res(_GLIBCXX_TEMPLATE_ARGS)>
@@ -547,7 +547,7 @@ class _Function_handler<_Res(_GLIBCXX_TEMPLATE_ARGS), _Member _Class::*>
static _Res
_M_invoke(const _Any_data& __functor _GLIBCXX_COMMA _GLIBCXX_PARAMS)
{
- return std::tr1::mem_fn(_Base::_M_get_pointer(__functor)->__value)
+ return std::_GLIBCXX_TR1::mem_fn(_Base::_M_get_pointer(__functor)->__value)
(_GLIBCXX_ARGS);
}
};
@@ -586,7 +586,7 @@ class _Function_handler<void(_GLIBCXX_TEMPLATE_ARGS), _Member _Class::*>
static void
_M_invoke(const _Any_data& __functor _GLIBCXX_COMMA _GLIBCXX_PARAMS)
{
- std::tr1::mem_fn(_Base::_M_get_pointer(__functor)->__value)
+ std::_GLIBCXX_TR1::mem_fn(_Base::_M_get_pointer(__functor)->__value)
(_GLIBCXX_ARGS);
}
};
diff --git a/libstdc++-v3/include/tr1/hashtable b/libstdc++-v3/include/tr1/hashtable
index 14742ab8592..d6115dd3a6d 100644
--- a/libstdc++-v3/include/tr1/hashtable
+++ b/libstdc++-v3/include/tr1/hashtable
@@ -1,6 +1,6 @@
// Internal header for TR1 unordered_set and unordered_map -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007 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
@@ -64,7 +64,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// Class template _Hashtable, class definition.
@@ -382,10 +382,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typename _Hashtable::_Hash_code_type);
std::pair<iterator, bool>
- _M_insert(const value_type&, std::tr1::true_type);
+ _M_insert(const value_type&, std::_GLIBCXX_TR1::true_type);
iterator
- _M_insert(const value_type&, std::tr1::false_type);
+ _M_insert(const value_type&, std::_GLIBCXX_TR1::false_type);
void
_M_erase_node(_Node*, _Node**);
@@ -394,7 +394,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// Insert and erase
_Insert_Return_Type
insert(const value_type& __v)
- { return _M_insert(__v, std::tr1::integral_constant<bool,
+ { return _M_insert(__v, std::_GLIBCXX_TR1::integral_constant<bool,
__unique_keys>()); }
iterator
@@ -908,7 +908,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__chc, __cit, __uk>::iterator, bool>
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
- _M_insert(const value_type& __v, std::tr1::true_type)
+ _M_insert(const value_type& __v, std::_GLIBCXX_TR1::true_type)
{
const key_type& __k = this->_M_extract(__v);
typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
@@ -929,7 +929,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__chc, __cit, __uk>::iterator
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
- _M_insert(const value_type& __v, std::tr1::false_type)
+ _M_insert(const value_type& __v, std::_GLIBCXX_TR1::false_type)
{
std::pair<bool, std::size_t> __do_rehash
= _M_rehash_policy._M_need_rehash(_M_bucket_count,
diff --git a/libstdc++-v3/include/tr1/hashtable_policy.h b/libstdc++-v3/include/tr1/hashtable_policy.h
index 568d2ff02bd..dc09ccab8bf 100644
--- a/libstdc++-v3/include/tr1/hashtable_policy.h
+++ b/libstdc++-v3/include/tr1/hashtable_policy.h
@@ -41,7 +41,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
namespace __detail
{
// Helper function: return distance(first, last) for forward
diff --git a/libstdc++-v3/include/tr1/math.h b/libstdc++-v3/include/tr1/math.h
index 36fb2fdae50..dcf75376326 100644
--- a/libstdc++-v3/include/tr1/math.h
+++ b/libstdc++-v3/include/tr1/math.h
@@ -1,6 +1,6 @@
// TR1 math.h -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
@@ -38,61 +38,61 @@
#if _GLIBCXX_USE_C99_MATH_TR1
-using std::tr1::acos;
-using std::tr1::acosh;
-using std::tr1::asin;
-using std::tr1::asinh;
-using std::tr1::atan;
-using std::tr1::atan2;
-using std::tr1::atanh;
-using std::tr1::cbrt;
-using std::tr1::ceil;
-using std::tr1::copysign;
-using std::tr1::cos;
-using std::tr1::cosh;
-using std::tr1::erf;
-using std::tr1::erfc;
-using std::tr1::exp;
-using std::tr1::exp2;
-using std::tr1::expm1;
-using std::tr1::fabs;
-using std::tr1::fdim;
-using std::tr1::floor;
-using std::tr1::fma;
-using std::tr1::fmax;
-using std::tr1::fmin;
-using std::tr1::fmod;
-using std::tr1::frexp;
-using std::tr1::hypot;
-using std::tr1::ilogb;
-using std::tr1::ldexp;
-using std::tr1::lgamma;
-using std::tr1::llrint;
-using std::tr1::llround;
-using std::tr1::log;
-using std::tr1::log10;
-using std::tr1::log1p;
-using std::tr1::log2;
-using std::tr1::logb;
-using std::tr1::lrint;
-using std::tr1::lround;
-using std::tr1::nearbyint;
-using std::tr1::nextafter;
-using std::tr1::nexttoward;
-using std::tr1::pow;
-using std::tr1::remainder;
-using std::tr1::remquo;
-using std::tr1::rint;
-using std::tr1::round;
-using std::tr1::scalbln;
-using std::tr1::scalbn;
-using std::tr1::sin;
-using std::tr1::sinh;
-using std::tr1::sqrt;
-using std::tr1::tan;
-using std::tr1::tanh;
-using std::tr1::tgamma;
-using std::tr1::trunc;
+using std::_GLIBCXX_TR1::acos;
+using std::_GLIBCXX_TR1::acosh;
+using std::_GLIBCXX_TR1::asin;
+using std::_GLIBCXX_TR1::asinh;
+using std::_GLIBCXX_TR1::atan;
+using std::_GLIBCXX_TR1::atan2;
+using std::_GLIBCXX_TR1::atanh;
+using std::_GLIBCXX_TR1::cbrt;
+using std::_GLIBCXX_TR1::ceil;
+using std::_GLIBCXX_TR1::copysign;
+using std::_GLIBCXX_TR1::cos;
+using std::_GLIBCXX_TR1::cosh;
+using std::_GLIBCXX_TR1::erf;
+using std::_GLIBCXX_TR1::erfc;
+using std::_GLIBCXX_TR1::exp;
+using std::_GLIBCXX_TR1::exp2;
+using std::_GLIBCXX_TR1::expm1;
+using std::_GLIBCXX_TR1::fabs;
+using std::_GLIBCXX_TR1::fdim;
+using std::_GLIBCXX_TR1::floor;
+using std::_GLIBCXX_TR1::fma;
+using std::_GLIBCXX_TR1::fmax;
+using std::_GLIBCXX_TR1::fmin;
+using std::_GLIBCXX_TR1::fmod;
+using std::_GLIBCXX_TR1::frexp;
+using std::_GLIBCXX_TR1::hypot;
+using std::_GLIBCXX_TR1::ilogb;
+using std::_GLIBCXX_TR1::ldexp;
+using std::_GLIBCXX_TR1::lgamma;
+using std::_GLIBCXX_TR1::llrint;
+using std::_GLIBCXX_TR1::llround;
+using std::_GLIBCXX_TR1::log;
+using std::_GLIBCXX_TR1::log10;
+using std::_GLIBCXX_TR1::log1p;
+using std::_GLIBCXX_TR1::log2;
+using std::_GLIBCXX_TR1::logb;
+using std::_GLIBCXX_TR1::lrint;
+using std::_GLIBCXX_TR1::lround;
+using std::_GLIBCXX_TR1::nearbyint;
+using std::_GLIBCXX_TR1::nextafter;
+using std::_GLIBCXX_TR1::nexttoward;
+using std::_GLIBCXX_TR1::pow;
+using std::_GLIBCXX_TR1::remainder;
+using std::_GLIBCXX_TR1::remquo;
+using std::_GLIBCXX_TR1::rint;
+using std::_GLIBCXX_TR1::round;
+using std::_GLIBCXX_TR1::scalbln;
+using std::_GLIBCXX_TR1::scalbn;
+using std::_GLIBCXX_TR1::sin;
+using std::_GLIBCXX_TR1::sinh;
+using std::_GLIBCXX_TR1::sqrt;
+using std::_GLIBCXX_TR1::tan;
+using std::_GLIBCXX_TR1::tanh;
+using std::_GLIBCXX_TR1::tgamma;
+using std::_GLIBCXX_TR1::trunc;
#endif
diff --git a/libstdc++-v3/include/tr1/memory b/libstdc++-v3/include/tr1/memory
index 0df7b9d7370..7413410bc27 100644
--- a/libstdc++-v3/include/tr1/memory
+++ b/libstdc++-v3/include/tr1/memory
@@ -35,22 +35,22 @@
#ifndef _TR1_MEMORY
#define _TR1_MEMORY 1
-#include "../memory"
-#include <functional> // std::less
-#include <exception> // std::exception
-#include <new> // std::bad_alloc
-#include <typeinfo> // std::type_info in get_deleter
-#include <cstddef> // std::size_t
+#include <cstddef> // std::size_t
+#include <cstdlib> // std::abort
+#include <exception> // std::exception
+#include <new> // std::bad_alloc
+#include <typeinfo> // std::type_info in get_deleter
#include <bits/stl_algobase.h> // std::swap
-#include <iosfwd> // std::basic_ostream
-#include <cstdlib> // std::abort
+#include <iosfwd> // std::basic_ostream
+#include <memory>
#include <ext/atomicity.h>
#include <ext/concurrence.h>
#include <bits/functexcept.h>
+#include <bits/stl_function.h> // std::less
#include <debug/debug.h>
-#include <tr1/type_traits> // tr1::add_reference
+#include <tr1/type_traits> // tr1::add_reference
#include <tr1/boost_shared_ptr.h>
#endif
diff --git a/libstdc++-v3/include/tr1/random b/libstdc++-v3/include/tr1/random
index e8483c7efb9..bfdd90157d2 100644
--- a/libstdc++-v3/include/tr1/random
+++ b/libstdc++-v3/include/tr1/random
@@ -48,7 +48,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// [5.1] Random number generation
diff --git a/libstdc++-v3/include/tr1/random.tcc b/libstdc++-v3/include/tr1/random.tcc
index 3962816c8ce..c5ae93355fa 100644
--- a/libstdc++-v3/include/tr1/random.tcc
+++ b/libstdc++-v3/include/tr1/random.tcc
@@ -33,7 +33,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
/*
* (Further) implementation-space details.
@@ -322,7 +322,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
if (__value == 0)
__value = 19780503;
- std::tr1::linear_congruential<unsigned long, 40014, 0, 2147483563>
+ std::_GLIBCXX_TR1::linear_congruential<unsigned long, 40014, 0, 2147483563>
__lcg(__value);
for (int __i = 0; __i < long_lag; ++__i)
@@ -441,7 +441,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
{
for (int __j = 0; __j < __n; ++__j)
#if _GLIBCXX_USE_C99_MATH_TR1
- _M_npows[__j] = std::tr1::ldexp(_RealType(1), -__w + __j * 32);
+ _M_npows[__j] = std::_GLIBCXX_TR1::ldexp(_RealType(1), -__w + __j * 32);
#else
_M_npows[__j] = std::pow(_RealType(2), -__w + __j * 32);
#endif
@@ -457,7 +457,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 512. Seeding subtract_with_carry_01 from a single unsigned long.
- std::tr1::linear_congruential<unsigned long, 40014, 0, 2147483563>
+ std::_GLIBCXX_TR1::linear_congruential<unsigned long, 40014, 0, 2147483563>
__lcg(__value);
this->seed(__lcg);
@@ -869,13 +869,13 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
{
const _RealType __m = std::floor(_M_mean);
_M_lm_thr = std::log(_M_mean);
- _M_lfm = std::tr1::lgamma(__m + 1);
+ _M_lfm = std::_GLIBCXX_TR1::lgamma(__m + 1);
_M_sm = std::sqrt(__m);
const _RealType __pi_4 = 0.7853981633974483096156608458198757L;
const _RealType __dx = std::sqrt(2 * __m * std::log(32 * __m
/ __pi_4));
- _M_d = std::tr1::round(std::max(_RealType(6),
+ _M_d = std::_GLIBCXX_TR1::round(std::max(_RealType(6),
std::min(__m, __dx)));
const _RealType __cx = 2 * __m + _M_d;
_M_scx = std::sqrt(__cx / 2);
@@ -972,7 +972,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
}
__reject = (__w - __e - __x * _M_lm_thr
- > _M_lfm - std::tr1::lgamma(__x + __m + 1));
+ > _M_lfm - std::_GLIBCXX_TR1::lgamma(__x + __m + 1));
__reject |= __x + __m >= __thr;
@@ -1063,11 +1063,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
const _RealType __d1x =
std::sqrt(__np * __1p * std::log(32 * __np
/ (81 * __pi_4 * __1p)));
- _M_d1 = std::tr1::round(std::max(_RealType(1), __d1x));
+ _M_d1 = std::_GLIBCXX_TR1::round(std::max(_RealType(1), __d1x));
const _RealType __d2x =
std::sqrt(__np * __1p * std::log(32 * _M_t * __1p
/ (__pi_4 * __pa)));
- _M_d2 = std::tr1::round(std::max(_RealType(1), __d2x));
+ _M_d2 = std::_GLIBCXX_TR1::round(std::max(_RealType(1), __d2x));
// sqrt(pi / 2)
const _RealType __spi_2 = 1.2533141373155002512078826424055226L;
@@ -1083,8 +1083,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
const _RealType __s2s = _M_s2 * _M_s2;
_M_s = (_M_a123 + 2 * __s2s / _M_d2
* std::exp(-_M_d2 * _M_d2 / (2 * __s2s)));
- _M_lf = (std::tr1::lgamma(__np + 1)
- + std::tr1::lgamma(_M_t - __np + 1));
+ _M_lf = (std::_GLIBCXX_TR1::lgamma(__np + 1)
+ + std::_GLIBCXX_TR1::lgamma(_M_t - __np + 1));
_M_lp1p = std::log(__pa / __1p);
_M_q = -std::log(1 - (__p12 - __pa) / __1p);
@@ -1212,8 +1212,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
if (!__reject)
{
const _RealType __lfx =
- std::tr1::lgamma(__np + __x + 1)
- + std::tr1::lgamma(_M_t - (__np + __x) + 1);
+ std::_GLIBCXX_TR1::lgamma(__np + __x + 1)
+ + std::_GLIBCXX_TR1::lgamma(_M_t - (__np + __x) + 1);
__reject = __v > _M_lf - __lfx + __x * _M_lp1p;
}
diff --git a/libstdc++-v3/include/tr1/ref_fwd.h b/libstdc++-v3/include/tr1/ref_fwd.h
index 6c0efbc60e1..96e2b27cd6c 100644
--- a/libstdc++-v3/include/tr1/ref_fwd.h
+++ b/libstdc++-v3/include/tr1/ref_fwd.h
@@ -40,7 +40,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
template<typename _Tp>
class reference_wrapper;
diff --git a/libstdc++-v3/include/tr1/regex b/libstdc++-v3/include/tr1/regex
new file mode 100644
index 00000000000..65600600f95
--- /dev/null
+++ b/libstdc++-v3/include/tr1/regex
@@ -0,0 +1,37 @@
+// class template regex -*- C++ -*-
+
+// Copyright (C) 2007 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// 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.
+
+/** @file tr1/regex
+* This is a TR1 C++ Library header.
+*/
+
+#ifndef _TR1_REGEX
+#define _TR1_REGEX 1
+
+#endif
diff --git a/libstdc++-v3/include/tr1/repeat.h b/libstdc++-v3/include/tr1/repeat.h
index 3f09dd56207..9410d71c47f 100644
--- a/libstdc++-v3/include/tr1/repeat.h
+++ b/libstdc++-v3/include/tr1/repeat.h
@@ -1,6 +1,6 @@
// TR1 code repetition -*- C++ -*-
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2007 Free Software Foundation, Inc.
// Written by Douglas Gregor <doug.gregor -at- gmail.com>
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -115,9 +115,9 @@
#define _GLIBCXX_ARGS_SHIFTED
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1;
@@ -173,9 +173,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2;
@@ -230,9 +230,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3;
@@ -287,9 +287,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4;
@@ -344,9 +344,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple), ::std::_GLIBCXX_TR1::get<4>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5;
@@ -401,9 +401,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple), ::std::_GLIBCXX_TR1::get<4>(__tuple), ::std::_GLIBCXX_TR1::get<5>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6;
@@ -458,9 +458,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple), ::std::_GLIBCXX_TR1::get<4>(__tuple), ::std::_GLIBCXX_TR1::get<5>(__tuple), ::std::_GLIBCXX_TR1::get<6>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7;
@@ -515,9 +515,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; _T8 _M_arg8;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7), _M_arg8(__a8)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple), ::std::tr1::get<7>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple), ::std::_GLIBCXX_TR1::get<4>(__tuple), ::std::_GLIBCXX_TR1::get<5>(__tuple), ::std::_GLIBCXX_TR1::get<6>(__tuple), ::std::_GLIBCXX_TR1::get<7>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T8> _CV(_T8, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7, typename __add_c_ref<_T8>::type __a8
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7), _M_arg8(__in._M_arg8)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; _M_arg8 = __in._M_arg8;
@@ -572,9 +572,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; _T8 _M_arg8; _T9 _M_arg9;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7), _M_arg8(__a8), _M_arg9(__a9)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple), ::std::tr1::get<7>(__tuple), ::std::tr1::get<8>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple), ::std::_GLIBCXX_TR1::get<4>(__tuple), ::std::_GLIBCXX_TR1::get<5>(__tuple), ::std::_GLIBCXX_TR1::get<6>(__tuple), ::std::_GLIBCXX_TR1::get<7>(__tuple), ::std::_GLIBCXX_TR1::get<8>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T8> _CV(_T8, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T9> _CV(_T9, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T9>()(_M_arg9, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T9>()(_M_arg9, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7, typename __add_c_ref<_T8>::type __a8, typename __add_c_ref<_T9>::type __a9
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7), _M_arg8(__in._M_arg8), _M_arg9(__in._M_arg9)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; _M_arg8 = __in._M_arg8; _M_arg9 = __in._M_arg9;
@@ -630,9 +630,9 @@
#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9
#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; _T8 _M_arg8; _T9 _M_arg9; _T10 _M_arg10;
#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7), _M_arg8(__a8), _M_arg9(__a9), _M_arg10(__a10)
-#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple), ::std::tr1::get<7>(__tuple), ::std::tr1::get<8>(__tuple), ::std::tr1::get<9>(__tuple)
+#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::_GLIBCXX_TR1::get<0>(__tuple), ::std::_GLIBCXX_TR1::get<1>(__tuple), ::std::_GLIBCXX_TR1::get<2>(__tuple), ::std::_GLIBCXX_TR1::get<3>(__tuple), ::std::_GLIBCXX_TR1::get<4>(__tuple), ::std::_GLIBCXX_TR1::get<5>(__tuple), ::std::_GLIBCXX_TR1::get<6>(__tuple), ::std::_GLIBCXX_TR1::get<7>(__tuple), ::std::_GLIBCXX_TR1::get<8>(__tuple), ::std::_GLIBCXX_TR1::get<9>(__tuple)
#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T8> _CV(_T8, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T9> _CV(_T9, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T10> _CV(_T10, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type
-#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T9>()(_M_arg9, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T10>()(_M_arg10, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))
+#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T9>()(_M_arg9, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T10>()(_M_arg10, ::std::_GLIBCXX_TR1::tie(_GLIBCXX_BIND_ARGS))
#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7, typename __add_c_ref<_T8>::type __a8, typename __add_c_ref<_T9>::type __a9, typename __add_c_ref<_T10>::type __a10
#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7), _M_arg8(__in._M_arg8), _M_arg9(__in._M_arg9), _M_arg10(__in._M_arg10)
#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; _M_arg8 = __in._M_arg8; _M_arg9 = __in._M_arg9; _M_arg10 = __in._M_arg10;
diff --git a/libstdc++-v3/include/tr1/stdlib.h b/libstdc++-v3/include/tr1/stdlib.h
index 92bc4687c6f..0075cc7bd55 100644
--- a/libstdc++-v3/include/tr1/stdlib.h
+++ b/libstdc++-v3/include/tr1/stdlib.h
@@ -1,6 +1,6 @@
// TR1 stdlib.h -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
@@ -40,13 +40,13 @@
#if _GLIBCXX_USE_C99
-using std::tr1::atoll;
-using std::tr1::strtoll;
-using std::tr1::strtoull;
+using std::_GLIBCXX_TR1::atoll;
+using std::_GLIBCXX_TR1::strtoll;
+using std::_GLIBCXX_TR1::strtoull;
-using std::tr1::abs;
+using std::_GLIBCXX_TR1::abs;
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
-using std::tr1::div;
+using std::_GLIBCXX_TR1::div;
#endif
#endif
diff --git a/libstdc++-v3/include/tr1/tuple b/libstdc++-v3/include/tr1/tuple
index 379631d42f2..ea1d9e22797 100644
--- a/libstdc++-v3/include/tr1/tuple
+++ b/libstdc++-v3/include/tr1/tuple
@@ -41,7 +41,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// An implementation specific class which is used in the tuple class
// when the tuple is not maximum possible size.
diff --git a/libstdc++-v3/include/tr1/tuple_iterate.h b/libstdc++-v3/include/tr1/tuple_iterate.h
index 42ddf54b78a..4a9e494bad2 100644
--- a/libstdc++-v3/include/tr1/tuple_iterate.h
+++ b/libstdc++-v3/include/tr1/tuple_iterate.h
@@ -36,7 +36,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
/// @brief class tuple_size
template<_GLIBCXX_TEMPLATE_PARAMS>
diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits
index 048180150df..996ecf6fd93 100644
--- a/libstdc++-v3/include/tr1/type_traits
+++ b/libstdc++-v3/include/tr1/type_traits
@@ -40,7 +40,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// For use in __in_array and elsewhere.
struct __sfinae_types
diff --git a/libstdc++-v3/include/tr1/type_traits_fwd.h b/libstdc++-v3/include/tr1/type_traits_fwd.h
index 819bb914817..6f8e71a0c32 100644
--- a/libstdc++-v3/include/tr1/type_traits_fwd.h
+++ b/libstdc++-v3/include/tr1/type_traits_fwd.h
@@ -40,7 +40,7 @@
// namespace std::tr1
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
/// @brief helper classes [4.3].
template<typename _Tp, _Tp __v>
diff --git a/libstdc++-v3/include/tr1/unordered_map b/libstdc++-v3/include/tr1/unordered_map
index 50e981ce500..3aca9f5ef9b 100644
--- a/libstdc++-v3/include/tr1/unordered_map
+++ b/libstdc++-v3/include/tr1/unordered_map
@@ -39,7 +39,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// XXX When we get typedef templates these class definitions
// will be unnecessary.
diff --git a/libstdc++-v3/include/tr1/unordered_set b/libstdc++-v3/include/tr1/unordered_set
index 84a24f4a9ae..bd56ead804d 100644
--- a/libstdc++-v3/include/tr1/unordered_set
+++ b/libstdc++-v3/include/tr1/unordered_set
@@ -39,7 +39,7 @@
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
// XXX When we get typedef templates these class definitions
// will be unnecessary.
diff --git a/libstdc++-v3/include/tr1/utility b/libstdc++-v3/include/tr1/utility
index 93e00eb3c94..efe25031d5b 100644
--- a/libstdc++-v3/include/tr1/utility
+++ b/libstdc++-v3/include/tr1/utility
@@ -34,11 +34,11 @@
#ifndef _TR1_UTILITY
#define _TR1_UTILITY 1
-#include "../utility"
+#include <utility>
namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE(tr1)
+_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
template<class _Tp> class tuple_size;
template<int _Int, class _Tp> class tuple_element;