remove dependency of boinc_api.h on str_replace.h (and hence config.h)

Any files that use strlcpy() or strlcat() must directly include str_replace.h
This commit is contained in:
David Anderson 2013-06-06 17:31:46 -07:00
parent fb437e497e
commit 78f7610f6e
37 changed files with 52 additions and 8 deletions

View File

@ -100,6 +100,7 @@
#include "parse.h"
#include "proc_control.h"
#include "shmem.h"
#include "str_replace.h"
#include "str_util.h"
#include "util.h"

View File

@ -64,6 +64,7 @@ using std::vector;
#include "filesys.h"
#include "parse.h"
#include "shmem.h"
#include "str_replace.h"
#include "str_util.h"
#include "util.h"

View File

@ -25,6 +25,7 @@
#include "error_numbers.h"
#include "filesys.h"
#include "md5_file.h"
#include "str_replace.h"
#include "app.h"
#include "client_msgs.h"

View File

@ -27,6 +27,7 @@
#include "parse.h"
#include "url.h"
#include "filesys.h"
#include "str_replace.h"
#include "client_state.h"
#include "client_msgs.h"

View File

@ -28,6 +28,7 @@
#include "filesys.h"
#include "md5_file.h"
#include "parse.h"
#include "str_replace.h"
#include "str_util.h"
#include "util.h"

View File

@ -32,6 +32,7 @@
#include "filesys.h"
#include "parse.h"
#include "util.h"
#include "str_replace.h"
#include "str_util.h"
#include "client_msgs.h"

View File

@ -20,6 +20,7 @@
// every so often to see if there's a newer client version
#include "filesys.h"
#include "str_replace.h"
#include "client_msgs.h"
#include "client_state.h"

View File

@ -40,6 +40,7 @@ using std::vector;
using std::string;
#include "coproc.h"
#include "str_replace.h"
#include "util.h"
#include "client_msgs.h"

View File

@ -54,6 +54,7 @@
#include "filesys.h"
#include "network.h"
#include "parse.h"
#include "str_replace.h"
#include "str_util.h"
#include "url.h"
#include "util.h"

View File

@ -34,6 +34,7 @@
#include "error_numbers.h"
#include "filesys.h"
#include "parse.h"
#include "str_replace.h"
#include "str_util.h"
#include "client_state.h"

View File

@ -32,6 +32,7 @@
#include "app_ipc.h"
#include "filesys.h"
#include "str_replace.h"
using std::strcpy;

View File

@ -21,6 +21,9 @@
#include "stdwx.h"
#include "Events.h"
#include "str_replace.h"
#include "BOINCGUIApp.h"
#include "MainDocument.h"
#include "NoticeListCtrl.h"

View File

@ -59,6 +59,7 @@
#include "error_numbers.h"
#include "filesys.h"
#include "util.h"
#include "str_replace.h"
#include "parse.h"
#include "diagnostics.h"

View File

@ -22,6 +22,7 @@
#ifndef _WIN32
#include "config.h"
#include <sys/types.h>
#endif
#ifdef __APPLE__
@ -52,4 +53,7 @@ inline int strcasecmp(const char* s1, const char* s2) {
}
#endif
#define safe_strcpy(x, y) strlcpy(x, y, sizeof(x))
#define safe_strcat(x, y) strlcat(x, y, sizeof(x))
#endif

View File

@ -21,8 +21,6 @@
#include <string>
#include <string.h>
#include "str_replace.h"
extern void strcpy_overlap(char*, const char*);
extern int ndays_to_string(double x, int smallest_timescale, char *buf);
extern void nbytes_to_string(double nbytes, double total_bytes, char* str, int len);
@ -30,8 +28,6 @@ extern int parse_command_line(char*, char**);
extern void c2x(char *what);
extern void strip_whitespace(char *str);
extern void strip_whitespace(std::string&);
#define safe_strcpy(x, y) strlcpy(x, y, sizeof(x))
#define safe_strcat(x, y) if (strlen(x)+strlen(y)<sizeof(x)) strcat(x, y)
extern char* time_to_string(double);
extern char* precision_time_to_string(double);
extern void secs_to_hmsf(double, char*);

View File

@ -32,6 +32,7 @@
#include "parse.h"
#include "util.h"
#include "error_numbers.h"
#include "str_replace.h"
#include "str_util.h"
#include "svn_version.h"

View File

