aboutsummaryrefslogtreecommitdiff
path: root/util.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-05 04:41:36 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-05 04:41:36 +0000
commite4c05d31778a85014b2a52e2f20753b38dfbf950 (patch)
tree8b82ec196f05e1297dd87e0d857507f8ea1cf975 /util.cpp
parentb7362c07ae42ac4282361ee95b82424d502f1b82 (diff)
unix build merged in, bitmap resources from xpm instead of rc, better addr relay, better selection of addrs by time last seen for faster connect
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@32 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'util.cpp')
-rw-r--r--util.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/util.cpp b/util.cpp
index 23b59f11f7..d2e624d676 100644
--- a/util.cpp
+++ b/util.cpp
@@ -38,8 +38,10 @@ public:
ppmutexOpenSSL[i] = new wxMutex();
CRYPTO_set_locking_callback(locking_callback);
+#ifdef __WXMSW__
// Seed random number generator with screen scrape and other hardware sources
RAND_screen();
+#endif
// Seed random number generator with performance counter
RandAddSeed();
@@ -325,8 +327,8 @@ void ParseParameters(int argc, char* argv[])
pszValue = strchr(psz, '=');
*pszValue++ = '\0';
}
- strlwr(psz);
#ifdef __WXMSW__
+ _strlwr(psz);
if (psz[0] == '/')
psz[0] = '-';
#endif
@@ -343,9 +345,13 @@ void ParseParameters(int argc, char* argv[])
void FormatException(char* pszMessage, std::exception* pex, const char* pszThread)
{
+#ifdef __WXMSW__
char pszModule[MAX_PATH];
pszModule[0] = '\0';
GetModuleFileName(NULL, pszModule, sizeof(pszModule));
+#else
+ const char* pszModule = wxStandardPaths::Get().GetExecutablePath().mb_str();
+#endif
if (pex)
snprintf(pszMessage, 1000,
"EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, pszThread);