[boinc] 01/01: Partially reverted merge c87fd92a1d2c0f919ce8b5002849d8d969438575, patches were applied and committed on master

Gianfranco Costamagna locutusofborg-guest at alioth.debian.org
Tue Nov 5 11:49:48 UTC 2013


This is an automated email from the git hooks/post-receive script.

locutusofborg-guest pushed a commit to branch master
in repository boinc.

commit 86088bda203ceb99ae188df5c2a2593afd405eac
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Tue Nov 5 12:48:33 2013 +0100

    Partially reverted merge c87fd92a1d2c0f919ce8b5002849d8d969438575, patches were applied and committed on master
---
 Makefile.incl                     |   13 +++----
 api/boinc_api.cpp                 |   22 +++++------
 api/graphics2_util.cpp            |    4 +-
 apps/Makefile.am                  |    6 +--
 client/Makefile.am                |    2 +-
 client/app.cpp                    |   12 +++---
 client/app.h                      |   13 +++----
 client/check_security.cpp         |   10 ++---
 client/client_state.cpp           |    2 +-
 client/cs_files.cpp               |    4 +-
 client/cs_platforms.cpp           |   13 +------
 client/file_names.cpp             |   12 +++---
 client/rrsim_test.cpp             |    9 +----
 client/sandbox.cpp                |    2 +-
 client/scheduler_op.cpp           |    2 +-
 clientgui/DlgAdvPreferences.cpp   |    2 +-
 clientgui/MainDocument.cpp        |   18 ++++-----
 clientgui/Makefile.am             |   11 ++----
 clientgui/sg_ProjectPanel.cpp     |   18 ++++-----
 configure.ac                      |   30 +++++----------
 db/Makefile.am                    |    3 +-
 generate_svn_version.sh           |    4 +-
 html/Makefile.am                  |    2 +-
 html/languages/translations/de.po |   17 ++++----
 html/languages/translations/ru.po |    1 -
 lib/Makefile.am                   |    6 +--
 lib/coproc.cpp                    |    4 +-
 lib/crypt.cpp                     |    1 -
 lib/crypt_prog.cpp                |   10 -----
 lib/diagnostics.cpp               |    2 +-
 lib/filesys.cpp                   |   77 +++++++++++++++++--------------------
 lib/filesys.h                     |   48 +++++++++++------------
 lib/mfile.cpp                     |   15 ++++----
 lib/mfile.h                       |   12 +++---
 lib/network.cpp                   |    6 +--
 lib/parse_test.cpp                |    1 -
 lib/procinfo_win.cpp              |    3 --
 lib/shmem.cpp                     |    5 +--
 lib/unix_util.cpp                 |    6 ---
 locale/Makefile.am                |    2 +-
 py/boinc_path_config.py.in        |    2 +-
 samples/wrapper/Makefile          |    2 +-
 samples/wrapper/build_android.sh  |    2 +-
 sched/Makefile.am                 |   13 ++++---
 sched/feeder.cpp                  |    1 -
 sched/file_upload_handler.cpp     |    6 +--
 sched/get_file.cpp                |    1 -
 sched/make_work.cpp               |    1 -
 sched/sample_work_generator.cpp   |    1 -
 sched/sched_assign.cpp            |    1 -
 sched/sched_driver.cpp            |    8 ++--
 sched/sched_shmem.cpp             |    1 -
 sched/sched_timezone.cpp          |    1 -
 sched/transitioner.cpp            |    2 +-
 sched/wu_check.cpp                |    1 -
 stripchart/stripchart             |    4 +-
 stripchart/stripchart.cgi         |    4 +-
 stripchart/stripchart.cnf         |   10 ++---
 tools/Makefile.am                 |    9 ++---
 tools/create_work.cpp             |    1 -
 tools/db_query                    |    2 +-
 tools/dir_hier_path.cpp           |    2 +-
 tools/make_project                |    2 -
 tools/update_versions             |    2 +-
 tools/watch_tcp                   |    2 +-
 vda/Makefile.am                   |    2 +-
 zip/unzip/ttyio.c                 |    1 -
 67 files changed, 210 insertions(+), 304 deletions(-)

diff --git a/Makefile.incl b/Makefile.incl
index 1cd9c24..45b3749 100644
--- a/Makefile.incl
+++ b/Makefile.incl
@@ -38,22 +38,22 @@ AM_LDFLAGS =
 # dependencies to make sure libs gets compiled before
 # programs linking to them:
 
-LIBSCHED = -lsched
+LIBSCHED = $(top_builddir)/sched/libsched.la
 $(LIBSCHED):
 	cd $(top_builddir)/sched; ${MAKE} libsched.la
-LIBSCHED_FCGI = -lsched_fcgi
+LIBSCHED_FCGI = $(top_builddir)/sched/libsched_fcgi.la
 $(LIBSCHED_FCGI):
 	cd $(top_builddir)/sched; ${MAKE} libsched_fcgi.la
-LIBBOINC = -lboinc
+LIBBOINC = $(top_builddir)/lib/libboinc.la
 $(LIBBOINC):
 	cd $(top_builddir)/lib; ${MAKE} libboinc.la
-LIBBOINC_CRYPT = -lboinc_crypt
+LIBBOINC_CRYPT = $(top_builddir)/lib/libboinc_crypt.la
 $(LIBBOINC_CRYPT):
 	cd $(top_builddir)/lib; ${MAKE} libboinc.la
-LIBBOINC_FCGI = -lboinc_fcgi
+LIBBOINC_FCGI = $(top_builddir)/lib/libboinc_fcgi.la
 $(LIBBOINC_FCGI):
 	cd $(top_builddir)/lib; ${MAKE} libboinc_fcgi.la
-LIBAPI = -lboinc_api
+LIBAPI = $(top_builddir)/api/libboinc_api.la
 $(LIBAPI):
 	cd $(top_builddir)/api; ${MAKE} libboinc_api.la
 