@ -41,9 +41,11 @@
#include <errno.h>
#include "boinc_db.h"
#include "util.h"
#include "filesys.h"
#include "parse.h"
#include "str_replace.h"
#include "util.h"
#include "sched_config.h"
#include "sched_util.h"
#include "sched_msgs.h"

View File

@ -35,6 +35,7 @@
#include "backend_lib.h"
#include "boinc_db.h"
#include "str_replace.h"
#include "str_util.h"
#include "svn_version.h"

View File

@ -22,6 +22,7 @@
#include <vector>
#include "parse.h"
#include "str_replace.h"
struct IP_RESULT {
char name[256];

View File

@ -41,6 +41,7 @@
#include "parse.h"
#include "util.h"
#include "error_numbers.h"
#include "str_replace.h"
#include "str_util.h"
#include "filesys.h"
#include "svn_version.h"

View File

@ -37,6 +37,7 @@
#include <time.h>
#include "backend_lib.h"
#include "str_replace.h"
#include "sched_config.h"
#include "sched_util.h"

View File

@ -49,6 +49,7 @@ using std::string;
#include "parse.h"
#include "sched_util.h"
#include "sched_msgs.h"
#include "str_replace.h"
#include "str_util.h"
#include "svn_version.h"

View File

@ -34,6 +34,7 @@
#include "boinc_db.h"
#include "util.h"
#include "error_numbers.h"
#include "str_replace.h"
#include "str_util.h"
#include "svn_version.h"

View File

@ -29,8 +29,9 @@
#include "backend_lib.h"
#include "md5_file.h"
#include "svn_version.h"
#include "filesys.h"
#include "str_replace.h"
#include "svn_version.h"
#include "sched_config.h"
#include "sched_util.h"

View File

@ -44,6 +44,7 @@
#include "error_numbers.h"
#include "backend_lib.h"
#include "parse.h"
#include "str_replace.h"
#include "util.h"
#include "svn_version.h"

View File

@ -46,6 +46,7 @@
#include <cstring>
#include "util.h"
#include "str_replace.h"
#include "str_util.h"
#include "svn_version.h"

View File

@ -29,6 +29,8 @@
#include "boinc_db.h"
#include "error_numbers.h"
#include "filesys.h"
#include "str_replace.h"
#include "sched_msgs.h"
#include "validate_util.h"
#include "sched_config.h"

View File

@ -27,6 +27,7 @@
// user.lookup_id(host.userid);
#include "error_numbers.h"
#include "str_replace.h"
#include "trickle_handler.h"

View File

@ -35,6 +35,7 @@
#include "boinc_db.h"
#include "util.h"
#include "error_numbers.h"
#include "str_replace.h"
#include "str_util.h"
#include "svn_version.h"

View File

@ -24,9 +24,10 @@
#include "config.h"
#include "error_numbers.h"
#include "parse.h"
#include "util.h"
#include "filesys.h"
#include "parse.h"
#include "str_replace.h"
#include "util.h"
#include "sched_util.h"
#include "sched_config.h"

View File

@ -56,6 +56,7 @@
#include "boinc_db.h"
#include "util.h"
#include "str_replace.h"
#include "str_util.h"
#include "error_numbers.h"
#include "svn_version.h"

View File

@ -35,6 +35,7 @@
#include "common_defs.h"
#include "crypt.h"
#include "sched_config.h"
#include "str_replace.h"
#include "util.h"
void usage() {

View File

@ -23,6 +23,7 @@
#include "filesys.h"
#include "md5_file.h"
#include "str_replace.h"
#include "sched_config.h"
#include "sched_util.h"

View File

@ -43,6 +43,10 @@
<name>powerpc64-ps3-linux-gnu</name>
<user_friendly_name>Sony Playstation 3 running Linux</user_friendly_name>
</platform>
<platform>
<name>arm-android-linux-gnu</name>
<user_friendly_name>Android running on ARM</user_friendly_name>
</platform>
<platform>
<name>anonymous</name>
<user_friendly_name>anonymous</user_friendly_name>

View File

@ -19,6 +19,8 @@
#include <stdio.h>
#include <limits.h>
#include "str_replace.h"
#include "vda_lib.h"
#include "stats.h"

View File

@ -28,6 +28,7 @@
#include "filesys.h"
#include "sched_config.h"
#include "sched_util.h"
#include "str_replace.h"
#include "util.h"
#include "vda_lib.h"

View File

@ -28,6 +28,8 @@
#include "error_numbers.h"
#include "filesys.h"
#include "md5_file.h"
#include "str_replace.h"
#include "sched_config.h"
#include "sched_msgs.h"
#include "sched_util.h"