aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-07-08 16:14:56 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-07-08 16:14:56 +0000
commitd882773789ea3894de7163f7bb880c5b23072882 (patch)
tree23e8847e09abe899fa9cba862f96e7d924dc484c /rpc.cpp
parentd77eac25b2ecd8e6ff5619cfa57d0ebc0682ed09 (diff)
downloadbitcoin-d882773789ea3894de7163f7bb880c5b23072882.tar.xz
Laszlo's fix to make generate threads idle priority on Linux,
replaced some wxBase dependencies: wxMutex, wxFileExists, wxStandardPaths, wxGetLocalTimeMillis git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@99 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/rpc.cpp b/rpc.cpp
index a9f16e6354..4408d36347 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -927,20 +927,22 @@ int CommandLineRPC(int argc, char *argv[])
string strResult = (result.type() == str_type ? result.get_str() : write_string(result, true));
if (result.type() != null_type)
{
- if (fWindows && fGUI)
- // Windows GUI apps can't print to command line,
- // so settle for a message box yuck
- MyMessageBox(strResult.c_str(), "Bitcoin", wxOK);
- else
- fprintf(stdout, "%s\n", strResult.c_str());
+#if defined(__WXMSW__) && wxUSE_GUI
+ // Windows GUI apps can't print to command line,
+ // so settle for a message box yuck
+ MyMessageBox(strResult.c_str(), "Bitcoin", wxOK);
+#else
+ fprintf(stdout, "%s\n", strResult.c_str());
+#endif
}
return 0;
}
catch (std::exception& e) {
- if (fWindows && fGUI)
- MyMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
- else
- fprintf(stderr, "error: %s\n", e.what());
+#if defined(__WXMSW__) && wxUSE_GUI
+ MyMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
+#else
+ fprintf(stderr, "error: %s\n", e.what());
+#endif
} catch (...) {
PrintException(NULL, "CommandLineRPC()");
}