@@ -61,4 +61,3 @@ SERVERLIBS = $(LIBSCHED) $(LIBBOINC_CRYPT) $(LIBBOINC) $(MYSQL_LIBS) $(PTHREAD_L
 SERVERLIBS_FCGI = $(LIBSCHED_FCGI) $(LIBBOINC_CRYPT) $(LIBBOINC_FCGI) -lfcgi $(MYSQL_LIBS) $(PTHREAD_LIBS) $(RSA_LIBS) $(SSL_LIBS)
 APPLIBS = $(LIBAPI) $(LIBBOINC)
 
-.PHONY: $(LIBBOINC) $(LIBBOINC_CRYPT) $(LIBBOINC_FCGI) $(LIBAPI) $(LIBSCHED) $(LIBSCHED_FCGI)
diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp
index ebc4491..74baed7 100644
--- a/api/boinc_api.cpp
+++ b/api/boinc_api.cpp
@@ -356,7 +356,7 @@ static bool update_app_progress(double cpu_t, double cp_cpu_t) {
 
     if (standalone) return true;
 
-    snprintf(msg_buf,sizeof(msg_buf),
+    sprintf(msg_buf,
         "<current_cpu_time>%e</current_cpu_time>\n"
         "<checkpoint_cpu_time>%e</checkpoint_cpu_time>\n",
         cpu_t, cp_cpu_t
@@ -629,10 +629,6 @@ int boinc_init_options_general(BOINC_OPTIONS& opt) {
 }
 
 int boinc_get_status(BOINC_STATUS *s) {
-    if (!s) {
-        fprintf(stderr,"E: boinc_get_status(NULL)\n");
-	return 1;
-    }
     s->no_heartbeat = boinc_status.no_heartbeat;
     s->suspended = boinc_status.suspended;
     s->quit_request = boinc_status.quit_request;
@@ -808,7 +804,7 @@ static void exit_from_timer_thread(int status) {
 int boinc_parse_init_data_file() {
     FILE* f;
     int retval;
-    char buf[2560];
+    char buf[256];
 
     if (aid.project_preferences) {
         free(aid.project_preferences);
@@ -858,15 +854,15 @@ int boinc_report_app_status_aux(
     );
     if (other_pid) {
         sprintf(buf, "<other_pid>%d</other_pid>\n", other_pid);
-        strlcat(msg_buf, buf, sizeof(msg_buf));
+        strcat(msg_buf, buf);
     }
     if (_bytes_sent) {
         sprintf(buf, "<bytes_sent>%f</bytes_sent>\n", _bytes_sent);
-        strlcat(msg_buf, buf, sizeof(msg_buf));
+        strcat(msg_buf, buf);
     }
     if (_bytes_received) {
         sprintf(buf, "<bytes_received>%f</bytes_received>\n", _bytes_received);
-        strlcat(msg_buf, buf, sizeof(msg_buf));
+        strcat(msg_buf, buf);
     }
     if (app_client_shm->shm->app_status.send_msg(msg_buf)) {
         return 0;
@@ -961,7 +957,7 @@ int resume_activities() {
 }
 
 static void handle_upload_file_status() {
-    char path[MAXPATHLEN], buf[MAXPATHLEN], log_name[MAXPATHLEN], *p, log_buf[256];
+    char path[MAXPATHLEN], buf[256], log_name[256], *p, log_buf[256];
     std::string filename;
     int status;
 
@@ -1174,7 +1170,7 @@ static void timer_handler() {
     // send graphics-related messages
     //
     if (send_web_graphics_url && !app_client_shm->shm->graphics_reply.has_msg()) {
-        snprintf(buf, sizeof(buf),
+        sprintf(buf,
             "<web_graphics_url>%s</web_graphics_url>",
             web_graphics_url
         );
@@ -1182,7 +1178,7 @@ static void timer_handler() {
         send_web_graphics_url = false;
     }
     if (send_remote_desktop_addr && !app_client_shm->shm->graphics_reply.has_msg()) {
-        snprintf(buf, sizeof(buf),
+        sprintf(buf,
             "<remote_desktop_addr>%s</remote_desktop_addr>",
             remote_desktop_addr
         );
@@ -1414,7 +1410,7 @@ int boinc_receive_trickle_down(char* buf, int len) {
         DirScanner dirscan(path);
         while (dirscan.scan(filename)) {
             if (strstr(filename.c_str(), "trickle_down")) {
-                strlcpy(buf, filename.c_str(), len);
+                strncpy(buf, filename.c_str(), len);
                 return true;
             }
         }
diff --git a/api/graphics2_util.cpp b/api/graphics2_util.cpp
index f76112f..36fb3bf 100644
--- a/api/graphics2_util.cpp
+++ b/api/graphics2_util.cpp
@@ -37,7 +37,7 @@
 static key_t get_shmem_name(const char* prog_name) {
     char cwd[MAXPATHLEN], path[MAXPATHLEN];
     boinc_getcwd(cwd);
-    snprintf(path, sizeof(path), "%s/init_data.xml", cwd);
+    sprintf(path, "%s/init_data.xml", cwd);
     return ftok(path, 2);
 }
 #else
@@ -47,7 +47,7 @@ static void get_shmem_name(const char* prog_name, char* shmem_name) {
     APP_INIT_DATA aid;
     int retval = boinc_get_init_data(aid);
     if (retval) aid.slot = 0;
-    snprintf(shmem_name, MAXPATHLEN, "boinc_%s_%d", prog_name, aid.slot);
+    sprintf(shmem_name, "boinc_%s_%d", prog_name, aid.slot);
 }
 #endif
 
diff --git a/apps/Makefile.am b/apps/Makefile.am
index 89a61de..7f3b1fe 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -8,15 +8,15 @@ example_PROGRAMS = upper_case concat 1sec
 
 upper_case_SOURCES = upper_case.cpp
 upper_case_CXXFLAGS = $(PTHREAD_CFLAGS)
-upper_case_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS) -L../api/.libs -L../lib/.libs
+upper_case_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS)
 upper_case_LDADD = $(APPLIBS)
 
 concat_SOURCES = concat.cpp
 concat_CXXFLAGS = $(PTHREAD_CFLAGS)
-concat_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS) -L../api/.libs -L../lib/.libs
+concat_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS)
 concat_LDADD = $(APPLIBS)
 
 1sec_SOURCES = 1sec.cpp
 1sec_CXXFLAGS = $(PTHREAD_CFLAGS)
-1sec_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS) -L../api/.libs -L../lib/.libs
+1sec_LDFLAGS = -static-libtool-libs $(PTHREAD_CFLAGS)
 1sec_LDADD = $(APPLIBS)
diff --git a/client/Makefile.am b/client/Makefile.am
index f58007a..59d1ff0 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -91,7 +91,7 @@ boinc_client_LDFLAGS = $(AM_LDFLAGS) $(SSL_LDFLAGS) -L../lib
 if OS_DARWIN
 boinc_client_LDFLAGS += -Wl,-flat_namespace,-undefined,dynamic_lookup
 endif
-boinc_client_LDADD = -L../lib/.libs $(LIBBOINC) $(LIBBOINC_CRYPT) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
+boinc_client_LDADD = $(LIBBOINC) $(LIBBOINC_CRYPT) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
 
 boinc_clientdir = $(bindir)
 
diff --git a/client/app.cpp b/client/app.cpp
index 29a3ba1..dfeeaab 100644
--- a/client/app.cpp
+++ b/client/app.cpp
@@ -423,8 +423,8 @@ int ACTIVE_TASK::move_trickle_file() {
     char new_path[MAXPATHLEN], old_path[MAXPATHLEN];
     int retval;
 
-    snprintf(old_path, sizeof(old_path), "%s/trickle_up.xml", slot_dir);
-    snprintf(new_path, sizeof(new_path),
+    sprintf(old_path, "%s/trickle_up.xml", slot_dir);
+    sprintf(new_path,
         "%s/trickle_up_%s_%d.xml",
         result->project->project_dir(), result->name, (int)time(0)
     );
@@ -459,7 +459,7 @@ int ACTIVE_TASK::current_disk_usage(double& size) {
     return 0;
 }
 
-bool ACTIVE_TASK_SET::is_slot_in_use(const int slot) const {
+bool ACTIVE_TASK_SET::is_slot_in_use(int slot) {
     unsigned int i;
     for (i=0; i<active_tasks.size(); i++) {
         if (active_tasks[i]->slot == slot) {
@@ -469,7 +469,7 @@ bool ACTIVE_TASK_SET::is_slot_in_use(const int slot) const {
     return false;
 }
 
-bool ACTIVE_TASK_SET::is_slot_dir_in_use(const char* const dir) const {
+bool ACTIVE_TASK_SET::is_slot_dir_in_use(char* dir) {
     char path[MAXPATHLEN];
     unsigned int i;
     for (i=0; i<active_tasks.size(); i++) {
@@ -510,7 +510,7 @@ void ACTIVE_TASK::get_free_slot(RESULT* rp) {
 #endif
 }
 
-bool ACTIVE_TASK_SET::slot_taken(const int slot) const {
+bool ACTIVE_TASK_SET::slot_taken(int slot) {
     unsigned int i;
     for (i=0; i<active_tasks.size(); i++) {
         if (active_tasks[i]->slot == slot) return true;
@@ -622,7 +622,7 @@ int ACTIVE_TASK::write_gui(MIOFILE& fout) {
 #endif
 
 int ACTIVE_TASK::parse(XML_PARSER& xp) {
-    char result_name[MAXPATHLEN], project_master_url[MAXPATHLEN];
+    char result_name[256], project_master_url[256];
     int n, dummy;
     unsigned int i;
     PROJECT* project=0;
diff --git a/client/app.h b/client/app.h
index dd45876..be46abd 100644
--- a/client/app.h
+++ b/client/app.h
@@ -48,7 +48,6 @@ struct ASYNC_COPY;
 typedef int PROCESS_ID;
 
 #define MAX_STDERR_LEN  65536
-#define SLOT_DIR_LEN MAXPATHLEN
     // The stderr output of an application is truncated to this length
     // before sending to server,
     // to protect against apps that write unbounded amounts.
@@ -113,7 +112,7 @@ struct ACTIVE_TASK {
     double bytes_sent;
         // reported by the app if it does network I/O
     double bytes_received;
-    char slot_dir[SLOT_DIR_LEN];
+    char slot_dir[256];
         // directory where process runs (relative)
     char slot_path[MAXPATHLEN];
         // same, absolute
@@ -154,8 +153,8 @@ struct ACTIVE_TASK {
         // but not descendants of the main process
         // (e.g. VMs created by vboxwrapper)
         // These are communicated via the app_status message channel
-    char web_graphics_url[MAXPATHLEN];
-    char remote_desktop_addr[MAXPATHLEN];
+    char web_graphics_url[256];
+    char remote_desktop_addr[256];
     ASYNC_COPY* async_copy;
     double finish_file_time;
         // time when we saw finish file in slot dir.
@@ -291,8 +290,8 @@ public:
     bool check_app_exited();
     bool check_rsc_limits_exceeded();
     bool check_quit_timeout_exceeded();
-    bool is_slot_in_use(const int) const;
-    bool is_slot_dir_in_use(const char* const) const;
+    bool is_slot_in_use(int);
+    bool is_slot_dir_in_use(char*);
     void send_heartbeats();
     void send_trickle_downs();
     void report_overdue();
@@ -301,7 +300,7 @@ public:
     bool want_network();    // does any task want network?
     void network_available();   // notify tasks that network is available
     void free_mem();
-    bool slot_taken(const int) const;
+    bool slot_taken(int);
     void get_memory_usage();
 
     void process_control_poll();
diff --git a/client/check_security.cpp b/client/check_security.cpp
index 4c1a3d1..d567983 100644
--- a/client/check_security.cpp
+++ b/client/check_security.cpp
@@ -40,9 +40,9 @@ bool IsUserInGroupBM();
 #endif
 
 static int CheckNestedDirectories(
-    const char * const basepath, int depth,
+    char * basepath, int depth, 
     int use_sandbox, int isManager, 
-    const char * const path_to_error,
+    char * path_to_error,
     int len
 );
 
@@ -505,9 +505,9 @@ saverName[2] = "Progress Thru Processors";
 
 
 static int CheckNestedDirectories(
-    const char * const basepath, int depth,
+    char * basepath, int depth,
     int use_sandbox, int isManager, 
-    const char * const path_to_error, int len
+    char * path_to_error, int len
 ) {
     int             isDirectory;
     char            full_path[MAXPATHLEN];
@@ -517,7 +517,6 @@ static int CheckNestedDirectories(
     dirent          *dp;
     static int      errShown = 0;
 
-    errno=0;
     dirp = opendir(basepath);
     if (dirp == NULL) {
         // Ideally, all project-created subdirectories under project or slot 
@@ -527,7 +526,6 @@ static int CheckNestedDirectories(
         // the subdirectory to check them.
         strlcpy(full_path, basepath, sizeof(full_path));
         if ((depth > 1) && (errno == EACCES)) {
-            fprintf(stderr,"Could not open directory %s in client/check_security.cpp: CheckNestedDirectories: %s\n",full_path,strerror(errno));
             return 0;
         } else {
             retval = -1200;
diff --git a/client/client_state.cpp b/client/client_state.cpp
index ec11632..f320b1e 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -463,7 +463,7 @@ int CLIENT_STATE::init() {
 
     // inform the user if there's a newer version of client
     //
-//    newer_version_startup_check();
+    newer_version_startup_check();
 
     // parse account files again,
     // now that we know the host's venue on each project
diff --git a/client/cs_files.cpp b/client/cs_files.cpp
index 1f75b98..dcd7aa7 100644
--- a/client/cs_files.cpp
+++ b/client/cs_files.cpp
@@ -177,9 +177,7 @@ int FILE_INFO::verify_file(
     //
     if (download_gzipped && !boinc_file_exists(pathname)) {
         char gzpath[MAXPATHLEN];
-        snprintf(gzpath, sizeof(gzpath), "%s.gz", pathname);
-       //FIXME: a distinction is missing for the case that the .gz suffix goes beyond the MAXPATHLEN and is hence not found because
-       //       one should then not reperform the download as intended below
+        sprintf(gzpath, "%s.gz", pathname);
         if (boinc_file_exists(gzpath) ) {
             if (allow_async && nbytes > ASYNC_FILE_THRESHOLD) {
                 ASYNC_VERIFY* avp = new ASYNC_VERIFY;
diff --git a/client/cs_platforms.cpp b/client/cs_platforms.cpp
index 53a759a..fd1545d 100644
--- a/client/cs_platforms.cpp
+++ b/client/cs_platforms.cpp
@@ -45,7 +45,6 @@ LPFN_ISWOW64PROCESS fnIsWow64Process;
 #include <sys/sysctl.h>
 #endif
 
-#include <cerrno>
 #include "error_numbers.h"
 #include "filesys.h"
 #include "str_util.h"
@@ -179,17 +178,9 @@ void CLIENT_STATE::detect_platforms() {
                 int i;
                 for (i=0; i < nlibdirs; i++) {
                     struct dirent *entry;
-                    errno=0;
                     DIR *a = opendir(libdir[i]);
-                    if (a == 0) {
-                      if (ENOENT==errno) {
-                          // if dir doesn't exist, do to the next one
-                       }
-                      else {
-                         fprintf(stderr,"Unexpected problem with directory '%s': %s\n",libdir[i],strerror(errno));
-                      }
-                      continue;
-                   }
+                    // if dir doesn't exist, do the next one
+                    if (a == 0) continue;
                     // dir exists. read each entry until you find a 32bit lib
                     while ((support32 == 0) && ((entry=readdir(a)) != 0)) {
                         strlcpy(cmdline, file[eno], 256);
diff --git a/client/file_names.cpp b/client/file_names.cpp
index 615fd0e..37deafd 100644
--- a/client/file_names.cpp
+++ b/client/file_names.cpp
@@ -69,7 +69,7 @@ int make_soft_link(PROJECT* project, char* link_path, char* rel_file_path) {
 //
 void get_pathname(FILE_INFO* fip, char* path, int len) {
     PROJECT* p = fip->project;
-    char buf[std::max(len,MAXPATHLEN)];
+    char buf[MAXPATHLEN];
 
     // for testing purposes, it's handy to allow a FILE_INFO without
     // an associated PROJECT.
@@ -91,28 +91,28 @@ void get_pathname(FILE_INFO* fip, char* path, int len) {
 }
 
 void get_sched_request_filename(PROJECT& project, char* buf, int len) {
-    char url[std::max(len,MAXPATHLEN)];
+    char url[1024];
 
     escape_project_url(project.master_url, url);
     snprintf(buf, len, "%s%s.xml", SCHED_OP_REQUEST_BASE, url);
 }
 
 void get_sched_reply_filename(PROJECT& project, char* buf, int len) {
-    char url[std::max(len,MAXPATHLEN)];
+    char url[1024];
 
     escape_project_url(project.master_url, url);
     snprintf(buf, len, "%s%s.xml", SCHED_OP_REPLY_BASE, url);
 }
 
 void get_master_filename(PROJECT& project, char* buf, int len) {
-    char url[std::max(len,MAXPATHLEN)];
+    char url[1024];
 
     escape_project_url(project.master_url, url);
     snprintf(buf, len, "%s%s.xml", MASTER_BASE, url);
 }
 
 void job_log_filename(PROJECT& project, char* buf, int len) {
-    char url[std::max(len,MAXPATHLEN)];
+    char url[1024];
 
     escape_project_url(project.master_url, url);
     snprintf(buf, len, "%s%s.txt", JOB_LOG_BASE, url);
@@ -220,7 +220,7 @@ int make_slot_dir(int slot) {
 // delete unused stuff in the slots/ directory
 //
 void delete_old_slot_dirs() {
-    char filename[MAXPATHLEN], path[MAXPATHLEN];
+    char filename[1024], path[MAXPATHLEN];
     DIRREF dirp;
     int retval;
 
diff --git a/client/rrsim_test.cpp b/client/rrsim_test.cpp
index bc0d58d..f2f07d6 100644
--- a/client/rrsim_test.cpp
+++ b/client/rrsim_test.cpp
@@ -184,6 +184,7 @@ bool CLIENT_STATE::rr_simulation() {
     vector<RESULT*> active;
     unsigned int i;
     double x;
+    vector<RESULT*>::iterator it;
     bool rval = false;
 
     if (log_flags.rr_simulation) {
@@ -286,9 +287,7 @@ bool CLIENT_STATE::rr_simulation() {
         int last_active_size = active.size();
         int last_proj_active_size = pbest->active.size();
 
-        {
-        vector<RESULT*>::iterator it;
-	// remove *rpbest from active set,
+        // remove *rpbest from active set,
         // and adjust CPU time left for other results
         //
         it = active.begin();
@@ -302,10 +301,7 @@ bool CLIENT_STATE::rr_simulation() {
                 it++;
             }
         }
-	}
 
-	{
-        vector<RESULT*>::iterator it;
         // remove *rpbest from its project's active set
         //
         it = pbest->active.begin();
@@ -317,7 +313,6 @@ bool CLIENT_STATE::rr_simulation() {
                 it++;
             }
         }
-	}
 
         // If project has more results, add one to active set.
         //
diff --git a/client/sandbox.cpp b/client/sandbox.cpp
index c854f4e..ff6ff93 100644
--- a/client/sandbox.cpp
+++ b/client/sandbox.cpp
@@ -207,7 +207,7 @@ int client_clean_out_dir(const char* dirpath, const char* reason) {
         strcpy(filename, "");
         retval = dir_scan(filename, dirp, sizeof(filename));
         if (retval) break;
-        snprintf(path, sizeof(path), "%s/%s", dirpath,  filename);
+        sprintf(path, "%s/%s", dirpath,  filename);
         if (is_dir(path)) {
             retval = client_clean_out_dir(path, NULL);
             if (retval) final_retval = retval;
diff --git a/client/scheduler_op.cpp b/client/scheduler_op.cpp
index b2b7784..c319b6d 100644
--- a/client/scheduler_op.cpp
+++ b/client/scheduler_op.cpp
@@ -129,7 +129,7 @@ int SCHEDULER_OP::init_op_project(PROJECT* p, int r) {
         // and project list
         //
         if (!config.no_info_fetch) {
-//            gstate.new_version_check();
+            gstate.new_version_check();
             gstate.all_projects_list_check();
         }
     }
diff --git a/clientgui/DlgAdvPreferences.cpp b/clientgui/DlgAdvPreferences.cpp
index 0c5d47a..020084f 100644
--- a/clientgui/DlgAdvPreferences.cpp
+++ b/clientgui/DlgAdvPreferences.cpp
@@ -822,7 +822,7 @@ void CDlgAdvPreferences::OnAddExclusiveApp(wxCommandEvent&) {
 #endif
             wxString directory = picker.GetDirectory();
             wxFileName fn(directory, appNames[i]);
-            if (!fn.IsOk() /*|| !fn.IsFileExecutable()*/) {
+            if (!fn.IsOk() || !fn.IsFileExecutable()) {
                 errmsg.Printf(_("'%s' is not an executable application."), appNames[i].c_str());
                 wxGetApp().SafeMessageBox(errmsg, _("Add Exclusive App"),
                     wxOK | wxICON_EXCLAMATION, this
diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp
index cc41adc..b51c1c5 100644
--- a/clientgui/MainDocument.cpp
+++ b/clientgui/MainDocument.cpp
@@ -1643,6 +1643,7 @@ void CMainDocument::KillGraphicsApp(HANDLE pid) {
 }
 #else
 void CMainDocument::KillGraphicsApp(int pid) {
+    char* argv[6];
     char currentDir[1024];
     char thePIDbuf[20];
     int id, iRetVal;
@@ -1650,13 +1651,12 @@ void CMainDocument::KillGraphicsApp(int pid) {
 
     if (g_use_sandbox) {
         snprintf(thePIDbuf, sizeof(thePIDbuf), "%d", pid);
-        char* const argv[6] = {
-           strdup("switcher"),
-	    strdup("/bin/kill"),
-	    strdup("kill"),
-	    strdup("-KILL"),
-	    thePIDbuf,0
-        };
+        argv[0] = "switcher";
+        argv[1] = "/bin/kill";
+        argv[2] =  "kill";
+        argv[3] = "-KILL";
+        argv[4] = thePIDbuf;
+        argv[5] = 0;
     
         iRetVal = run_program(
             getcwd(currentDir, sizeof(currentDir)),
@@ -1666,10 +1666,6 @@ void CMainDocument::KillGraphicsApp(int pid) {
             0,
             id
         );
-	free(argv[0]);
-	free(argv[1]);
-	free(argv[2]);
-	free(argv[3]);
     } else {
         kill_program(pid);
     }
diff --git a/clientgui/Makefile.am b/clientgui/Makefile.am
index cb72379..f85177a 100644
--- a/clientgui/Makefile.am
+++ b/clientgui/Makefile.am
@@ -3,7 +3,6 @@
 
 include $(top_srcdir)/Makefile.incl
 
-AM_LDFLAGS +=  -L../lib/.libs
 if ENABLE_CLIENT_RELEASE
   AM_LDFLAGS += -static-libtool-libs
 ## for an entirely statically linked library, you may want to try
@@ -118,13 +117,9 @@ EXTRA_DIST = *.h \
     ../lib/error_numbers.h \
     locale $(mac_headers)
 
-#boincmgr_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) `pkg-config --cflags gtk+-2.0`
-boincmgr_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) $(GTK_CLFAGS)
-#boincmgr_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) `pkg-config --cflags gtk+-2.0`
-boincmgr_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) $(GTK_CFLAGS)
-#boincmgr_LDFLAGS = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) `pkg-config --libs gtk+-2.0` -lnotify
-boincmgr_LDADD = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) $(GTK_LIBS)
-
+boincmgr_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) `pkg-config --cflags gtk+-2.0`
+boincmgr_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) `pkg-config --cflags gtk+-2.0`
+boincmgr_LDFLAGS = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) `pkg-config --libs gtk+-2.0` -lnotify
 
 win_config.h: $(top_srcdir)/config.h
 	grep '#define.*BOINC.*VERSION' $^ > $@
diff --git a/clientgui/sg_ProjectPanel.cpp b/clientgui/sg_ProjectPanel.cpp
index 45203d4..80e45e5 100644
--- a/clientgui/sg_ProjectPanel.cpp
+++ b/clientgui/sg_ProjectPanel.cpp
@@ -414,7 +414,8 @@ void CSimpleProjectPanel::UpdateProjectList() {
     CMainDocument* pDoc = wxGetApp().GetDocument();
     ProjectSelectionData* selData;
     PROJECT* project;
-    int oldProjectSelection, newProjectSelection;
+    char* ctrl_url;
+    int i, j, oldProjectSelection, newProjectSelection;
 
     if ( pDoc->IsConnected() ) {
         int projCnt = pDoc->GetSimpleProjectCount();
@@ -422,11 +423,10 @@ void CSimpleProjectPanel::UpdateProjectList() {
         oldProjectSelection = m_ProjectSelectionCtrl->GetSelection();
         
         // If a new project has been added, figure out which one
-        for(int i=0; i<projCnt; i++) {
-            char* ctrl_url;
+        for(i=0; i<projCnt; i++) {
             project = pDoc->state.projects[i];
             bool found = false;
-            for(int j=0; j<ctrlCount; j++) {
+            for(j=0; j<ctrlCount; j++) {
                 ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
                 if (!strcmp(project->master_url, ctrl_url)) {
                     found = true;
@@ -438,7 +438,7 @@ void CSimpleProjectPanel::UpdateProjectList() {
             if ( !found ) {
                 wxString projname(project->project_name.c_str(), wxConvUTF8);
 #if SORTPROJECTLIST
-                int alphaOrder,j;
+                int alphaOrder;
                 for(j = 0; j < ctrlCount; ++j) {
                     alphaOrder = (m_ProjectSelectionCtrl->GetString(j)).CmpNoCase(projname);
                     if (alphaOrder > 0) {
@@ -470,8 +470,8 @@ void CSimpleProjectPanel::UpdateProjectList() {
         if ( projCnt < ctrlCount ) {
             project = NULL;
             // Check items in descending order so deletion won't change indexes of items yet to be checked
-            for(int j=ctrlCount-1; j>=0; --j) {
-                char* ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
+            for(j=ctrlCount-1; j>=0; --j) {
+                ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
                 project = pDoc->state.lookup_project(ctrl_url);
                 if ( project == NULL ) {
                     selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
@@ -499,9 +499,9 @@ void CSimpleProjectPanel::UpdateProjectList() {
     
         // Check to see if we need to reload the project icon
         ctrlCount = m_ProjectSelectionCtrl->GetCount();
-        for(int j=0; j<ctrlCount; j++) {
+        for(j=0; j<ctrlCount; j++) {
             selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
-            char* ctrl_url = selData->project_url;
+            ctrl_url = selData->project_url;
             project = pDoc->state.lookup_project(ctrl_url);
             if ( project->project_files_downloaded_time > selData->project_files_downloaded_time ) {
                 wxBitmap* projectBM = GetProjectSpecificBitmap(ctrl_url);
diff --git a/configure.ac b/configure.ac
index 3b4f815..cb5631f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ AC_CANONICAL_TARGET
 dnl generate .tar.gz, .tar.bz2, .zip
 dnl AM_INIT_AUTOMAKE(dist-bzip2 dist-zip)
 AM_INIT_AUTOMAKE(dist-zip)
-#m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_CONFIG_SRCDIR(lib/shmem.cpp)
 
@@ -289,20 +289,6 @@ AC_SUBST([BOINC_MINOR_VERSION])
 
 AC_SUBST([TOP_BUILD_DIR], [`pwd`])
 
-dnl We can't just export the value of ${bindir} etc. since it may reference
-dnl ${prefix}, so we must resolve those references first
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-m4_foreach([dir], [libexecdir], [
-    x="$dir"
-    eval y="$x"
-    while test "x$x" != "x$y"; do
-        x="$y"
-        eval y="$x"
-    done
-    AC_SUBST([CONFIG_]m4_translit(dir, [a-z], [A-Z]), ["$x"])
-])
-
 ## commented this out to turn all maintainer-mode features ON by default,
 ## such as automatic reconfiguring on changes in Makefile.am's and configure.ac
 ## AM_MAINTAINER_MODE
@@ -757,12 +743,14 @@ fi
 
 dnl ---------- libNotify --------------------------------------------------
 if test "${enable_manager}" = yes ; then
-  PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.7.0])
-fi
+  pkg_config_args=libnotify
+  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
-dnl ---------- GTK2 -------------------------------------------------------
-if test "${enable_manager}" = yes ; then
-  PKG_CHECK_MODULES(GTK, [gtk+-2.0])
+  LIBNOTIFY_CFLAGS=`$PKG_CONFIG libnotify --cflags`
+  LIBNOTIFY_LIBS=`$PKG_CONFIG libnotify --libs`
+
+  AC_SUBST(LIBNOTIFY_CFLAGS)
+  AC_SUBST(LIBNOTIFY_LIBS)
 fi
 
 dnl ---------- Sqlite3 ----------------------------------------------------
@@ -913,7 +901,7 @@ AC_ARG_ENABLE(wx-debug,
    ],
   [enable_wx_debug="no"])
 
-CLIENTGUILIBS="${WX_LIBS} ${SQLITE3_LIBS}"
+CLIENTGUILIBS="${WX_LIBS} ${SQLITE3_LIBS} ${GTK_LIBS}"
 
 if test "${enable_client_release}" = "yes" ; then
    if test "x${WX_LIBS_STATIC}" = "x" ; then
diff --git a/db/Makefile.am b/db/Makefile.am
index 1475b52..3548944 100644
--- a/db/Makefile.am
+++ b/db/Makefile.am
@@ -10,5 +10,4 @@ endif
 
 ## other stuff to go into the distribution
 extradir = $(prefix)/share/boinc-server-maker/db
-dist_extra_DATA = constraints.sql schema.sql
-dist_extra_SCRIPTS = init_db
+dist_extra_DATA = constraints.sql schema.sql init_db
diff --git a/generate_svn_version.sh b/generate_svn_version.sh
index a111d8f..8f8de4c 100644
--- a/generate_svn_version.sh
+++ b/generate_svn_version.sh
@@ -7,9 +7,7 @@ echo "#ifndef SVN_VERSION_H" > $TMPFILE
 echo "#define SVN_VERSION_H" >> $TMPFILE
 echo "" >> $TMPFILE
 
-if [ -d "debian" ]; then
-    CMD=""
-elif [ -d .git/svn ]; then
+if [ -d .git/svn ]; then
     CMD="git svn info"
 elif [ -d .git ]; then
     GIT_LOG=`git log -n1 --pretty="format:%H"`
diff --git a/html/Makefile.am b/html/Makefile.am
index f376dc1..9862d8d 100644
--- a/html/Makefile.am
+++ b/html/Makefile.am
@@ -1,4 +1,4 @@
 htmldir=$(DESTDIR)/$(prefix)/share/boinc-server-maker/html
 install-data-local:
 	mkdir -p $(htmldir)
-	cp -r bt drupal inc languages ops project.sample queue user $(htmldir)
+	cp -r inc languages ops user $(htmldir)
diff --git a/html/languages/translations/de.po b/html/languages/translations/de.po
index 813cbc0..accd4e1 100644
--- a/html/languages/translations/de.po
+++ b/html/languages/translations/de.po
@@ -1066,8 +1066,8 @@ msgstr ""
 
 #: ../inc/prefs.inc:157
 #, php-format
-msgid "%% of the processors"
-msgstr "%% von den Prozessoren"
+msgid "% of the processors"
+msgstr "% von den Prozessoren"
 
 #: ../inc/prefs.inc:161
 msgid "Use at most %1 Can be used to reduce CPU heat %2"
@@ -1075,8 +1075,8 @@ msgstr "Nutze höchstens %1Kann benutzt werden um Überhitzung zu vermeiden.%2"
 
 #: ../inc/prefs.inc:166
 #, php-format
-msgid "%% of CPU time"
-msgstr "%% der Prozessorzeit"
+msgid "% of CPU time"
+msgstr "% der Prozessorzeit"
 
 #: ../inc/prefs.inc:174 ../inc/prefs.inc:188
 msgid "Disk: use at most"
@@ -1095,8 +1095,8 @@ msgstr ""
 #: ../inc/prefs.inc:190 ../inc/prefs.inc:200 ../inc/prefs.inc:205
 #: ../inc/prefs.inc:210
 #, php-format
-msgid "%% of total"
-msgstr "%% von Gesamt"
+msgid "% of total"
+msgstr "% von Gesamt"
 
 #: ../inc/prefs.inc:193
 msgid "Tasks checkpoint to disk at most every"
@@ -5279,10 +5279,9 @@ msgid ""
 "our message boards are moderated.\n"
 "Message board postings are subject to the following posting rules:\n"
 msgstr ""
-"\n"
 "Um eine angenehme Diskussion und den bestmöglichen Informationsfluss zu "
-"gewährleisten, wird dieses Forum moderiert. Forenbeiträge müssen den "
-"folgenden Regeln entsprechen:\n"
+"gewährleisten wird dieses Forum moderiert. Forenbeiträge müssen den "
+"folgenden Regeln entsprechen:"
 
 #: ../user/moderation.php:30
 msgid ""
diff --git a/html/languages/translations/ru.po b/html/languages/translations/ru.po
index f631b67..1573af5 100644
--- a/html/languages/translations/ru.po
+++ b/html/languages/translations/ru.po
@@ -386,7 +386,6 @@ msgstr ""
 "<li> Не должно быть оскорбительных комментариев, затрагивающих расу, "
 "религию,\n"
 " национальность, пол, класс или сексуальность.\n"
-"        "
 
 #: ../inc/forum.inc:734
 msgid "Rules:"
diff --git a/lib/Makefile.am b/lib/Makefile.am
index e981605..45c3279 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -150,13 +150,13 @@ lib_LTLIBRARIES = libboinc.la libboinc_crypt.la
 libboinc_la_SOURCES = $(generic_sources) $(mac_sources)
 libboinc_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
 libboinc_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS)
-libboinc_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
+libboinc_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -static -version-number $(LIBBOINC_VERSION)
 libboinc_la_LIBADD =
 
 libboinc_crypt_la_SOURCES = crypt.cpp
 libboinc_crypt_la_CFLAGS = $(AM_CFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CFLAGS)
 libboinc_crypt_la_CXXFLAGS = $(AM_CXXFLAGS) $(PICFLAGS) $(PTHREAD_CFLAGS) $(SSL_CXXFLAGS)
-libboinc_crypt_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION) $(SSL_LIBS)
+libboinc_crypt_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -static -version-number $(LIBBOINC_VERSION)
 libboinc_crypt_la_LIBADD =
 
 
@@ -225,7 +225,7 @@ msg_test_CXXFLAGS = $(PTHREAD_CFLAGS)
 msg_test_LDADD = $(LIBBOINC)
 crypt_prog_SOURCES = crypt_prog.cpp 
 crypt_prog_CXXFLAGS = $(PTHREAD_CFLAGS)
-crypt_prog_LDADD = $(LIBBOINC_CRYPT_STATIC) -L../lib/.libs $(LIBBOINC) $(SSL_LIBS)
+crypt_prog_LDADD = $(LIBBOINC_CRYPT_STATIC) $(LIBBOINC) $(SSL_LIBS) 
 parse_test_SOURCES = parse_test.cpp 
 parse_test_CXXFLAGS = $(PTHREAD_CFLAGS)
 parse_test_LDADD = $(LIBBOINC)
diff --git a/lib/coproc.cpp b/lib/coproc.cpp
index 264e983..4301d10 100644
--- a/lib/coproc.cpp
+++ b/lib/coproc.cpp
@@ -355,7 +355,7 @@ void COPROC_NVIDIA::clear() {
     cuda_version = 0;
     display_driver_version = 0;
     strcpy(prop.name, "");
-    prop.totalGlobalMem = 0.0;
+    prop.totalGlobalMem = 0;
     prop.sharedMemPerBlock = 0;
     prop.regsPerBlock = 0;
     prop.warpSize = 0;
@@ -385,7 +385,7 @@ int COPROC_NVIDIA::parse(XML_PARSER& xp) {
     while (!xp.get_tag()) {
         if (xp.match_tag("/coproc_cuda")) {
             if (!peak_flops) {
-                set_peak_flops();
+				set_peak_flops();
             }
             if (!available_ram) {
                 available_ram = prop.totalGlobalMem;
diff --git a/lib/crypt.cpp b/lib/crypt.cpp
index 763dc87..d1a0e1b 100644
--- a/lib/crypt.cpp
+++ b/lib/crypt.cpp
@@ -342,7 +342,6 @@ int check_file_signature(
     char clear_buf[MD5_LEN];
     int n, retval;
     DATA_BLOCK clear_signature;
-    clear_buf[0]=0;
 
     n = (int)strlen(md5_buf);
     clear_signature.data = (unsigned char*)clear_buf;
diff --git a/lib/crypt_prog.cpp b/lib/crypt_prog.cpp
index d581724..3d45361 100644
--- a/lib/crypt_prog.cpp
+++ b/lib/crypt_prog.cpp
@@ -152,8 +152,6 @@ int main(int argc, char** argv) {
         if (!fpub) die("fopen");
         print_key_hex(fpriv, (KEY*)&private_key, sizeof(private_key));
         print_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
-	fclose(fpriv);
-	fclose(fpub);
 
     } else if (!strcmp(argv[1], "-sign")) {
         if (argc < 4) {
@@ -168,7 +166,6 @@ int main(int argc, char** argv) {
         signature.len = 256;
         retval = sign_file(argv[2], private_key, signature);
         print_hex_data(stdout, signature);
-	fclose(fpriv);
     } else if (!strcmp(argv[1], "-sign_string")) {
         if (argc < 4) {
             usage();
@@ -180,7 +177,6 @@ int main(int argc, char** argv) {
         if (retval) die("scan_key_hex\n");
         generate_signature(argv[2], cbuf, private_key);
         puts(cbuf);
-	fclose(fpriv);
     } else if (!strcmp(argv[1], "-verify")) {
         if (argc < 5) {
             usage();
@@ -194,8 +190,6 @@ int main(int argc, char** argv) {
         signature.data = signature_buf;
         signature.len = 256;
         retval = scan_hex_data(f, signature);
-	fclose(f);
-	fclose(fpub);
         if (retval) die("scan_hex_data");
 
         char md5_buf[64];
@@ -225,8 +219,6 @@ int main(int argc, char** argv) {
         if (!fpub) die("fopen");
         retval = scan_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
         if (retval) die("read_public_key");
-	fclose(fpriv);
-	fclose(fpub);
         strcpy((char*)buf2, "encryption test successful");
         in.data = buf2;
         in.len = strlen((char*)in.data);
@@ -244,7 +236,6 @@ int main(int argc, char** argv) {
         signature.data = signature_buf;
         signature.len = 256;
         retval = scan_hex_data(f, signature);
-	fclose(f);
         if (retval) die("cannot scan_hex_data");
         certpath = check_validity(argv[4], argv[2], signature.data, argv[5]);
         if (certpath == NULL) {
@@ -400,7 +391,6 @@ int main(int argc, char** argv) {
                     die("fopen");
                 }
                 print_key_hex(fpub, (KEY*)&public_key, sizeof(public_key));
-		fclose(fpub);
             }
         }
     } else {
diff --git a/lib/diagnostics.cpp b/lib/diagnostics.cpp
index bd70468..d22ab30 100644
--- a/lib/diagnostics.cpp
+++ b/lib/diagnostics.cpp
@@ -306,7 +306,7 @@ int diagnostics_init(
 
     // Store various pieces of inforation for future use.
     if (flags & BOINC_DIAG_BOINCAPPLICATION) {
-        char    buf[MAXPATHLEN];
+        char    buf[256];
         char    proxy_address[256];
         int     proxy_port;
         MIOFILE mf;
diff --git a/lib/filesys.cpp b/lib/filesys.cpp
index 6191397..c387495 100644
--- a/lib/filesys.cpp
+++ b/lib/filesys.cpp
@@ -86,7 +86,7 @@ char boinc_failed_file[MAXPATHLEN];
 
 // routines for enumerating the entries in a directory
 
-int is_file(const char* const path) {
+int is_file(const char* path) {
     struct stat sbuf;
 #ifdef _WIN32
     int retval = stat(path, &sbuf);
@@ -96,7 +96,7 @@ int is_file(const char* const path) {
     return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFREG));
 }
 
-int is_dir(const char* const path) {
+int is_dir(const char* path) {
     struct stat sbuf;
 #ifdef _WIN32
     int retval = stat(path, &sbuf);
@@ -108,19 +108,19 @@ int is_dir(const char* const path) {
 
 #ifndef _WIN32
 
-int is_file_follow_symlinks(const char* const path) {
+int is_file_follow_symlinks(const char* path) {
     struct stat sbuf;
     int retval = stat(path, &sbuf);
     return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFREG));
 }
 
-int is_dir_follow_symlinks(const char* const path) {
+int is_dir_follow_symlinks(const char* path) {
     struct stat sbuf;
     int retval = stat(path, &sbuf);
     return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR));
 }
 
-int is_symlink(const char* const path) {
+int is_symlink(const char* path) {
     struct stat sbuf;
     int retval = lstat(path, &sbuf);
     return (!retval && S_ISLNK(sbuf.st_mode));
@@ -129,7 +129,7 @@ int is_symlink(const char* const path) {
 
 // Open a directory
 //
-DIRREF dir_open(const char* const p) {
+DIRREF dir_open(const char* p) {
     DIRREF dirp;
 #ifdef _WIN32
     if (!is_dir(p)) return NULL;
@@ -144,12 +144,7 @@ DIRREF dir_open(const char* const p) {
     dirp->handle = INVALID_HANDLE_VALUE;
 #else
     dirp = opendir(p);
-    if (!dirp) {
-        char b[MAXPATHLEN+1];
-	boinc_getcwd(b);
-        fprintf(stderr,"dir_open: Could not open directory '%s' from '%s'.\n",p,b);
-        return NULL;
-    }
+    if (!dirp) return NULL;
 #endif
     return dirp;
 }
@@ -217,7 +212,7 @@ void dir_close(DIRREF dirp) {
 #endif
 }
 
-bool is_dir_empty(const char* const p) {
+bool is_dir_empty(const char *p) {
     char file[MAXPATHLEN];
 
     DIRREF dir = dir_open(p);
@@ -297,7 +292,7 @@ DirScanner::~DirScanner() {
 #endif
 }
 
-static int boinc_delete_file_aux(const char* const path) {
+static int boinc_delete_file_aux(const char* path) {
 #ifdef _WIN32
     if (!DeleteFileA(path)) {
         return ERR_UNLINK;
@@ -311,7 +306,7 @@ static int boinc_delete_file_aux(const char* const path) {
 
 // Delete the file located at path
 //
-int boinc_delete_file(const char* const path) {
+int boinc_delete_file(const char* path) {
     int retval = 0;
 
     if (!boinc_file_exists(path)) {
@@ -335,7 +330,7 @@ int boinc_delete_file(const char* const path) {
 
 // get file size
 //
-int file_size(const char* const path, double& size) {
+int file_size(const char* path, double& size) {
     int retval;
 
 #if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__MINGW32__)
@@ -350,7 +345,7 @@ int file_size(const char* const path, double& size) {
     return 0;
 }
 
-int boinc_truncate(const char* const path, double size) {
+int boinc_truncate(const char* path, double size) {
     int retval;
 #if defined(_WIN32) && !defined(__CYGWIN32__)
     // the usual Windows nightmare.
@@ -371,7 +366,7 @@ int boinc_truncate(const char* const path, double size) {
 
 // remove everything from specified directory
 //
-int clean_out_dir(const char* const dirpath) {
+int clean_out_dir(const char* dirpath) {
     char filename[MAXPATHLEN], path[MAXPATHLEN];
     int retval;
     DIRREF dirp;
@@ -399,7 +394,7 @@ int clean_out_dir(const char* const dirpath) {
 // Win: use special version because stat() is slow, can be avoided
 // Unix: follow symbolic links
 //
-int dir_size(const char* const dirpath, double& size, bool recurse) {
+int dir_size(const char* dirpath, double& size, bool recurse) {
 #ifdef WIN32
     char path2[_MAX_PATH];
     sprintf(path2, "%s/*", dirpath);
@@ -435,7 +430,7 @@ int dir_size(const char* const dirpath, double& size, bool recurse) {
     while (1) {
         retval = dir_scan(filename, dirp, sizeof(filename));
         if (retval) break;
-        snprintf(subdir, sizeof(subdir), "%s/%s", dirpath, filename);
+        sprintf(subdir, "%s/%s", dirpath, filename);
 
         if (is_dir(subdir)) {
             if (recurse) {
@@ -454,7 +449,7 @@ int dir_size(const char* const dirpath, double& size, bool recurse) {
     return 0;
 }
 
-FILE* boinc_fopen(const char* const path, const char* mode) {
+FILE* boinc_fopen(const char* path, const char* mode) {
     // if opening for read, and file isn't there,
     // leave now (avoid 5-second delay!!)
     //
@@ -505,7 +500,7 @@ FILE* boinc_fopen(const char* const path, const char* mode) {
 }
 
 
-int boinc_file_exists(const char* const path) {
+int boinc_file_exists(const char* path) {
     struct stat buf;
     if (stat(path, &buf)) {
         return false;     // stat() returns zero on success
@@ -515,7 +510,7 @@ int boinc_file_exists(const char* const path) {
 
 // same, but doesn't traverse symlinks
 //
-int boinc_file_or_symlink_exists(const char* const path) {
+int boinc_file_or_symlink_exists(const char* path) {
     struct stat buf;
 #ifdef _WIN32
     if (stat(path, &buf)) {
@@ -529,7 +524,7 @@ int boinc_file_or_symlink_exists(const char* const path) {
 
 // returns zero on success, nonzero if didn't touch file
 //
-int boinc_touch_file(const char* const path) {
+int boinc_touch_file(const char *path) {
 
     if (boinc_file_exists(path)) {
         return 0;
@@ -553,8 +548,8 @@ int boinc_copy(const char* orig, const char* newf) {
     }
     return 0;
 #elif defined(__EMX__)
-    char cmd[2*MAXPATHLEN+5];
-    snprintf(cmd, sizeof(cmd), "copy \"%s\" \"%s\"", orig, newf);
+    char cmd[2*MAXPATHLEN];
+    sprintf(cmd, "copy \"%s\" \"%s\"", orig, newf);
     return system(cmd);
 #else
     // POSIX requires that shells run from an application will use the 
@@ -587,14 +582,14 @@ int boinc_copy(const char* orig, const char* newf) {
     fclose(src);
     fclose(dst);
     // Copy file's ownership, permissions to the extent we are allowed
-    if (lstat(orig, &sbuf)) retval=ERR_FWRITE;             // Get source file's info
-    if (chown(newf, sbuf.st_uid, sbuf.st_gid)) retval=ERR_FWRITE;
-    if (chmod(newf, sbuf.st_mode)) retval=ERR_FWRITE;
+    lstat(orig, &sbuf);             // Get source file's info
+    chown(newf, sbuf.st_uid, sbuf.st_gid);
+    chmod(newf, sbuf.st_mode);
     return retval;
 #endif
 }
 
-static int boinc_rename_aux(const char* const old, const char* const newf) {
+static int boinc_rename_aux(const char* old, const char* newf) {
 #ifdef _WIN32
     if (MoveFileExA(old, newf, MOVEFILE_REPLACE_EXISTING|MOVEFILE_WRITE_THROUGH)) return 0;
     return GetLastError();
@@ -604,7 +599,7 @@ static int boinc_rename_aux(const char* const old, const char* const newf) {
     //
     int retval = rename(old, newf);
     if (retval) {
-        char buf[MAXPATHLEN+MAXPATHLEN+1+7];
+        char buf[MAXPATHLEN+MAXPATHLEN];
         sprintf(buf, "mv \"%s\" \"%s\"", old, newf);
         retval = system(buf);
     }
@@ -613,7 +608,7 @@ static int boinc_rename_aux(const char* const old, const char* const newf) {
 #endif
 }
 
-int boinc_rename(const char* const old, const char* const newf) {
+int boinc_rename(const char* old, const char* newf) {
     int retval=0;
 
     retval = boinc_rename_aux(old, newf);
@@ -630,7 +625,7 @@ int boinc_rename(const char* const old, const char* const newf) {
 
 // make a dir that's owner and group RWX
 //
-int boinc_mkdir(const char* const path) {
+int boinc_mkdir(const char* path) {
     if (is_dir(path)) return 0;
 #ifdef _WIN32
     if (!CreateDirectoryA(path, NULL)) {
@@ -645,7 +640,7 @@ int boinc_mkdir(const char* const path) {
     return 0;
 }
 
-int boinc_rmdir(const char* const name) {
+int boinc_rmdir(const char* name) {
 #ifdef _WIN32
     if (!RemoveDirectoryA(name)) {
         return ERR_RMDIR;
@@ -658,7 +653,7 @@ int boinc_rmdir(const char* const name) {
 }
 
 #ifndef _WIN32
-int boinc_chown(const char* const path, gid_t gid) {
+int boinc_chown(const char* path, gid_t gid) {
     if (gid) {
         if (chown(path, (uid_t)-1, gid)) {
             return ERR_CHOWN;
@@ -671,7 +666,7 @@ int boinc_chown(const char* const path, gid_t gid) {
 // if "filepath" is of the form a/b/c,
 // create directories dirpath/a, dirpath/a/b etc.
 //
-int boinc_make_dirs(const char* const dirpath, const char* const filepath) {
+int boinc_make_dirs(const char* dirpath, const char* filepath) {
     char buf[MAXPATHLEN], oldpath[MAXPATHLEN], newpath[MAXPATHLEN];
     int retval;
     char *p, *q;
@@ -685,7 +680,7 @@ int boinc_make_dirs(const char* const dirpath, const char* const filepath) {
         p = strchr(q, '/');
         if (!p) break;
         *p = 0;
-        snprintf(newpath, sizeof(newpath), "%s/%s", oldpath, q);
+        sprintf(newpath, "%s/%s", oldpath, q);
         retval = boinc_mkdir(newpath);
         if (retval) return retval;
         safe_strcpy(oldpath, newpath);
@@ -750,7 +745,7 @@ int FILE_LOCK::unlock(const char* filename) {
     return 0;
 }
 
-void boinc_getcwd(char* const path) {
+void boinc_getcwd(char* path) {
 #ifdef _WIN32
     getcwd(path, MAXPATHLEN);
 #else
@@ -762,7 +757,7 @@ void boinc_getcwd(char* const path) {
 #endif
 }
 
-void relative_to_absolute(const char* const relname, char* const path) {
+void relative_to_absolute(const char* relname, char* path) {
     boinc_getcwd(path);
     if (strlen(relname)) {
         strcat(path, "/");
@@ -771,7 +766,7 @@ void relative_to_absolute(const char* const relname, char* const path) {
 }
 
 #if defined(_WIN32) && !(defined(WXDEBUG) || defined(WXNDEBUG))
-int boinc_allocate_file(const char* const path, double size) {
+int boinc_allocate_file(const char* path, double size) {
     int retval = 0;
     HANDLE h = CreateFile(
         path,
@@ -833,7 +828,7 @@ int get_filesystem_info(double &total_space, double &free_space, char*) {
         total_space = (double)dwTotalClusters * dwSectPerClust * dwBytesPerSect;
     }
 #else
-int get_filesystem_info(double &total_space, double &free_space, const char* const path) {
+int get_filesystem_info(double &total_space, double &free_space, char* path) {
 #ifdef STATFS
     struct STATFS fs_info;
 
diff --git a/lib/filesys.h b/lib/filesys.h
index 21f01e6..9cf7adf 100644
--- a/lib/filesys.h
+++ b/lib/filesys.h
@@ -43,30 +43,30 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-  extern int boinc_delete_file(const char* const);
-  extern int boinc_touch_file(const char* const path);
-  extern FILE* boinc_fopen(const char* const path, const char* mode);
+  extern int boinc_delete_file(const char*);
+  extern int boinc_touch_file(const char *path);
+  extern FILE* boinc_fopen(const char* path, const char* mode);
   extern int boinc_copy(const char* orig, const char* newf);
-  extern int boinc_rename(const char* const old, const char* const newf);
-  extern int boinc_mkdir(const char* const);
+  extern int boinc_rename(const char* old, const char* newf);
+  extern int boinc_mkdir(const char*);
 #ifdef _WIN32
-  extern int boinc_allocate_file(const char* const, double size);
+  extern int boinc_allocate_file(const char*, double size);
 #else
-  extern int boinc_chown(const char* const, const gid_t);
+  extern int boinc_chown(const char*, gid_t);
 #endif
-  extern int boinc_rmdir(const char* const);
-  extern void boinc_getcwd(/* not const*/ char* const);
-  extern void relative_to_absolute(const char* const relname, /* not const*/ char* const path);
-  extern int boinc_make_dirs(const char* const, const char* const);
+  extern int boinc_rmdir(const char*);
+  extern void boinc_getcwd(char*);
+  extern void relative_to_absolute(const char* relname, char* path);
+  extern int boinc_make_dirs(const char*, const char*);
   extern char boinc_failed_file[MAXPATHLEN];
-  extern int is_file(const char* const path);
-  extern int is_dir(const char* const path);
-  extern int is_file_follow_symlinks(const char* const path);
-  extern int is_dir_follow_symlinks(const char* const path);
-  extern int is_symlink(const char* const path);
-  extern int boinc_truncate(const char* const, double);
-  extern int boinc_file_exists(const char* const path);
-  extern int boinc_file_or_symlink_exists(const char* const path);
+  extern int is_file(const char* path);
+  extern int is_dir(const char* path);
+  extern int is_file_follow_symlinks(const char* path);
+  extern int is_dir_follow_symlinks(const char* path);
+  extern int is_symlink(const char* path);
+  extern int boinc_truncate(const char*, double);
+  extern int boinc_file_exists(const char* path);
+  extern int boinc_file_or_symlink_exists(const char* path);
 
 #ifdef __cplusplus
 }
@@ -75,10 +75,10 @@ extern "C" {
 /* C++ specific prototypes/defines follow here */
 #ifdef __cplusplus
 
-extern int file_size(const char* const, double&);
-extern int clean_out_dir(const char* const);
-extern int dir_size(const char* const dirpath, double&, bool recurse=true);
-extern int get_filesystem_info(double& total, double& free, const char* const path=const_cast<char *>("."));
+extern int file_size(const char*, double&);
+extern int clean_out_dir(const char*);
+extern int dir_size(const char* dirpath, double&, bool recurse=true);
+extern int get_filesystem_info(double& total, double& free, char* path=const_cast<char *>("."));
 
 // TODO TODO TODO
 // remove this code - the DirScanner class does the same thing.
@@ -100,7 +100,7 @@ extern int dir_scan(char*, DIRREF, int);
 extern int dir_scan(std::string&, DIRREF);
 extern void dir_close(DIRREF);
 
-extern bool is_dir_empty(const char* const);
+extern bool is_dir_empty(const char*);
 
 class DirScanner {
 #if defined(_WIN32) && !defined(__CYGWIN32__)
diff --git a/lib/mfile.cpp b/lib/mfile.cpp
index 47b813c..7e12e41 100644
--- a/lib/mfile.cpp
+++ b/lib/mfile.cpp
@@ -38,14 +38,13 @@
 MFILE::MFILE() {
     buf = (char*)malloc(64*1024);
     len = 0;
-    f = NULL;
 }
 
 MFILE::~MFILE() {
-    close();
+    if (buf) free(buf);
 }
 
-int MFILE::open(const char* const path, const char* const mode) {
+int MFILE::open(const char* path, const char* mode) {
     f = boinc_fopen(path, mode);
     if (!f) return ERR_FOPEN;
     if (!buf) buf = (char*)malloc(64*1024);
@@ -68,7 +67,7 @@ static inline char* realloc_aux(char* p, size_t len) {
 
 #define BUFSIZE 100000
 
-int MFILE::vprintf(const char* const format, va_list ap) {
+int MFILE::vprintf(const char* format, va_list ap) {
     char buf2[BUFSIZE];
     int n, k;
 
@@ -94,7 +93,7 @@ int MFILE::vprintf(const char* const format, va_list ap) {
     return k;
 }
 
-int MFILE::printf(const char* const format, ...) {
+int MFILE::printf(const char* format, ...) {
     int n;
     va_list ap;
 
@@ -104,7 +103,7 @@ int MFILE::printf(const char* const format, ...) {
     return n;
 }
 
-size_t MFILE::write(const void *ptr, const size_t size, const size_t nitems) {
+size_t MFILE::write(const void *ptr, size_t size, size_t nitems) {
     buf = (char *)realloc_aux( buf, len+(size*nitems)+1 );
     if (!buf) {
         fprintf(stderr,
@@ -119,7 +118,7 @@ size_t MFILE::write(const void *ptr, const size_t size, const size_t nitems) {
     return nitems;
 }
 
-int MFILE::_putchar(const char c) {
+int MFILE::_putchar(char c) {
     buf = (char*)realloc_aux(buf, len+1+1);
     if (!buf) {
         fprintf(stderr,
@@ -133,7 +132,7 @@ int MFILE::_putchar(const char c) {
     return c;
 }
 
-int MFILE::puts(const char* const p) {
+int MFILE::puts(const char* p) {
     int n = (int)strlen(p);
     buf = (char*)realloc_aux(buf, len+n+1);
     if (!buf) {
diff --git a/lib/mfile.h b/lib/mfile.h
index e41beb4..39e68a6 100644
--- a/lib/mfile.h
+++ b/lib/mfile.h
@@ -37,12 +37,12 @@ class MFILE {
 public:
     MFILE();
     ~MFILE();
-    int open(const char* const path, const char* const mode);
-    int _putchar(const char);
-    int puts(const char* const s);
-    int vprintf(const char* const format, va_list);
-    int printf(const char* const format, ...);
-    size_t write(const void *, const size_t size, const size_t nitems);
+    int open(const char* path, const char* mode);
+    int _putchar(char);
+    int puts(const char*);
+    int vprintf(const char* format, va_list);
+    int printf(const char* format, ...);
+    size_t write(const void *, size_t size, size_t nitems);
     int close();
     int flush();
     long tell() const;
diff --git a/lib/network.cpp b/lib/network.cpp
index a2c7fde..0b7965a 100644
--- a/lib/network.cpp
+++ b/lib/network.cpp
@@ -71,7 +71,7 @@ const char* socket_error_str() {
     case WSAENOTSOCK:
         return "not a socket";
     }
-    snprintf(buf, sizeof(buf), "error %d", e);
+    sprintf(buf, "error %d", e);
     return buf;
 #else
     switch (h_errno) {
@@ -85,11 +85,11 @@ const char* socket_error_str() {
         return "host not found or server failure";
 #ifdef NETDB_INTERNAL
     case NETDB_INTERNAL:
-        snprintf(buf, sizeof(buf), "network internal error %d",errno);
+        sprintf(buf,"network internal error %d",errno);
         return buf;
 #endif
     }
-    snprintf(buf, sizeof(buf), "error %d", h_errno);
+    sprintf(buf, "error %d", h_errno);
     return buf;
 #endif
 }
diff --git a/lib/parse_test.cpp b/lib/parse_test.cpp
index f88873e..e388e1f 100644
--- a/lib/parse_test.cpp
+++ b/lib/parse_test.cpp
@@ -57,7 +57,6 @@ int main() {
         exit(1);
     }
     parse(f);
-    fclose(f);
 }
 
 /* try it with something like:
diff --git a/lib/procinfo_win.cpp b/lib/procinfo_win.cpp
index 0e51334..8ab2299 100644
--- a/lib/procinfo_win.cpp
+++ b/lib/procinfo_win.cpp
@@ -25,9 +25,6 @@ static int get_process_information(PVOID* ppBuffer, PULONG pcbBuffer) {
     tNTQSI   pNTQSI = (tNTQSI)GetProcAddress(hNTDllLib, "NtQuerySystemInformation");
     ULONG    cbBuffer = 0;
 
-    if (!ppBuffer) return ERR_NULL;
-    if (!pcbBuffer) return ERR_NULL;
-
     while (1) {
         // Store the buffer size since it appears that somebody is monkeying around
         //   with the return values on some systems.
diff --git a/lib/shmem.cpp b/lib/shmem.cpp
index fd3bf36..b04ab11 100644
--- a/lib/shmem.cpp
+++ b/lib/shmem.cpp
@@ -337,10 +337,7 @@ int create_shmem_mmap(const char *path, size_t size, void** pp) {
         // area to all zeros because they write beyond the old EOF. 
         // See the lseek man page for details.
         lseek(fd, size-1, SEEK_SET);
-        if (1 != write(fd, "\0", 1)) {
-	    close(fd);
-	    return ERR_SHMGET;
-	}
+        write(fd, "\0", 1);
     }
 
     *pp = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0);
diff --git a/lib/unix_util.cpp b/lib/unix_util.cpp
index 88465d9..8c628c9 100644
--- a/lib/unix_util.cpp
+++ b/lib/unix_util.cpp
@@ -61,13 +61,7 @@ int setenv(const char *name, const char *value, int overwrite) {
             }
             if (i!=envstrings.end()) {
                 // we allocated this string.  Reallocate it.
-		char *b=buf;
                 buf=(char *)realloc(buf,strlen(name)+strlen(value)+2);
-		if (!buf) {
-		    free(b);
-		    errno=ENOMEM;
-		    return -1;
-		}
                 *i=buf;
             } else {
                 // someone else allocated the string.  Allocate new memory.
diff --git a/locale/Makefile.am b/locale/Makefile.am
index 0affdb2..a8850cf 100644
--- a/locale/Makefile.am
+++ b/locale/Makefile.am
@@ -21,7 +21,7 @@ locale_dirs = \
 	gl \
 	hr \
 	hu \
-	it_IT \
+	it \
 	ja \
 	ko \
 	lt \
diff --git a/py/boinc_path_config.py.in b/py/boinc_path_config.py.in
index 5127367..fc5fa96 100644
--- a/py/boinc_path_config.py.in
+++ b/py/boinc_path_config.py.in
@@ -8,5 +8,5 @@
 
 import sys, os
 
-TOP_BUILD_DIR = "/usr/share/boinc-server-maker"
+TOP_BUILD_DIR = "@TOP_BUILD_DIR@"
 sys.path.insert(0, os.path.join(TOP_BUILD_DIR, 'py'))
diff --git a/samples/wrapper/Makefile b/samples/wrapper/Makefile
index f10b8a0..bccc0f7 100644
--- a/samples/wrapper/Makefile
+++ b/samples/wrapper/Makefile
@@ -37,4 +37,4 @@ REGEXP_OBJS = \
 	regexp_report.o
 
 wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(REGEXP_OBJS)
-	g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a -pthread -lboinc_api -lboinc -lboinc_zip $(LDFLAGS)
+	g++ $(CXXFLAGS) $(CPPFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a -pthread -lboinc_api -lboinc -lboinc_zip
diff --git a/samples/wrapper/build_android.sh b/samples/wrapper/build_android.sh
index 941d3bc..e0e11eb 100755
--- a/samples/wrapper/build_android.sh
+++ b/samples/wrapper/build_android.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#/bin/sh
 #script to compile Wrapper for Android
 
 export ANDROIDTC="$HOME/android-tc"
diff --git a/sched/Makefile.am b/sched/Makefile.am
index 4eabec0..30bb9be 100644
--- a/sched/Makefile.am
+++ b/sched/Makefile.am
@@ -4,7 +4,7 @@
 include $(top_srcdir)/Makefile.incl
 
 AM_CPPFLAGS += $(MYSQL_CFLAGS) $(PTHREAD_CFLAGS)
-AM_LDFLAGS += -static -L../lib/.libs/
+AM_LDFLAGS += -static
 
 if ENABLE_LIBRARIES
 
@@ -116,7 +116,7 @@ schedshare_PROGRAMS = \
     sample_trivial_validator \
     sample_work_generator \
     single_job_assimilator \
-    size_regulator \
+	size_regulator \
     transitioner \
     trickle_credit \
     trickle_echo \
@@ -129,10 +129,11 @@ schedcgi_PROGRAMS= \
 schedshare_DATA = \
     db_dump_spec.xml \
     assimilator.py \
-    pymw_assimilator.py
+    pymw_assimilator.py \
+    transitioner_catchup.php
 
 # scripts that 'make install' should put in bindir
-schedshare_SCRIPTS = start stop status transitioner_catchup.php
+schedshare_SCRIPTS = start stop status
 
 noinst_HEADERS = \
     assimilate_handler.h \
@@ -256,7 +257,7 @@ update_stats_SOURCES = update_stats.cpp
 update_stats_LDADD = $(SERVERLIBS)
 
 file_upload_handler_SOURCES = file_upload_handler.cpp
-file_upload_handler_LDADD = $(SERVERLIBS) -lboinc
+file_upload_handler_LDADD = $(SERVERLIBS)
 
 make_work_SOURCES = make_work.cpp
 make_work_LDADD = $(SERVERLIBS)
@@ -298,7 +299,7 @@ fcgi_file_upload_handler_SOURCES = \
     sched_config.cpp \
     sched_msgs.cpp 
 fcgi_file_upload_handler_CPPFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS)
-fcgi_file_upload_handler_LDADD = $(SERVERLIBS_FCGI) -lboinc
+fcgi_file_upload_handler_LDADD = $(SERVERLIBS_FCGI)
 
 endif
 # end of "if ENABLE_FCGI"
diff --git a/sched/feeder.cpp b/sched/feeder.cpp
index 19f56a1..0b79774 100644
--- a/sched/feeder.cpp
+++ b/sched/feeder.cpp
@@ -115,7 +115,6 @@ using std::vector;
 #include "util.h"
 #include "str_util.h"
 #include "svn_version.h"
-#include "filesys.h"
 
 #include "credit.h"
 #include "sched_config.h"
diff --git a/sched/file_upload_handler.cpp b/sched/file_upload_handler.cpp
index 2a7a42e..3d42d38 100644
--- a/sched/file_upload_handler.cpp
+++ b/sched/file_upload_handler.cpp
@@ -138,13 +138,13 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
     bytes_left = nbytes - offset;
 
     while (bytes_left > 0) {
-        int m;
+        int n, m, to_write;
 
         m = bytes_left<(double)BLOCK_SIZE ? (int)bytes_left : BLOCK_SIZE;
 
         // try to get m bytes from socket (n>=0 is number actually returned)
         //
-        size_t n = fread(buf, 1, m, in);
+        n = fread(buf, 1, m, in);
 
         // delay opening the file until we've done the first socket read
         // to avoid filesystem lockups (WCG, possible paranoia)
@@ -210,7 +210,7 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
 
         // try to write n bytes to file
         //
-        size_t to_write=n;
+        to_write=n;
         while (to_write > 0) {
             ssize_t ret = write(fd, buf+n-to_write, to_write);
             if (ret < 0) {
diff --git a/sched/get_file.cpp b/sched/get_file.cpp
index e4abc6f..e84f44b 100644
--- a/sched/get_file.cpp
+++ b/sched/get_file.cpp
@@ -38,7 +38,6 @@
 
 #include "backend_lib.h"
 #include "str_replace.h"
-#include "filesys.h"
 
 #include "sched_config.h"
 #include "sched_util.h"
diff --git a/sched/make_work.cpp b/sched/make_work.cpp
index 02b9d62..b8d84c3 100644
--- a/sched/make_work.cpp
+++ b/sched/make_work.cpp
@@ -52,7 +52,6 @@ using std::string;
 #include "str_replace.h"
 #include "str_util.h"
 #include "svn_version.h"
-#include "filesys.h"
 
 #define LOCKFILE            "make_work.out"
 #define PIDFILE             "make_work.pid"
diff --git a/sched/sample_work_generator.cpp b/sched/sample_work_generator.cpp
index 1f5a7b7..ea36225 100644
--- a/sched/sample_work_generator.cpp
+++ b/sched/sample_work_generator.cpp
@@ -47,7 +47,6 @@
 #include "str_replace.h"
 #include "util.h"
 #include "svn_version.h"
-#include "filesys.h"
 
 #include "sched_config.h"
 #include "sched_util.h"
diff --git a/sched/sched_assign.cpp b/sched/sched_assign.cpp
index 1933e0c..1b1f907 100644
--- a/sched/sched_assign.cpp
+++ b/sched/sched_assign.cpp
@@ -33,7 +33,6 @@
 #include "crypt.h"
 #include "backend_lib.h"
 #include "error_numbers.h"
-#include "filesys.h"
 
 #include "sched_main.h"
 #include "sched_msgs.h"
diff --git a/sched/sched_driver.cpp b/sched/sched_driver.cpp
index 072161c..e999a01 100644
--- a/sched/sched_driver.cpp
+++ b/sched/sched_driver.cpp
@@ -53,9 +53,9 @@
 using std::vector;
 
 struct HOST_DESC{
-    char os_name[512];
-    char p_vendor[512];
-    char p_model[512];
+    char os_name[256];
+    char p_vendor[256];
+    char p_model[256];
 };
 
 vector<HOST_DESC> host_descs;
@@ -63,7 +63,7 @@ double min_time = 1;
 double max_time = 1;
 
 void read_hosts() {
-    char buf[1024], buf2[1024];
+    char buf[256], buf2[256];
     host_descs.clear();
     FILE* f = fopen("host_descs.txt", "r");
     if (!f) {
diff --git a/sched/sched_shmem.cpp b/sched/sched_shmem.cpp
index e83e1bf..caeb5f7 100644
--- a/sched/sched_shmem.cpp
+++ b/sched/sched_shmem.cpp
@@ -40,7 +40,6 @@ using std::vector;
 #include "sched_msgs.h"
 #include "sched_types.h"
 #include "sched_util.h"
-#include "filesys.h"
 
 #include "sched_shmem.h"
 
diff --git a/sched/sched_timezone.cpp b/sched/sched_timezone.cpp
index 2bf2edf..b2c843e 100644
--- a/sched/sched_timezone.cpp
+++ b/sched/sched_timezone.cpp
@@ -28,7 +28,6 @@
 
 #include "sched_types.h"
 #include "sched_msgs.h"
-#include "filesys.h"
 #include "sched_config.h"
 
 #ifdef _USING_FCGI_
diff --git a/sched/transitioner.cpp b/sched/transitioner.cpp
index e9162c8..ca875b5 100644
--- a/sched/transitioner.cpp
+++ b/sched/transitioner.cpp
@@ -44,7 +44,7 @@
 #include "error_numbers.h"
 #include "str_util.h"
 #include "svn_version.h"
-#include "filesys.h"
+
 #include "sched_config.h"
 #include "credit.h"
 #include "sched_util.h"
diff --git a/sched/wu_check.cpp b/sched/wu_check.cpp
index 63f7455..7de20fe 100644
--- a/sched/wu_check.cpp
+++ b/sched/wu_check.cpp
@@ -35,7 +35,6 @@
 #include "error_numbers.h"
 #include "parse.h"
 #include "util.h"
-#include "filesys.h"
 
 #include "sched_config.h"
 #include "sched_util.h"
diff --git a/stripchart/stripchart b/stripchart/stripchart
index 71e2fcb..db4b6b7 100755
--- a/stripchart/stripchart
+++ b/stripchart/stripchart
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # The contents of this file are subject to the Mozilla Public License
 # Version 1.0 (the "License"); you may not use this file except in
@@ -47,7 +47,7 @@ $|++;
 ################
 
 # Where is the .cnf file?
-$cnfpath = "/etc/stripchart.cnf";
+$cnfpath = "./stripchart.cnf";
 
 # Read it in:
 open (CNFFILE,$cnfpath) or die "cannot open configuration file: $cnfpath\nmake sure this variable is set properly";
diff --git a/stripchart/stripchart.cgi b/stripchart/stripchart.cgi
index 0ac8a9f..26fa9fb 100755
--- a/stripchart/stripchart.cgi
+++ b/stripchart/stripchart.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#! /usr/bin/env perl
 
 # The contents of this file are subject to the Mozilla Public License
 # Version 1.0 (the "License"); you may not use this file except in
@@ -44,7 +44,7 @@ use File::Basename;
 ################
  
 # Where is the .cnf file? 
-$cnfpath = "/etc/stripchart.cnf";
+$cnfpath = "./stripchart.cnf";
 
 # Read it in: 
 open (CNFFILE,$cnfpath) or die "cannot open configuration file: $cnfpath\nmake sure this variable is set properly"; 
diff --git a/stripchart/stripchart.cnf b/stripchart/stripchart.cnf
index 1d616ec..834ee28 100644
--- a/stripchart/stripchart.cnf
+++ b/stripchart/stripchart.cnf
@@ -4,7 +4,7 @@ use Time::Local;
 $majorversion = 2; $minorversion = 1;
 
 # Directory where gnuplot is
-$gnuplot = "/usr/bin"
+$gnuplot = "/usr/local/bin"
  
 # Temporary files
 $suffix = rand(10000);
@@ -38,7 +38,7 @@ $daysecs = 86400;
 $tzdiff = timegm($sec,$min,$hour,$mday,$mon,$year) - timelocal($sec,$min,$hour,$mday,$mon,$year);
 
 # Where is the stripchart executable located?
-$stripchartexe = "/usr/lib/cgi-bin/stripchart"
+$stripchartexe = "./stripchart"
  
 # What is the default number of stripcharts?
 $defaultnumcharts = 1;
@@ -48,11 +48,11 @@ $defaultflags = "-s";
 
 # Where is the list of datafiles for stripchart.cgi?
 # Note: there is a sample copy in the samples directory: 
-$datafilelist = "/usr/share/stripchart/datafiles";
+$datafilelist = "datafiles";
  
-# Where is the list of user-defined cgi queries?
+# Where is the list of user-definied cgi queries?
 # Note: this file gets created by the cgi - must put it somewhere that the cgi user can write to 
-$queryfilelist = "/tmp/querylist";
+$queryfilelist = "querylist";
 
 # What time is it right now?
 $rightnow = time;
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 0abffa3..47bf81d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -31,14 +31,11 @@ dist_tools_SCRIPTS = \
     manage_privileges \
     run_in_ops \
     stage_file \
-    watch_tcp
-
-dist_tools_DATA = \
-    project.xml \
-    gui_urls.xml
+    watch_tcp \
+    project.xml
 
 AM_CXXFLAGS += $(MYSQL_CFLAGS)
-AM_LDFLAGS += -static -L../sched -L../lib/.libs
+AM_LDFLAGS += -static
 
 cancel_jobs_SOURCES = cancel_jobs.cpp
 cancel_jobs_LDADD = $(SERVERLIBS)
diff --git a/tools/create_work.cpp b/tools/create_work.cpp
index e545f61..4e27bdf 100644
--- a/tools/create_work.cpp
+++ b/tools/create_work.cpp
@@ -37,7 +37,6 @@
 #include "sched_config.h"
 #include "str_replace.h"
 #include "util.h"
-#include "filesys.h"
 
 void usage() {
     fprintf(stderr,
diff --git a/tools/db_query b/tools/db_query
index 02aaf54..4852cfa 100755
--- a/tools/db_query
+++ b/tools/db_query
@@ -1,4 +1,4 @@
-#!/usr/bin/tcsh
+#! /bin/tcsh
 
 set CIVDATE = `date "+%Y:%m:%d:%H:%M"`
 set UNIXDATE = `perl -e 'print time()'`
diff --git a/tools/dir_hier_path.cpp b/tools/dir_hier_path.cpp
index fa07c6f..30d4d30 100644
--- a/tools/dir_hier_path.cpp
+++ b/tools/dir_hier_path.cpp
@@ -29,7 +29,7 @@
 #include "sched_config.h"
 #include "sched_util.h"
 #include "str_util.h"
-#include "filesys.h"
+
 
 const char *usage = 
 "\nUsage: dir_hier_path <filename>\n"
diff --git a/tools/make_project b/tools/make_project
index 45617bf..99449ed 100755
--- a/tools/make_project
+++ b/tools/make_project
@@ -321,7 +321,6 @@ print >>open(httpd_conf_template_filename,'w'), '''
     <Directory "%(proot)s/html">
         Options Indexes FollowSymlinks MultiViews
         AllowOverride AuthConfig
-	Require all granted
         Order allow,deny
         Allow from all
     </Directory>
@@ -329,7 +328,6 @@ print >>open(httpd_conf_template_filename,'w'), '''
     <Directory "%(proot)s/cgi-bin">
         Options ExecCGI
         AllowOverride AuthConfig
-	Require all granted
         Order allow,deny
         Allow from all
     </Directory>
diff --git a/tools/update_versions b/tools/update_versions
index 984d671..86a89c8 100755
--- a/tools/update_versions
+++ b/tools/update_versions
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#! /usr/bin/env php
 
 <?php
 // This file is part of BOINC.
diff --git a/tools/watch_tcp b/tools/watch_tcp
index 5686014..3f4eede 100755
--- a/tools/watch_tcp
+++ b/tools/watch_tcp
@@ -1,4 +1,4 @@
-#!/usr/bin/tcsh
+#! /bin/csh 
 # 
 # by jeffc 
 # 
diff --git a/vda/Makefile.am b/vda/Makefile.am
index 68912cc..eccbbfe 100644
--- a/vda/Makefile.am
+++ b/vda/Makefile.am
@@ -4,7 +4,7 @@ vdadir=$(prefix)/lib/boinc-server-maker/vda
 vda_PROGRAMS = vda vdad ssim
 
 AM_CXXFLAGS += $(MYSQL_CFLAGS)
-AM_LDFLAGS += -static -L../lib/.libs -L../sched
+AM_LDFLAGS += -static
 
 vda_SOURCES = vda.cpp vda_lib.cpp vda_lib2.cpp vda_policy.cpp stats.cpp
 vda_LDADD = $(SERVERLIBS)
diff --git a/zip/unzip/ttyio.c b/zip/unzip/ttyio.c
index 4aeb329..a1a13b1 100644
--- a/zip/unzip/ttyio.c
+++ b/zip/unzip/ttyio.c
@@ -54,7 +54,6 @@
 #  define HAVE_TERMIOS_H
 #endif
 
-#include <unistd.h>	/* defines _POSIX_VERSION */
 #ifdef _POSIX_VERSION
 #  ifndef USE_POSIX_TERMIOS
 #    define USE_POSIX_TERMIOS  /* use POSIX style termio (termios) */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git



More information about the pkg-boinc-commits mailing list