summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-01 19:15:17 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-01 19:15:17 +0000
commit3c274622fff80c608e7eeb836855cbaffcc2a906 (patch)
tree78cd74b433fb088ae0b5e6944674d57d1ef429ed /libstdc++-v3/src
parentba0b5cfcbe928c833e113105e1caf18d56f481d4 (diff)
downloadgcc-3c274622fff80c608e7eeb836855cbaffcc2a906.tar.gz
* config/abi/pre/gnu.ver: Remove
_ZNKSt3tr14hashIgEclEg@@GLIBCXX_3.4.10 and _ZNKSt4hashIgEclEg@@GLIBCXX_3.4.10 export. * config/os/gnu-linux/ldbl-extra.ver: Export _ZNKSt3tr14hashIgEclEg@@GLIBCXX_LDBL_3.4.10 and _ZNKSt4hashIgEclEg@@GLIBCXX_LDBL_3.4.10. * src/hash.cc: Only define long double hash specialization if _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL is defined. * src/compatibility-ldbl.cc: Include "hash.cc". (_GLIBCXX_LONG_DOUBLE_COMPAT_IMPL): Define. (_ZNKSt4hashIeEclEe): New alias. * testsuite/util/testsuite_abi.cc (check_version): Support GLIBCXX_LDBL_3.4.10. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r--libstdc++-v3/src/compatibility-ldbl.cc13
-rw-r--r--libstdc++-v3/src/hash.cc4
2 files changed, 15 insertions, 2 deletions
diff --git a/libstdc++-v3/src/compatibility-ldbl.cc b/libstdc++-v3/src/compatibility-ldbl.cc
index 108790efabc..a94b227bdae 100644
--- a/libstdc++-v3/src/compatibility-ldbl.cc
+++ b/libstdc++-v3/src/compatibility-ldbl.cc
@@ -1,6 +1,6 @@
// Compatibility symbols for -mlong-double-64 compatibility -*- C++ -*-
-// Copyright (C) 2006
+// Copyright (C) 2006, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -36,6 +36,8 @@
#error "compatibility-ldbl.cc must be compiled with -mlong-double-64"
#endif
+#define _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL
+
namespace std
{
#define C char
@@ -70,4 +72,13 @@ namespace std
#endif
}
+// For std::tr1::hash<long double>::operator ()
+#include "hash.cc"
+
+// std::tr1::hash<long double>::operator ()
+// and std::hash<long double>::operator ()
+// are the same, no need to duplicate them.
+extern "C" void _ZNKSt4hashIeEclEe (void)
+ __attribute__((alias ("_ZNKSt3tr14hashIeEclEe")));
+
#endif
diff --git a/libstdc++-v3/src/hash.cc b/libstdc++-v3/src/hash.cc
index e778e2bf366..372dbf23ccc 100644
--- a/libstdc++-v3/src/hash.cc
+++ b/libstdc++-v3/src/hash.cc
@@ -1,6 +1,6 @@
// std::hash and std::tr1::hash definitions -*- C++ -*-
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 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
@@ -74,6 +74,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
return __result;
};
+#ifndef _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL
template<>
size_t
hash<string>::operator()(string __s) const
@@ -101,6 +102,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
return _Fnv_hash<>::hash(__p, __s.length() * sizeof(wchar_t));
}
#endif
+#endif
_GLIBCXX_END_NAMESPACE_TR1
}