$OpenBSD: patch-src_include_xm_hashmap_h,v 1.3 2019/11/06 16:19:52 cwen Exp $

Related to patches for font display.

unordered_map() was standardised in C++11, before that it was in TR1.
Using the C++11 version fixes the build with base-clang, while still
keeping the TR1 one is needed for building with base-gcc.

Index: src/include/xm_hashmap.h
--- src/include/xm_hashmap.h.orig
+++ src/include/xm_hashmap.h
@@ -1,25 +1,12 @@
 #ifndef __XMHASHMAP_H__
 #define __XMHASHMAP_H__
 
-#ifdef __GNUC__
-#if (__GNUC__ >= 3)
-#include <ext/hash_map>
-  namespace HashNamespace=__gnu_cxx;
-#else
-#include <hash_map>
-#define HashNamespace std
-#endif
-#else // #ifdef __GNUC__
-#include <hash_map>
+#if __cplusplus >= 201103L
+#include <unordered_map>
 namespace HashNamespace=std;
-#endif
-struct hashcmp_str {
-  bool operator()(const char* s1, const char* s2) {
-    if(s1 == NULL || s2 == NULL) {
-      return false;
-    }
-    return strcmp(s1, s2) == 0;
-  }
-};
+#else
+#include <tr1/unordered_map>
+namespace HashNamespace=std::tr1;
+#endif /* __cplusplus >= 201103L */
 
-#endif
+#endif /* _XMHASHMAP_H__ */
