aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-04-15 21:15:48 -0400
committerLuke Dashjr <luke-jr+git@utopios.org>2012-04-15 21:15:48 -0400
commit3374c3ef094b328e6c6957fdaf5a9abff0c53a33 (patch)
tree2c31367efc456d8a77d235be53612190e184b554 /src/util.cpp
parent1bdfa94a0164f73b453633861b91c67bb6bf10d8 (diff)
parente73b792b1af9d9d747bac81a27d16020ed393905 (diff)
downloadbitcoin-3374c3ef094b328e6c6957fdaf5a9abff0c53a33.tar.xz
Merge branch '0.5.x' into 0.6.0.x
Conflicts: src/qt/bitcoin.cpp src/qt/bitcoingui.cpp src/qt/guiutil.cpp src/qt/guiutil.h src/qt/sendcoinsdialog.cpp src/qt/sendcoinsdialog.h src/util.cpp
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 08752e6930..5ba650420b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5,6 +5,17 @@
#include "headers.h"
#include "strlcpy.h"
#include <boost/algorithm/string/join.hpp>
+
+// Work around clang compilation problem in Boost 1.46:
+// /usr/include/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup
+// See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options
+// http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION
+namespace boost {
+ namespace program_options {
+ std::string to_internal(const std::string&);
+ }
+}
+
#include <boost/program_options/detail/config_file.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/filesystem.hpp>
@@ -637,7 +648,7 @@ vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
while (1)
{
- int dec = decode64_table[*p];
+ int dec = decode64_table[(unsigned char)*p];
if (dec == -1) break;
p++;
switch (mode)
@@ -677,12 +688,12 @@ vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
break;
case 2: // 4n+2 base64 characters processed: require '=='
- if (left || p[0] != '=' || p[1] != '=' || decode64_table[p[2]] != -1)
+ if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1)
*pfInvalid = true;
break;
case 3: // 4n+3 base64 characters processed: require '='
- if (left || p[0] != '=' || decode64_table[p[1]] != -1)
+ if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1)
*pfInvalid = true;
break;
}