aboutsummaryrefslogtreecommitdiffstats
path: root/community/namecoin/31-set-default-env-function.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/namecoin/31-set-default-env-function.patch')
-rw-r--r--community/namecoin/31-set-default-env-function.patch61
1 files changed, 0 insertions, 61 deletions
diff --git a/community/namecoin/31-set-default-env-function.patch b/community/namecoin/31-set-default-env-function.patch
deleted file mode 100644
index 9af0446cfd..0000000000
--- a/community/namecoin/31-set-default-env-function.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- namecoin-nc*/src/init.cpp
-+++ namecoin-nc*/src/init.cpp
-@@ -99,6 +99,10 @@
- #ifndef GUI
- int main(int argc, char* argv[])
- {
-+ #ifndef WIN32
-+ SetupEnvironment();
-+ #endif
-+
- bool fRet = false;
- fRet = AppInit(argc, argv);
-
---- namecoin-nc*/src/qt/bitcoin.cpp
-+++ namecoin-nc*/src/qt/bitcoin.cpp
-@@ -124,6 +124,10 @@
- #ifndef BITCOIN_QT_TEST
- int main(int argc, char *argv[])
- {
-+ #ifndef WIN32
-+ SetupEnvironment();
-+ #endif
-+
- // Command-line options take precedence:
- ParseParameters(argc, argv);
-
---- namecoin-nc*/src/util.cpp
-+++ namecoin-nc*/src/util.cpp
-@@ -1114,3 +1114,20 @@
- }
- return true;
- }
-+
-+#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-nc0.3.76/src/util.h
-+++ namecoin-nc0.3.76/src.new/util.h
-@@ -211,6 +211,7 @@
-
- void RandAddSeed();
- void RandAddSeedPerfmon();
-+void SetupEnvironment();
- int OutputDebugStringF(const char* pszFormat, ...);
- int my_snprintf(char* buffer, size_t limit, const char* format, ...);
-
-