1diff -rNU3 dist/gold/configure dist.mxm/gold/configure 2--- dist/gold/configure 2014-07-14 18:21:16.292364610 +0200 3+++ dist.mxm/gold/configure 2014-07-14 18:25:08.509642134 +0200 4@@ -7106,6 +7106,20 @@ 5 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 6 7 8+for ac_header in unordered_set unordered_map 9+do : 10+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 11+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 12+eval as_val=\$$as_ac_Header 13+ if test "x$as_val" = x""yes; then : 14+ cat >>confdefs.h <<_ACEOF 15+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 16+_ACEOF 17+ 18+fi 19+ 20+done 21+ 22 for ac_header in tr1/unordered_set tr1/unordered_map 23 do : 24 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 25diff -rNU3 dist/gold/configure.ac dist.mxm/gold/configure.ac 26--- dist/gold/configure.ac 2014-07-14 18:21:16.292364610 +0200 27+++ dist.mxm/gold/configure.ac 2014-07-14 18:15:57.376945885 +0200 28@@ -496,6 +496,7 @@ 29 30 AC_LANG_PUSH(C++) 31 32+AC_CHECK_HEADERS(unordered_set unordered_map) 33 AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) 34 AC_CHECK_HEADERS(ext/hash_map ext/hash_set) 35 AC_CHECK_HEADERS(byteswap.h) 36diff -rNU3 dist/gold/gold.h dist.mxm/gold/gold.h 37--- dist/gold/gold.h 2012-11-09 09:21:28.000000000 +0100 38+++ dist.mxm/gold/gold.h 2014-07-14 18:18:04.885779352 +0200 39@@ -66,7 +66,20 @@ 40 41 // Figure out how to get a hash set and a hash map. 42 43-#if defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \ 44+#if defined(HAVE_UNORDERED_SET) && defined(HAVE_UNORDERED_MAP) 45+ 46+#include <unordered_set> 47+#include <unordered_map> 48+ 49+// We need a template typedef here. 50+ 51+#define Unordered_set std::unordered_set 52+#define Unordered_map std::unordered_map 53+#define Unordered_multimap std::unordered_multimap 54+ 55+#define reserve_unordered_map(map, n) ((map)->rehash(n)) 56+ 57+#elif defined(HAVE_TR1_UNORDERED_SET) && defined(HAVE_TR1_UNORDERED_MAP) \ 58 && defined(HAVE_TR1_UNORDERED_MAP_REHASH) 59 60 #include <tr1/unordered_set> 61diff -rNU3 dist/gold/stringpool.cc dist.mxm/gold/stringpool.cc 62--- dist/gold/stringpool.cc 2010-08-25 10:36:54.000000000 +0200 63+++ dist.mxm/gold/stringpool.cc 2014-07-14 18:19:48.650875718 +0200 64@@ -72,7 +72,10 @@ 65 { 66 this->key_to_offset_.reserve(n); 67 68-#if defined(HAVE_TR1_UNORDERED_MAP) 69+#if defined(HAVE_UNORDERED_MAP) 70+ this->string_set_.rehash(this->string_set_.size() + n); 71+ return; 72+#elif defined(HAVE_TR1_UNORDERED_MAP) 73 // rehash() implementation is broken in gcc 4.0.3's stl 74 //this->string_set_.rehash(this->string_set_.size() + n); 75 //return; 76@@ -499,7 +502,7 @@ 77 void 78 Stringpool_template<Stringpool_char>::print_stats(const char* name) const 79 { 80-#if defined(HAVE_TR1_UNORDERED_MAP) || defined(HAVE_EXT_HASH_MAP) 81+#if defined(HAVE_UNORDERED_MAP) || defined(HAVE_TR1_UNORDERED_MAP) || defined(HAVE_EXT_HASH_MAP) 82 fprintf(stderr, _("%s: %s entries: %zu; buckets: %zu\n"), 83 program_name, name, this->string_set_.size(), 84 this->string_set_.bucket_count()); 85diff -rNU3 dist/gold/config.in dist.mxm/gold/config.in 86--- dist/gold/config.in 2014-07-14 19:21:52.217425468 +0200 87+++ dist.mxm/gold/config.in 2014-07-14 20:08:52.208824229 +0200 88@@ -175,6 +175,12 @@ 89 /* Define to 1 if you have the <unistd.h> header file. */ 90 #undef HAVE_UNISTD_H 91 92+/* Define to 1 if you have the <unordered_map> header file. */ 93+#undef HAVE_UNORDERED_MAP 94+ 95+/* Define to 1 if you have the <unordered_set> header file. */ 96+#undef HAVE_UNORDERED_SET 97+ 98 /* Define to 1 if you have the <windows.h> header file. */ 99 #undef HAVE_WINDOWS_H 100 101diff -rNU3 dist/include/safe-ctype.h dist.mxm/include/safe-ctype.h 102--- dist/include/safe-ctype.h 2008-07-07 19:09:31.000000000 +0200 103+++ dist.mxm/include/safe-ctype.h 2014-07-15 10:49:44.583026808 +0200 104@@ -119,6 +119,7 @@ 105 including another system header (for instance gnulib's stdint.h). 106 So we include ctype.h here and then immediately redefine its macros. */ 107 108+#if !defined(__minix) || !defined(__clang__) 109 #include <ctype.h> 110 #undef isalpha 111 #define isalpha(c) do_not_use_isalpha_with_safe_ctype 112@@ -145,6 +146,34 @@ 113 #undef toupper 114 #define toupper(c) do_not_use_toupper_with_safe_ctype 115 #undef tolower 116-#define tolower(c) do_not_use_tolower_with_safe_ctype 117+#else 118+#include <ctype.h> 119+#undef isalpha 120+#define isalpha(c) ISALPHA(c) 121+#undef isalnum 122+#define isalnum(c) ISALNUM(c) 123+#undef iscntrl 124+#define iscntrl(c) ISCNTRL(c) 125+#undef isdigit 126+#define isdigit(c) ISDIGIT(c) 127+#undef isgraph 128+#define isgraph(c) ISGRAPH(c) 129+#undef islower 130+#define islower(c) ISLOWER(c) 131+#undef isprint 132+#define isprint(c) ISPRINT(c) 133+#undef ispunct 134+#define ispunct(c) ISPUNCT(c) 135+#undef isspace 136+#define isspace(c) ISSPACE(c) 137+#undef isupper 138+#define isupper(c) ISUPPER(c) 139+#undef isxdigit 140+#define isxdigit(c) ISXDIGIT(c) 141+#undef toupper 142+#define toupper(c) TOUPPER(c) 143+#undef tolower 144+#define tolower(c) TOLOWER(c) 145+#endif /* !defined(__minix) || !defined(__clang__) */ 146 147 #endif /* SAFE_CTYPE_H */ 148