From 7d6b76e1d1c81888c45ef3888e1d98122dd0a551 Mon Sep 17 00:00:00 2001 From: Benjamin Goose Date: Thu, 20 Oct 2011 08:46:29 +0200 Subject: [PATCH 1/3] Include for std::istream. --- lib/tokenize.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tokenize.h b/lib/tokenize.h index 848edf31f..f7dad0fe1 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -27,6 +27,7 @@ #include #include #include +#include class Token; class ErrorLogger; From 463b105d984d2adae178567ff05a25c696496428 Mon Sep 17 00:00:00 2001 From: Benjamin Goose Date: Thu, 20 Oct 2011 09:01:58 +0200 Subject: [PATCH 2/3] Add condition for HP-UX. --- lib/path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/path.cpp b/lib/path.cpp index f31bfd665..f1c26aec0 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -96,7 +96,7 @@ std::string Path::simplifyPath(const char *originalPath) bool Path::sameFileName(const std::string &fname1, const std::string &fname2) { -#if defined(__linux__) || defined(__sun) +#if defined(__linux__) || defined(__sun) || defined(__hpux) return bool(fname1 == fname2); #elif defined(__GNUC__) return bool(strcasecmp(fname1.c_str(), fname2.c_str()) == 0); From 3f25bd95308e7b965ab9041890e47743793fa0b5 Mon Sep 17 00:00:00 2001 From: Benjamin Goose Date: Thu, 20 Oct 2011 09:02:20 +0200 Subject: [PATCH 3/3] Qualify fill_n properly. Relying on ADL isn't a good idea as it's not always well implemented. --- lib/symboldatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 1450e335e..e2732fa99 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -686,7 +686,7 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti // create variable symbol table _variableList.resize(_tokenizer->varIdCount() + 1); - fill_n(_variableList.begin(), _variableList.size(), (const Variable*)NULL); + std::fill_n(_variableList.begin(), _variableList.size(), (const Variable*)NULL); // check all scopes for variables for (it = scopeList.begin(); it != scopeList.end(); ++it) {