From 2d131d24f81c826cff7334a3d7780915ddca8d08 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 30 Apr 2013 22:16:12 +0000 Subject: Avoid conflicts with std::hash and std::ref in C++11. --- devel/doc++/distinfo | 9 +-- devel/doc++/patches/patch-src_McHashTable.h | 49 ++++++++++++++++ devel/doc++/patches/patch-src_doc2dbsgml.ll | 49 +++++++++++++++- devel/doc++/patches/patch-src_doc2dbxml.ll | 49 +++++++++++++++- devel/doc++/patches/patch-src_doc2tex.ll | 87 ++++++++++++++++++++++++++++- 5 files changed, 233 insertions(+), 10 deletions(-) create mode 100644 devel/doc++/patches/patch-src_McHashTable.h (limited to 'devel') diff --git a/devel/doc++/distinfo b/devel/doc++/distinfo index 0af7bc1fe8b..33779aca075 100644 --- a/devel/doc++/distinfo +++ b/devel/doc++/distinfo @@ -1,17 +1,18 @@ -$NetBSD: distinfo,v 1.8 2012/02/16 18:36:34 hans Exp $ +$NetBSD: distinfo,v 1.9 2013/04/30 22:16:12 joerg Exp $ SHA1 (doc++-3.4.10.tar.gz) = 2102e99152ab91d80d7977fa5e13dd6f6043b2c8 RMD160 (doc++-3.4.10.tar.gz) = 85b14d32e2932ceb465f1bab16eb8389cd22d72d Size (doc++-3.4.10.tar.gz) = 408887 bytes SHA1 (patch-aa) = d71fd3064b9795ed1c82044c2b42f34f166f0061 SHA1 (patch-docify) = e38383e7be4c7d2c224c90f97317d0bdbe98685f +SHA1 (patch-src_McHashTable.h) = 1eed1da7965056ed3b6db474f38b608a019c5955 SHA1 (patch-src_comment.ll) = 1f402293b1eb5ad9b776fb26e1a37a4ffa0b4f9b SHA1 (patch-src_cpp.ll) = ca9b97fd2b9ab9552b56cd679111d1d7bed01648 SHA1 (patch-src_datahashtable.h) = d746bfe674d751edaea9c148784b5ba96a95a65e SHA1 (patch-src_doc.ll) = 010251cda95ca5afb19d40293f523023eb70d1bd -SHA1 (patch-src_doc2dbsgml.ll) = 988fe3bb63d002bf431e96dbb0a4afbb4c6084a8 -SHA1 (patch-src_doc2dbxml.ll) = 20e3e1cf750b5abd7ad2f27439090f5cd716fce4 -SHA1 (patch-src_doc2tex.ll) = 3215a67b145772e99bf071788e4acd75df8b68a5 +SHA1 (patch-src_doc2dbsgml.ll) = 9001423d5dc8f154171010859a9c1891f182e0b7 +SHA1 (patch-src_doc2dbxml.ll) = 2aec10f16e0c60746ea1444190f229268c5e98cf +SHA1 (patch-src_doc2tex.ll) = 9d717fc2b2c5a80085555bbd02245a2d95806b84 SHA1 (patch-src_html.cc) = 5d350abe9197b91a1f4b0f09272a2dfc066538c3 SHA1 (patch-src_java.ll) = b6f3afb5de5c29d20b6b69582ae1fc71f31a61c9 SHA1 (patch-src_main.cc) = a78300cea46ddb1edfafd09f6b15277beeed512e diff --git a/devel/doc++/patches/patch-src_McHashTable.h b/devel/doc++/patches/patch-src_McHashTable.h new file mode 100644 index 00000000000..54ae1f97bad --- /dev/null +++ b/devel/doc++/patches/patch-src_McHashTable.h @@ -0,0 +1,49 @@ +$NetBSD: patch-src_McHashTable.h,v 1.1 2013/04/30 22:16:12 joerg Exp $ + +--- src/McHashTable.h.orig 2013-04-30 19:49:36.000000000 +0000 ++++ src/McHashTable.h +@@ -113,7 +113,7 @@ public: + /// Returns pointer to associated value if key does exist, 0 otherwise. + Value* lookup(const Key& key) + { +- Item* item = bucketList[hash(key) & mask]; ++ Item* item = bucketList[::hash(key) & mask]; + while(item) + { + if(compare(item->key, key) == 0) +@@ -191,7 +191,7 @@ McHashTable::~McHashTable() + template + int McHashTable::insert(const Key& key, const Value& value) + { +- int i = hash(key) & mask; ++ int i = ::hash(key) & mask; + Item* item = bucketList[i]; + + while(item) +@@ -217,7 +217,7 @@ int McHashTable::insert(const + template + Value* McHashTable::insert(const Key& key) + { +- int i = hash(key) & mask; ++ int i = ::hash(key) & mask; + Item *item = bucketList[i]; + + while(item) +@@ -240,7 +240,7 @@ Value* McHashTable::insert(co + template + int McHashTable::remove(const Key& key) + { +- int i = hash(key) & mask; ++ int i = ::hash(key) & mask; + Item* item = bucketList[i]; + + if(item == 0) +@@ -283,7 +283,7 @@ void McHashTable::rebuildTabl + Item *item = oldList[i]; + while(item) + { +- int k = hash(item->key) & mask; ++ int k = ::hash(item->key) & mask; + Item* next = bucketList[k]; + Item* oldNext = item->next; + bucketList[k] = item; diff --git a/devel/doc++/patches/patch-src_doc2dbsgml.ll b/devel/doc++/patches/patch-src_doc2dbsgml.ll index d53bfadb72f..05eb4d2c077 100644 --- a/devel/doc++/patches/patch-src_doc2dbsgml.ll +++ b/devel/doc++/patches/patch-src_doc2dbsgml.ll @@ -1,6 +1,6 @@ -$NetBSD: patch-src_doc2dbsgml.ll,v 1.1 2011/11/25 21:38:09 joerg Exp $ +$NetBSD: patch-src_doc2dbsgml.ll,v 1.2 2013/04/30 22:16:12 joerg Exp $ ---- src/doc2dbsgml.ll.orig 2011-11-25 17:19:15.000000000 +0000 +--- src/doc2dbsgml.ll.orig 2002-05-09 06:11:14.000000000 +0000 +++ src/doc2dbsgml.ll @@ -22,12 +22,14 @@ @@ -19,3 +19,48 @@ $NetBSD: patch-src_doc2dbsgml.ll,v 1.1 2011/11/25 21:38:09 joerg Exp $ #include "classgraph.h" #include "doc.h" +@@ -53,7 +55,7 @@ static int skip = 0; + static int tab = 0; + static int yyLineNr = 0; + static Entry* ref = 0; +-static Entry* noref = ref + 1; ++static Entry* noref = ::ref + 1; + static char yyFileName[264]; + static bool mathmode = false; + static int tabFlag = 0; +@@ -142,28 +144,28 @@ static void closeVerbMode() + } + + [^}]* { +- if(ref == 0) ++ if(::ref == 0) + { + McString tmp = yytext; +- ref = getRefEntry(tmp, current); ++ ::ref = getRefEntry(tmp, current); + } + REJECT; + } + + "}" { +- if(ref && ref != noref) ++ if(::ref && ::ref != noref) + { + fprintf(out, " ($\\rightarrow$ "); +- if(MAKE_DOC(ref)) ++ if(MAKE_DOC(::ref)) + { +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, ","); + } + fprintf(out, " {\\em page }\\pageref{cxx."); +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, "})"); + } +- ref = 0; ++ ::ref = 0; + BEGIN(0); + } + diff --git a/devel/doc++/patches/patch-src_doc2dbxml.ll b/devel/doc++/patches/patch-src_doc2dbxml.ll index 9fd89532156..f42837687e6 100644 --- a/devel/doc++/patches/patch-src_doc2dbxml.ll +++ b/devel/doc++/patches/patch-src_doc2dbxml.ll @@ -1,6 +1,6 @@ -$NetBSD: patch-src_doc2dbxml.ll,v 1.1 2011/11/25 21:38:09 joerg Exp $ +$NetBSD: patch-src_doc2dbxml.ll,v 1.2 2013/04/30 22:16:12 joerg Exp $ ---- src/doc2dbxml.ll.orig 2011-11-25 17:19:02.000000000 +0000 +--- src/doc2dbxml.ll.orig 2002-05-09 06:11:14.000000000 +0000 +++ src/doc2dbxml.ll @@ -25,12 +25,14 @@ @@ -19,3 +19,48 @@ $NetBSD: patch-src_doc2dbxml.ll,v 1.1 2011/11/25 21:38:09 joerg Exp $ #include "classgraph.h" #include "doc.h" +@@ -56,7 +58,7 @@ static int skip = 0; + static int tab = 0; + static int yyLineNr = 0; + static Entry* ref = 0; +-static Entry* noref = ref + 1; ++static Entry* noref = ::ref + 1; + static char yyFileName[264]; + static bool mathmode = false; + static int tabFlag = 0; +@@ -145,28 +147,28 @@ static void closeVerbMode() + } + + [^}]* { +- if(ref == 0) ++ if(::ref == 0) + { + McString tmp = yytext; +- ref = getRefEntry(tmp, current); ++ ::ref = getRefEntry(tmp, current); + } + REJECT; + } + + "}" { +- if(ref && ref != noref) ++ if(::ref && ::ref != noref) + { + fprintf(out, " ($\\rightarrow$ "); +- if(MAKE_DOC(ref)) ++ if(MAKE_DOC(::ref)) + { +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, ","); + } + fprintf(out, " {\\em page }\\pageref{cxx."); +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, "})"); + } +- ref = 0; ++ ::ref = 0; + BEGIN(0); + } + diff --git a/devel/doc++/patches/patch-src_doc2tex.ll b/devel/doc++/patches/patch-src_doc2tex.ll index eed0873d4ec..2e2c728cad7 100644 --- a/devel/doc++/patches/patch-src_doc2tex.ll +++ b/devel/doc++/patches/patch-src_doc2tex.ll @@ -1,6 +1,6 @@ -$NetBSD: patch-src_doc2tex.ll,v 1.1 2011/11/25 21:38:09 joerg Exp $ +$NetBSD: patch-src_doc2tex.ll,v 1.2 2013/04/30 22:16:12 joerg Exp $ ---- src/doc2tex.ll.orig 2011-11-25 17:20:38.000000000 +0000 +--- src/doc2tex.ll.orig 2000-11-05 16:21:16.000000000 +0000 +++ src/doc2tex.ll @@ -23,8 +23,8 @@ @@ -22,3 +22,86 @@ $NetBSD: patch-src_doc2tex.ll,v 1.1 2011/11/25 21:38:09 joerg Exp $ #define YY_DECL int yylex() #undef YY_INPUT +@@ -58,7 +60,7 @@ static int yyLineNr = 0; + static int texBracketCount = 0; + static McString refStr = ""; + static Entry* ref = 0; +-static Entry* noref = ref + 1; ++static Entry* noref = ::ref + 1; + static char yyFileName[264]; + bool mathmode = false; + static int tabFlag = 0; +@@ -184,30 +186,30 @@ static void closeVerbMode() + } + + [^}]* { +- if(ref == 0) ++ if(::ref == 0) + { + refStr = McString(yytext, 0, yyleng - 2); +- ref = getRefEntry(refStr, current); ++ ::ref = getRefEntry(refStr, current); + } + REJECT; + } + + "}" { +- if(ref && ref != noref) ++ if(::ref && ::ref != noref) + { + fprintf(out, " ($\\rightarrow$ "); +- if(MAKE_DOC(ref)) ++ if(MAKE_DOC(::ref)) + { +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, ","); + } + fprintf(out, " {\\em page }\\pageref{cxx."); +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, "})"); + } + else + fprintf(out, refStr.c_str()); +- ref = 0; ++ ::ref = 0; + refStr.clear(); + BEGIN(0); + } +@@ -244,28 +246,28 @@ static void closeVerbMode() + } + + [^ ]* { +- if(ref == 0) ++ if(::ref == 0) + { + McString tmp = yytext; +- ref = getRefEntry(tmp, current); ++ ::ref = getRefEntry(tmp, current); + } + REJECT; + } + + "}" { +- if(ref && ref != noref) ++ if(::ref && ::ref != noref) + { + fprintf(out, " ($\\rightarrow$ "); +- if(MAKE_DOC(ref)) ++ if(MAKE_DOC(::ref)) + { +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, ","); + } + fprintf(out, " {\\em page }\\pageref{cxx."); +- ref->dumpNumber(out); ++ ::ref->dumpNumber(out); + fprintf(out, "})"); + } +- ref = 0; ++ ::ref = 0; + BEGIN(0); + } + -- cgit v1.2.3