On Tue, Jun 16, 2009 at 11:51:52AM -0300, Nicolás Alvarez wrote: >> What is the error message? The correct fix is to include config.h from >> every C/C++ source files, and never from headers. > > http://boinc.berkeley.edu/trac/ticket/908
Could you try this patch? It does not address str_util.h yet, but it should solve the build error. Gabor commit a5008e5a53ebd69c46bd7b42ad0432f73fb8acaa Author: Gábor Gombás <gomb...@sztaki.hu> Date: Tue Jun 16 17:49:36 2009 +0200 Include config.h from every C++ source file Also add the usual #ifdef HAVE_CONFIG_H surrounding. diff --git a/sched/assimilator.cpp b/sched/assimilator.cpp index 6cc251d..ce40c13 100644 --- a/sched/assimilator.cpp +++ b/sched/assimilator.cpp @@ -21,7 +21,10 @@ // in order to make a complete program. // -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstring> #include <cstdlib> #include <unistd.h> diff --git a/sched/census.cpp b/sched/census.cpp index f8e5b33..11cf1d0 100644 --- a/sched/census.cpp +++ b/sched/census.cpp @@ -20,6 +20,10 @@ // This info is used the feeder to decide how many shared-memory slots // to devote to each HR class. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include "boinc_db.h" diff --git a/sched/db_dump.cpp b/sched/db_dump.cpp index edeb204..957c5c6 100644 --- a/sched/db_dump.cpp +++ b/sched/db_dump.cpp @@ -22,7 +22,10 @@ // All projects export stats in the same format, // as described in the default db_dump_spec.xml that is created for you. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstring> #include <cstdlib> diff --git a/sched/db_purge.cpp b/sched/db_purge.cpp index 54a7662..3bb5fc9 100644 --- a/sched/db_purge.cpp +++ b/sched/db_purge.cpp @@ -30,7 +30,10 @@ // In addition there are index files associating each WU and result ID // with the timestamp of the file it's in. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <unistd.h> #include <sys/stat.h> diff --git a/sched/delete_file.cpp b/sched/delete_file.cpp index 0a0938b..4b1b968 100644 --- a/sched/delete_file.cpp +++ b/sched/delete_file.cpp @@ -24,7 +24,10 @@ // // Run from the project root dir -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <ctime> #if HAVE_UNISTD_H #include <unistd.h> diff --git a/sched/edf_sim.cpp b/sched/edf_sim.cpp index fa7c2cc..835b868 100644 --- a/sched/edf_sim.cpp +++ b/sched/edf_sim.cpp @@ -15,6 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifndef SIM #include "sched_config.h" #include "sched_msgs.h" diff --git a/sched/feeder.cpp b/sched/feeder.cpp index ab10e3c..bacd5f8 100644 --- a/sched/feeder.cpp +++ b/sched/feeder.cpp @@ -89,7 +89,10 @@ // configuration, or decrease the MAX_PLATFORMS, MAX_APPS // MAX_APP_VERSIONS, and MAX_WU_RESULTS in sched_shmem.h -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <cstring> diff --git a/sched/file_deleter.cpp b/sched/file_deleter.cpp index c7f5c3f..4882b5a 100644 --- a/sched/file_deleter.cpp +++ b/sched/file_deleter.cpp @@ -34,7 +34,10 @@ // #define ERROR_INTERVAL 3600 -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <list> #include <cstring> #include <string> diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp index ac60aac..0157acc 100644 --- a/sched/file_upload_handler.cpp +++ b/sched/file_upload_handler.cpp @@ -19,7 +19,10 @@ // See doc/upload.php for protocol spec. // -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdlib> #include <cstring> #include <ctime> diff --git a/sched/get_file.cpp b/sched/get_file.cpp index 4097a5b..05907e3 100644 --- a/sched/get_file.cpp +++ b/sched/get_file.cpp @@ -24,7 +24,9 @@ // // Run from the project root dir. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #if HAVE_UNISTD_H #include <unistd.h> diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp index b62f019..8b0efe4 100644 --- a/sched/handle_request.cpp +++ b/sched/handle_request.cpp @@ -17,7 +17,10 @@ // Handle a scheduling server RPC -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifdef _USING_FCGI_ #include "boinc_fcgi.h" #else diff --git a/sched/hr.cpp b/sched/hr.cpp index 03dfac4..b2c70cf 100644 --- a/sched/hr.cpp +++ b/sched/hr.cpp @@ -15,6 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "error_numbers.h" #include "str_util.h" diff --git a/sched/hr_info.cpp b/sched/hr_info.cpp index 87271f6..fe48dcb 100644 --- a/sched/hr_info.cpp +++ b/sched/hr_info.cpp @@ -14,6 +14,11 @@ // // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifndef _USING_FCGI_ #include <cstdio> #else diff --git a/sched/main.cpp b/sched/main.cpp index b5606c9..b63ed29 100644 --- a/sched/main.cpp +++ b/sched/main.cpp @@ -23,7 +23,10 @@ // (touch) the file 'debug_sched' in the project root directory. // -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cassert> #ifdef _USING_FCGI_ #include "boinc_fcgi.h" diff --git a/sched/make_work.cpp b/sched/make_work.cpp index 10671ac..e0fec5c 100644 --- a/sched/make_work.cpp +++ b/sched/make_work.cpp @@ -27,7 +27,10 @@ // Clones the WU of the given name. // -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <cstring> diff --git a/sched/message_handler.cpp b/sched/message_handler.cpp index 15f45de..921e3b6 100644 --- a/sched/message_handler.cpp +++ b/sched/message_handler.cpp @@ -26,7 +26,10 @@ // return nonzero on error -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <unistd.h> #include <cstdlib> #include <string> diff --git a/sched/request_file_list.cpp b/sched/request_file_list.cpp index 56ba692..ce9612a 100644 --- a/sched/request_file_list.cpp +++ b/sched/request_file_list.cpp @@ -24,7 +24,10 @@ // // Run this in the project root dir -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <unistd.h> #include <stdlib.h> #include <string> diff --git a/sched/sample_assimilator.cpp b/sched/sample_assimilator.cpp index ebe551e..1b71868 100644 --- a/sched/sample_assimilator.cpp +++ b/sched/sample_assimilator.cpp @@ -19,6 +19,10 @@ // 1) if success, copy the output file(s) to a directory // 2) if failure, append a message to an error log +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <vector> #include <string> #include <cstdlib> diff --git a/sched/sample_bitwise_validator.cpp b/sched/sample_bitwise_validator.cpp index 0279e35..682bf7e 100644 --- a/sched/sample_bitwise_validator.cpp +++ b/sched/sample_bitwise_validator.cpp @@ -21,7 +21,10 @@ // 1) your application does no floating-point math, or // 2) you use homogeneous redundancy -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "util.h" #include "sched_util.h" #include "sched_msgs.h" diff --git a/sched/sample_dummy_assimilator.cpp b/sched/sample_dummy_assimilator.cpp index ad2b235..d835d99 100644 --- a/sched/sample_dummy_assimilator.cpp +++ b/sched/sample_dummy_assimilator.cpp @@ -17,7 +17,10 @@ // A sample assimilator that only writes a log message. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <string> diff --git a/sched/sample_trivial_validator.cpp b/sched/sample_trivial_validator.cpp index 61a9fcc..2eeb728 100644 --- a/sched/sample_trivial_validator.cpp +++ b/sched/sample_trivial_validator.cpp @@ -18,8 +18,11 @@ // A sample validator that grants credit to any result whose CPU time is above // a certain minimum +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdlib> -#include "config.h" #include "validate_util.h" using std::vector; diff --git a/sched/sample_work_generator.cpp b/sched/sample_work_generator.cpp index be44f98..9b69f3d 100644 --- a/sched/sample_work_generator.cpp +++ b/sched/sample_work_generator.cpp @@ -27,6 +27,10 @@ // the file (and the workunit names) contain a timestamp // and sequence number, so that they're unique. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <unistd.h> #include <cstdlib> #include <string> diff --git a/sched/sched_array.cpp b/sched/sched_array.cpp index 298c12c..3d1ac31 100644 --- a/sched/sched_array.cpp +++ b/sched/sched_array.cpp @@ -17,11 +17,14 @@ // scheduler code related to sending work +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdlib> #include <string> #include <cstring> -#include "config.h" #include "main.h" #include "server_types.h" #include "sched_shmem.h" diff --git a/sched/sched_assign.cpp b/sched/sched_assign.cpp index ad1d38d..64aa483 100644 --- a/sched/sched_assign.cpp +++ b/sched/sched_assign.cpp @@ -15,7 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. // -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #ifdef _USING_FCGI_ #include "boinc_fcgi.h" diff --git a/sched/sched_config.cpp b/sched/sched_config.cpp index 8cb57e2..015a662 100644 --- a/sched/sched_config.cpp +++ b/sched/sched_config.cpp @@ -17,6 +17,10 @@ // Parse a server configuration file +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifdef _USING_FCGI_ #include "boinc_fcgi.h" #endif diff --git a/sched/sched_driver.cpp b/sched/sched_driver.cpp index b6a2823..dfe349c 100644 --- a/sched/sched_driver.cpp +++ b/sched/sched_driver.cpp @@ -40,6 +40,10 @@ #define HOSTID "7" // ID of a host belonging to that user +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <vector> #include "util.h" diff --git a/sched/sched_hr.cpp b/sched/sched_hr.cpp index 296babd..370ef1c 100644 --- a/sched/sched_hr.cpp +++ b/sched/sched_hr.cpp @@ -17,7 +17,10 @@ // scheduler code related to homogeneous redundancy -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <ctime> #include <cstdio> #include <stdlib.h> diff --git a/sched/sched_locality.cpp b/sched/sched_locality.cpp index d24933f..7e83bf3 100644 --- a/sched/sched_locality.cpp +++ b/sched/sched_locality.cpp @@ -17,7 +17,10 @@ // Locality scheduling: see doc/sched_locality.php -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <algorithm> #include <climits> diff --git a/sched/sched_msgs.cpp b/sched/sched_msgs.cpp index fedf0fe..d12153d 100644 --- a/sched/sched_msgs.cpp +++ b/sched/sched_msgs.cpp @@ -15,8 +15,11 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string.h> -#include "config.h" #include "sched_msgs.h" SCHED_MSG_LOG log_messages; diff --git a/sched/sched_plan.cpp b/sched/sched_plan.cpp index e1d0010..7098319 100644 --- a/sched/sched_plan.cpp +++ b/sched/sched_plan.cpp @@ -25,6 +25,10 @@ // (and write-protect that) // In either case, put your version under source-code control, e.g. SVN +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "str_util.h" #include "sched_config.h" #include "sched_msgs.h" diff --git a/sched/sched_resend.cpp b/sched/sched_resend.cpp index 9ff0575..b0e9240 100644 --- a/sched/sched_resend.cpp +++ b/sched/sched_resend.cpp @@ -24,7 +24,9 @@ // this result may have been the cause of reset // (need to pass last reset time from client) -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <cstdlib> #include <cstring> diff --git a/sched/sched_result.cpp b/sched/sched_result.cpp index f5ef7d9..844ab96 100644 --- a/sched/sched_result.cpp +++ b/sched/sched_result.cpp @@ -15,6 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "boinc_db.h" #include "str_util.h" #include "parse.h" diff --git a/sched/sched_score.cpp b/sched/sched_score.cpp index 620bb8f..61601a6 100644 --- a/sched/sched_score.cpp +++ b/sched/sched_score.cpp @@ -17,6 +17,10 @@ // Matchmaker scheduling code +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <list> #include "boinc_db.h" diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index c8f1fc8..e88b75c 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -19,7 +19,10 @@ // NOTE: there should be nothing here specific to particular // scheduling policies (array scan, matchmaking, locality) -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <vector> #include <list> #include <string> diff --git a/sched/sched_shmem.cpp b/sched/sched_shmem.cpp index f7e5e73..0dc0d00 100644 --- a/sched/sched_shmem.cpp +++ b/sched/sched_shmem.cpp @@ -19,7 +19,10 @@ // the feeder (which reads from the database) // and instances of the scheduling server -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <cstring> diff --git a/sched/sched_timezone.cpp b/sched/sched_timezone.cpp index e060ee8..47fbeb3 100644 --- a/sched/sched_timezone.cpp +++ b/sched/sched_timezone.cpp @@ -18,7 +18,10 @@ // Scheduler code for directing a client to one of several // download servers based on its time zone -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string> #include <cstdio> #include <cstring> diff --git a/sched/sched_util.cpp b/sched/sched_util.cpp index 1e7e3e9..34ff465 100644 --- a/sched/sched_util.cpp +++ b/sched/sched_util.cpp @@ -15,8 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif -#include "config.h" #include <cstdlib> #include <csignal> #include <cerrno> diff --git a/sched/sched_version.cpp b/sched/sched_version.cpp index 8564b22..b625c2a 100644 --- a/sched/sched_version.cpp +++ b/sched/sched_version.cpp @@ -15,6 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "boinc_db.h" #include "main.h" diff --git a/sched/send_file.cpp b/sched/send_file.cpp index 3c36d7f..e150334 100644 --- a/sched/send_file.cpp +++ b/sched/send_file.cpp @@ -24,7 +24,10 @@ // Create a result entries, initialized to sent, and corresponding // messages to the get the files. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #if HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/sched/server_types.cpp b/sched/server_types.cpp index 23a638a..44f4088 100644 --- a/sched/server_types.cpp +++ b/sched/server_types.cpp @@ -15,7 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdlib> #include <cassert> #include <vector> diff --git a/sched/show_shmem.cpp b/sched/show_shmem.cpp index 39d5dc2..139339c 100644 --- a/sched/show_shmem.cpp +++ b/sched/show_shmem.cpp @@ -17,7 +17,10 @@ // show_shmem: display work_item part of shared-memory structure -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <string> diff --git a/sched/single_job_assimilator.cpp b/sched/single_job_assimilator.cpp index e724659..40aba48 100644 --- a/sched/single_job_assimilator.cpp +++ b/sched/single_job_assimilator.cpp @@ -20,6 +20,10 @@ // - delete job description file // - delete WU template file +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <vector> #include <string> #include <cstdlib> diff --git a/sched/time_stats_log.cpp b/sched/time_stats_log.cpp index e54257d..fc713af 100644 --- a/sched/time_stats_log.cpp +++ b/sched/time_stats_log.cpp @@ -15,6 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <sys/types.h> #include <sys/stat.h> diff --git a/sched/transitioner.cpp b/sched/transitioner.cpp index 4810f60..37d7475 100644 --- a/sched/transitioner.cpp +++ b/sched/transitioner.cpp @@ -26,7 +26,10 @@ // [ -mod n i ] process only WUs with (id mod n) == i // [ -sleep_interval x ] sleep x seconds if nothing to do -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <vector> #include <unistd.h> #include <cstring> diff --git a/sched/trickle_handler.cpp b/sched/trickle_handler.cpp index 31108dc..c6bf2cd 100644 --- a/sched/trickle_handler.cpp +++ b/sched/trickle_handler.cpp @@ -28,7 +28,10 @@ // // return nonzero on error -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <unistd.h> #include "boinc_db.h" diff --git a/sched/update_stats.cpp b/sched/update_stats.cpp index c2d9099..081c17a 100644 --- a/sched/update_stats.cpp +++ b/sched/update_stats.cpp @@ -25,7 +25,11 @@ // Also updates the nusers field of teams // // usage: update_stats [-update_teams] [-update_users] [-update_hosts] -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstring> #include <string> diff --git a/sched/validate_util.cpp b/sched/validate_util.cpp index c4875ca..80dffdd 100644 --- a/sched/validate_util.cpp +++ b/sched/validate_util.cpp @@ -21,8 +21,11 @@ // or that requires strict equality (see sample_bitwise_validator.C) // or that uses fuzzy comparison. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstring> -#include "config.h" #include "error_numbers.h" #include "parse.h" diff --git a/sched/validate_util2.cpp b/sched/validate_util2.cpp index e26f344..ebf8ba6 100644 --- a/sched/validate_util2.cpp +++ b/sched/validate_util2.cpp @@ -20,7 +20,10 @@ // See http://boinc.berkeley.edu/trac/wiki/ValidationSimple // -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <vector> #include <cstdlib> #include <string> diff --git a/sched/validator.cpp b/sched/validator.cpp index 10e2a1e..0901ed6 100644 --- a/sched/validator.cpp +++ b/sched/validator.cpp @@ -31,8 +31,10 @@ // check_set() and check_pair(). // See doc/validate.php for a description. +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif -#include "config.h" #include <unistd.h> #include <climits> #include <cmath> diff --git a/sched/wu_check.cpp b/sched/wu_check.cpp index 719d396..004a10f 100644 --- a/sched/wu_check.cpp +++ b/sched/wu_check.cpp @@ -19,7 +19,10 @@ // look for results with missing input files // -repair change them to server_state OVER, outcome COULDNT_SEND -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <cstring> diff --git a/tools/backend_lib.cpp b/tools/backend_lib.cpp index 15630c5..620efce 100644 --- a/tools/backend_lib.cpp +++ b/tools/backend_lib.cpp @@ -15,7 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #ifdef _USING_FCGI_ #include "boinc_fcgi.h" #else diff --git a/tools/create_work.cpp b/tools/create_work.cpp index 0aac2e0..0e6e781 100644 --- a/tools/create_work.cpp +++ b/tools/create_work.cpp @@ -48,7 +48,10 @@ // [ --assign_team_all ID ] // infile1 infile2 ... -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <cstdlib> #include <cstring> diff --git a/tools/dir_hier_move.cpp b/tools/dir_hier_move.cpp index 6c408a9..c6add40 100644 --- a/tools/dir_hier_move.cpp +++ b/tools/dir_hier_move.cpp @@ -20,7 +20,10 @@ // move files from src_dir (flat) into dst_dir (hierarchical) // with the given fanout -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include <string> #include <cstdlib> diff --git a/tools/dir_hier_path.cpp b/tools/dir_hier_path.cpp index fde8b07..8fc6f52 100644 --- a/tools/dir_hier_path.cpp +++ b/tools/dir_hier_path.cpp @@ -21,7 +21,10 @@ // Prints the absolute path of the file in the download hierarchy, // and creates the directory if needed. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdio> #include "util.h" diff --git a/tools/hr_db_convert.cpp b/tools/hr_db_convert.cpp index 7c20744..37a134c 100644 --- a/tools/hr_db_convert.cpp +++ b/tools/hr_db_convert.cpp @@ -2,7 +2,10 @@ // Converts old-style info (in result table) // to new style (using workseq_next field of workunit) -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "boinc_db.h" const int unspec = 0; diff --git a/tools/kill_wu.cpp b/tools/kill_wu.cpp index bc6e3ad..9e03fd0 100644 --- a/tools/kill_wu.cpp +++ b/tools/kill_wu.cpp @@ -21,7 +21,10 @@ // // Author: Christian Soettrup -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "boinc_db.h" #include <iostream> #include <string> diff --git a/tools/poll_wu.cpp b/tools/poll_wu.cpp index 0142d7d..66beb0f 100644 --- a/tools/poll_wu.cpp +++ b/tools/poll_wu.cpp @@ -31,7 +31,10 @@ // // Author: Christian Soettrup -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "boinc_db.h" #include <iostream> #include <string> diff --git a/tools/process_result_template.cpp b/tools/process_result_template.cpp index 4a35a47..c099e49 100644 --- a/tools/process_result_template.cpp +++ b/tools/process_result_template.cpp @@ -15,7 +15,10 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. -#include "config.h" +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstring> #include <string> #include <cstdlib> diff --git a/tools/sign_executable.cpp b/tools/sign_executable.cpp index 3c10c2d..907a029 100644 --- a/tools/sign_executable.cpp +++ b/tools/sign_executable.cpp @@ -17,11 +17,14 @@ // syntax: sign_executable data_file private_key_file +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <cstdlib> #include <string> #include <cstring> -#include "config.h" #include "crypt.h" #include "backend_lib.h" #include <cstdlib> diff --git a/tools/updater.cpp b/tools/updater.cpp index 9efd513..7c6e812 100644 --- a/tools/updater.cpp +++ b/tools/updater.cpp @@ -38,6 +38,9 @@ // 7) copy files from previous-version dir back to install dir // 8) run the old core client and/or manager +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <stdio.h> #ifdef _WIN32 -- --------------------------------------------------------- MTA SZTAKI Computer and Automation Research Institute Hungarian Academy of Sciences --------------------------------------------------------- _______________________________________________ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.