Merge Ruby Stuff
[gem5.git] / src / base / hashmap.hh
index b78cc02e87a10a98919696cbf628d147d34a9f5d..ff2aa151fd6eeed7e39d206c96970fd5e21cba28 100644 (file)
@@ -59,7 +59,7 @@ namespace m5 {
 //
 
 namespace __hash_namespace {
-#if !defined(__LP64__) && !defined(__alpha__) && !defined(__SUNPRO_CC)
+#if defined(__APPLE__) || !defined(__LP64__) && !defined(__alpha__) && !defined(__SUNPRO_CC)
     template<>
     struct hash<uint64_t> {
         size_t operator()(uint64_t r) const {
@@ -81,6 +81,16 @@ namespace __hash_namespace {
             return(__stl_hash_string(s.c_str()));
         }
     };
+
+    template <>
+    struct hash<std::pair<std::string, uint64_t> > {
+        size_t operator() (std::pair<std::string, uint64_t> r) const {
+            return (__stl_hash_string(r.first.c_str())) ^ r.second;
+        }
+    };
+
+
+
 }