From a3b2be239fcecf3438a574c1009b658789e741bf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 5 Nov 2013 09:19:27 -0800 Subject: [PATCH] Compile fixes for C++11, from Rene Ladan --- api/boinc_api.cpp | 2 +- client/client_msgs.h | 2 +- client/project.cpp | 2 +- lib/diagnostics.cpp | 1 + lib/gui_rpc_client_print.cpp | 1 + lib/str_util.cpp | 1 + py/Boinc/boinc_db.py | 10 +++++----- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp index 0ee8aa1f35..1ecca387bd 100644 --- a/api/boinc_api.cpp +++ b/api/boinc_api.cpp @@ -120,7 +120,7 @@ using std::vector; // CPPFLAGS=-DGETRUSAGE_IN_TIMER_THREAD #endif -const char* api_version="API_VERSION_"PACKAGE_VERSION; +const char* api_version = "API_VERSION_" PACKAGE_VERSION; static APP_INIT_DATA aid; static FILE_LOCK file_lock; APP_CLIENT_SHM* app_client_shm = 0; diff --git a/client/client_msgs.h b/client/client_msgs.h index 99656c23d4..6449c2bac1 100644 --- a/client/client_msgs.h +++ b/client/client_msgs.h @@ -73,7 +73,7 @@ extern void msg_printf_notice(PROJ_AM *p, bool is_html, const char* link, const __attribute__ ((format (printf, 4, 5))) ; -#define _(x) "_(\""x"\")" +#define _(x) "_(\"" x "\")" extern std::string app_list_string(PROJECT*); diff --git a/client/project.cpp b/client/project.cpp index 06a467a231..ae023b8006 100644 --- a/client/project.cpp +++ b/client/project.cpp @@ -892,7 +892,7 @@ void PROJECT::check_no_rsc_apps() { } } -// set no_X_apps for anonymous platform project +// set no_rsc_apps[] for anonymous platform project // void PROJECT::check_no_apps() { for (int i=0; i #include #include +#include #endif #ifdef _USING_FCGI_ diff --git a/lib/gui_rpc_client_print.cpp b/lib/gui_rpc_client_print.cpp index f5e4a4bfb8..ff8ce55398 100644 --- a/lib/gui_rpc_client_print.cpp +++ b/lib/gui_rpc_client_print.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #endif diff --git a/lib/str_util.cpp b/lib/str_util.cpp index d763268594..85c2eb6b28 100644 --- a/lib/str_util.cpp +++ b/lib/str_util.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #endif diff --git a/py/Boinc/boinc_db.py b/py/Boinc/boinc_db.py index f6a60e73ea..c70d29ee31 100644 --- a/py/Boinc/boinc_db.py +++ b/py/Boinc/boinc_db.py @@ -50,11 +50,6 @@ ASSIGN_NONE = 0 ASSIGN_HOST = 1 ASSIGN_USER = 2 ASSIGN_TEAM = 3 -BATCH_STATE_INIT = 0 -BATCH_STATE_IN_PROGRESS = 1 -BATCH_STATE_COMPLETE = 2 -BATCH_STATE_ABORTED = 3 -BATCH_STATE_RETIRED = 4 GUI_RPC_PORT = 31416 RUN_MODE_ALWAYS = 1 RUN_MODE_AUTO = 2 @@ -119,3 +114,8 @@ RPC_REASON_TRICKLE_UP = 4 RPC_REASON_ACCT_MGR_REQ = 5 RPC_REASON_INIT = 6 RPC_REASON_PROJECT_REQ = 7 +BATCH_STATE_INIT = 0 +BATCH_STATE_IN_PROGRESS = 1 +BATCH_STATE_COMPLETE = 2 +BATCH_STATE_ABORTED = 3 +BATCH_STATE_RETIRED = 4