aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/gold.h')
-rw-r--r--gold/gold.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/gold/gold.h b/gold/gold.h
index 757449f..f52d131 100644
--- a/gold/gold.h
+++ b/gold/gold.h
@@ -23,8 +23,9 @@
# define N_(String) (String)
#endif
-// Figure out how to get a hash set and a hash map. The fallback is
-// to just use set and map.
+// Figure out how to get a hash set and a hash map.
+
+#if HAVE_TR1_UNORDERED_SET && HAVE_TR1_UNORDERED_MAP
#include <tr1/unordered_set>
#include <tr1/unordered_map>
@@ -34,6 +35,26 @@
#define Unordered_set std::tr1::unordered_set
#define Unordered_map std::tr1::unordered_map
+#elif HAVE_EXT_HASH_MAP && HAVE_EXT_HASH_SET
+
+#include <ext/hash_map>
+#include <ext/hash_set>
+
+#define Unordered_set __gnu_cxx::hash_set
+#define Unordered_map __gnu_cxx::hash_map
+
+#else
+
+// The fallback is to just use set and map.
+
+#include <set>
+#include <map>
+
+#define Unordered_set std::set
+#define Unordered_map std::map
+
+#endif
+
namespace gold
{