aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2009-08-11 01:24:59 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2009-08-11 01:24:59 +0000
commita00e37691de6f63b71bfe5241d0d04c138f2d9d3 (patch)
treed9f19e67d94abd9d5b4d68307d3031cab2faea10
parent530200265803a8a3c9cd29006e84af2958ae121f (diff)
downloadgcc-a00e37691de6f63b71bfe5241d0d04c138f2d9d3.zip
gcc-a00e37691de6f63b71bfe5241d0d04c138f2d9d3.tar.gz
gcc-a00e37691de6f63b71bfe5241d0d04c138f2d9d3.tar.bz2
hashtable.cc: Just definitions.
2009-08-10 Benjamin Kosnik <bkoz@redhat.com> * src/hashtable.cc: Just definitions. * src/hashtable_c++0x.cc: Compile C++0x versions. * src/hash.cc: Same. * src/hash_c++0x.cc: Same. src/hash_tr1.cc: Compile TR1 versions. src/hashtable_tr1.cc: Same. * src/limits_c++0x.cc: Sync build error handling. * src/Makefile.am (sources): Change hash.cc to hash_tr1.cc, hashtable.cc to hashtable_tr1.cc. * src/Makefile.in: Regenerate. From-SVN: r150641
-rw-r--r--libstdc++-v3/ChangeLog15
-rw-r--r--libstdc++-v3/src/Makefile.am4
-rw-r--r--libstdc++-v3/src/Makefile.in30
-rw-r--r--libstdc++-v3/src/hash.cc21
-rw-r--r--libstdc++-v3/src/hash_c++0x.cc11
-rw-r--r--libstdc++-v3/src/hash_tr1.cc36
-rw-r--r--libstdc++-v3/src/hashtable.cc15
-rw-r--r--libstdc++-v3/src/hashtable_c++0x.cc7
-rw-r--r--libstdc++-v3/src/hashtable_tr1.cc31
-rw-r--r--libstdc++-v3/src/limits_c++0x.cc4
10 files changed, 120 insertions, 54 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c454323..85e3fbe 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,20 @@
2009-08-10 Benjamin Kosnik <bkoz@redhat.com>
+ * src/hashtable.cc: Just definitions.
+ * src/hashtable_c++0x.cc: Compile C++0x versions.
+ * src/hash.cc: Same.
+ * src/hash_c++0x.cc: Same.
+ src/hash_tr1.cc: Compile TR1 versions.
+ src/hashtable_tr1.cc: Same.
+
+ * src/limits_c++0x.cc: Sync build error handling.
+
+ * src/Makefile.am (sources): Change hash.cc to hash_tr1.cc,
+ hashtable.cc to hashtable_tr1.cc.
+ * src/Makefile.in: Regenerate.
+
+2009-08-10 Benjamin Kosnik <bkoz@redhat.com>
+
* include/tr1_impl/functional: Doxygen markup.
* doc/html/*: Regenerate.
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 4295d4d..608ef93 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -144,10 +144,10 @@ sources = \
ctype.cc \
debug.cc \
functexcept.cc \
- hash.cc \
+ hash_tr1.cc \
hash_c++0x.cc \
globals_io.cc \
- hashtable.cc \
+ hashtable_tr1.cc \
hashtable_c++0x.cc \
ios.cc \
ios_failure.cc \
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 9134f04..eb436c8 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -75,17 +75,17 @@ LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__libstdc___la_SOURCES_DIST = atomic.cc bitmap_allocator.cc \
pool_allocator.cc mt_allocator.cc codecvt.cc compatibility.cc \
- complex_io.cc ctype.cc debug.cc functexcept.cc hash.cc \
- hash_c++0x.cc globals_io.cc hashtable.cc hashtable_c++0x.cc \
- ios.cc ios_failure.cc ios_init.cc ios_locale.cc limits.cc \
- limits_c++0x.cc list.cc debug_list.cc locale.cc locale_init.cc \
- locale_facets.cc localename.cc math_stubs_float.cc \
- math_stubs_long_double.cc stdexcept.cc strstream.cc \
- system_error.cc tree.cc allocator-inst.cc concept-inst.cc \
- fstream-inst.cc ext-inst.cc ios-inst.cc iostream-inst.cc \
- istream-inst.cc istream.cc locale-inst.cc misc-inst.cc \
- ostream-inst.cc sstream-inst.cc streambuf-inst.cc streambuf.cc \
- string-inst.cc valarray-inst.cc wlocale-inst.cc \
+ complex_io.cc ctype.cc debug.cc functexcept.cc hash_tr1.cc \
+ hash_c++0x.cc globals_io.cc hashtable_tr1.cc \
+ hashtable_c++0x.cc ios.cc ios_failure.cc ios_init.cc \
+ ios_locale.cc limits.cc limits_c++0x.cc list.cc debug_list.cc \
+ locale.cc locale_init.cc locale_facets.cc localename.cc \
+ math_stubs_float.cc math_stubs_long_double.cc stdexcept.cc \
+ strstream.cc system_error.cc tree.cc allocator-inst.cc \
+ concept-inst.cc fstream-inst.cc ext-inst.cc ios-inst.cc \
+ iostream-inst.cc istream-inst.cc istream.cc locale-inst.cc \
+ misc-inst.cc ostream-inst.cc sstream-inst.cc streambuf-inst.cc \
+ streambuf.cc string-inst.cc valarray-inst.cc wlocale-inst.cc \
wstring-inst.cc mutex.cc condition_variable.cc chrono.cc \
thread.cc future.cc atomicity.cc codecvt_members.cc \
collate_members.cc ctype_members.cc messages_members.cc \
@@ -102,8 +102,8 @@ am__objects_4 = basic_file.lo c++locale.lo $(am__objects_2) \
$(am__objects_3)
am__objects_5 = atomic.lo bitmap_allocator.lo pool_allocator.lo \
mt_allocator.lo codecvt.lo compatibility.lo complex_io.lo \
- ctype.lo debug.lo functexcept.lo hash.lo hash_c++0x.lo \
- globals_io.lo hashtable.lo hashtable_c++0x.lo ios.lo \
+ ctype.lo debug.lo functexcept.lo hash_tr1.lo hash_c++0x.lo \
+ globals_io.lo hashtable_tr1.lo hashtable_c++0x.lo ios.lo \
ios_failure.lo ios_init.lo ios_locale.lo limits.lo \
limits_c++0x.lo list.lo debug_list.lo locale.lo locale_init.lo \
locale_facets.lo localename.lo math_stubs_float.lo \
@@ -397,10 +397,10 @@ sources = \
ctype.cc \
debug.cc \
functexcept.cc \
- hash.cc \
+ hash_tr1.cc \
hash_c++0x.cc \
globals_io.cc \
- hashtable.cc \
+ hashtable_tr1.cc \
hashtable_c++0x.cc \
ios.cc \
ios_failure.cc \
diff --git a/libstdc++-v3/src/hash.cc b/libstdc++-v3/src/hash.cc
index 2c9c113..c776ed5 100644
--- a/libstdc++-v3/src/hash.cc
+++ b/libstdc++-v3/src/hash.cc
@@ -22,24 +22,6 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-#include <cstddef>
-#include <string>
-#include <cmath>
-
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-#include <functional>
-# define _GLIBCXX_BEGIN_NAMESPACE_TR1
-# define _GLIBCXX_END_NAMESPACE_TR1
-#else
-#include <tr1/functional>
-# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
-# define _GLIBCXX_END_NAMESPACE_TR1 }
-#endif
-
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE_TR1
-
// For long double, careful with random padding bits (e.g., on x86,
// 10 bytes -> 12 bytes) and resort to frexp.
template<>
@@ -98,6 +80,3 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
}
#endif
#endif
-
-_GLIBCXX_END_NAMESPACE_TR1
-}
diff --git a/libstdc++-v3/src/hash_c++0x.cc b/libstdc++-v3/src/hash_c++0x.cc
index 27a5765..5bdbf0c 100644
--- a/libstdc++-v3/src/hash_c++0x.cc
+++ b/libstdc++-v3/src/hash_c++0x.cc
@@ -22,11 +22,20 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-#include "hash.cc"
+#include <cstddef>
+#include <string>
+#include <cmath>
+#include <functional>
#include <system_error>
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# error "hash_c++0x.cc must be compiled with -std=gnu++0x"
+#endif
+
namespace std
{
+#include "hash.cc"
+
template<>
size_t
hash<error_code>::operator()(error_code __e) const
diff --git a/libstdc++-v3/src/hash_tr1.cc b/libstdc++-v3/src/hash_tr1.cc
new file mode 100644
index 0000000..54f2b6e
--- /dev/null
+++ b/libstdc++-v3/src/hash_tr1.cc
@@ -0,0 +1,36 @@
+// std::hash definitions -*- C++ -*-
+
+// Copyright (C) 2007, 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#include <cstddef>
+#include <string>
+#include <cmath>
+#include <tr1/functional>
+
+namespace std
+{
+ namespace tr1
+ {
+#include "hash.cc"
+ }
+}
diff --git a/libstdc++-v3/src/hashtable.cc b/libstdc++-v3/src/hashtable.cc
index d490d2e..8bd3afb 100644
--- a/libstdc++-v3/src/hashtable.cc
+++ b/libstdc++-v3/src/hashtable.cc
@@ -22,18 +22,6 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
-# define _GLIBCXX_BEGIN_NAMESPACE_TR1
-# define _GLIBCXX_END_NAMESPACE_TR1
-#else
-# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
-# define _GLIBCXX_END_NAMESPACE_TR1 }
-#endif
-
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE_TR1
-
namespace __detail
{
extern const unsigned long __prime_list[] = // 256 + 1 or 256 + 48 + 1
@@ -101,6 +89,3 @@ namespace __detail
#endif
};
} // namespace __detail
-
-_GLIBCXX_END_NAMESPACE_TR1
-}
diff --git a/libstdc++-v3/src/hashtable_c++0x.cc b/libstdc++-v3/src/hashtable_c++0x.cc
index d6b5960..5a91fde 100644
--- a/libstdc++-v3/src/hashtable_c++0x.cc
+++ b/libstdc++-v3/src/hashtable_c++0x.cc
@@ -22,4 +22,11 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# error "hashtable_c++0x.cc must be compiled with -std=gnu++0x"
+#endif
+
+namespace std
+{
#include "hashtable.cc"
+}
diff --git a/libstdc++-v3/src/hashtable_tr1.cc b/libstdc++-v3/src/hashtable_tr1.cc
new file mode 100644
index 0000000..160fd8e
--- /dev/null
+++ b/libstdc++-v3/src/hashtable_tr1.cc
@@ -0,0 +1,31 @@
+// std::__detail definitions -*- C++ -*-
+
+// Copyright (C) 2007, 2009 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 3, 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.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+namespace std
+{
+ namespace tr1
+ {
+#include "hashtable.cc"
+ }
+}
diff --git a/libstdc++-v3/src/limits_c++0x.cc b/libstdc++-v3/src/limits_c++0x.cc
index adb6e2d..b911bd4 100644
--- a/libstdc++-v3/src/limits_c++0x.cc
+++ b/libstdc++-v3/src/limits_c++0x.cc
@@ -24,6 +24,10 @@
#include <limits>
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# error "limits_c++0x.cc must be compiled with -std=gnu++0x"
+#endif
+
namespace std
{
// char16_t