diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2014-06-24 22:42:15 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-06-25 14:48:50 +0000 |
commit | 23416aa0131a4ac39a11b5d97497564003138966 (patch) | |
tree | bb2ff12f1d963ce0ef79231a380660e427daca38 /testing/namecoin/31-set-default-env-function.patch | |
parent | 0e05b58d1e8dfe579949be7ab83b4ba698214bf3 (diff) | |
download | aports-23416aa0131a4ac39a11b5d97497564003138966.tar.bz2 aports-23416aa0131a4ac39a11b5d97497564003138966.tar.xz |
testing/namecoin: update to 0.3.75 +QT5
Also patched to build with QT5
Diffstat (limited to 'testing/namecoin/31-set-default-env-function.patch')
-rw-r--r-- | testing/namecoin/31-set-default-env-function.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/namecoin/31-set-default-env-function.patch b/testing/namecoin/31-set-default-env-function.patch new file mode 100644 index 000000000..6615ffb3b --- /dev/null +++ b/testing/namecoin/31-set-default-env-function.patch @@ -0,0 +1,61 @@ +--- namecoin-vQ.3.72/src/init.cpp ++++ namecoin-vQ.3.72/src/init.cpp +@@ -98,6 +98,10 @@ + #ifndef GUI + int main(int argc, char* argv[]) + { ++ #ifndef WIN32 ++ SetupEnvironment(); ++ #endif ++ + bool fRet = false; + fRet = AppInit(argc, argv); + +--- namecoin-vQ.3.72/src/qt/bitcoin.cpp ++++ namecoin-vQ.3.72/src/qt/bitcoin.cpp +@@ -122,6 +122,10 @@ + #ifndef BITCOIN_QT_TEST + int main(int argc, char *argv[]) + { ++ #ifndef WIN32 ++ SetupEnvironment(); ++ #endif ++ + // Command-line options take precedence: + ParseParameters(argc, argv); + +--- namecoin-vQ.3.72/src/util.cpp ++++ namecoin-vQ.3.72/src/util.cpp +@@ -1101,3 +1101,20 @@ + else + return SoftSetArg(strArg, std::string("0")); + } ++ ++#ifndef WIN32 ++void SetupEnvironment() ++{ ++ try ++ { ++ #if BOOST_FILESYSTEM_VERSION == 3 ++ boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid ++ #else // boost filesystem v2 ++ std::locale(); // Raises runtime error if current locale is invalid ++ #endif ++ } catch(std::runtime_error &e) ++ { ++ setenv("LC_ALL", "C", 1); // Force C locale ++ } ++} ++#endif +--- namecoin-vQ.3.72/src/util.h ++++ namecoin-vQ.3.72/src/util.h +@@ -198,6 +198,8 @@ + + void RandAddSeed(); + void RandAddSeedPerfmon(); ++void SetupEnvironment(); ++ + int OutputDebugStringF(const char* pszFormat, ...); + int my_snprintf(char* buffer, size_t limit, const char* format, ...); + + |