From f2761c6f683394d6f2f9bb7506b6141136d307fa Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 24 Jan 2008 20:22:54 +0000 Subject: [PATCH] - scheduler: get FCGI version to compile svn path=/trunk/boinc/; revision=14621 --- checkin_notes | 9 +++++++++ lib/miofile.C | 4 ++++ lib/util.C | 6 ++---- sched/Makefile.am | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index e27f9826ae..6f233695ed 100644 --- a/checkin_notes +++ b/checkin_notes @@ -778,3 +778,12 @@ Rom Jan 24 2008 lib/ util.C + +David Jan 24 2008 + - scheduler: get FCGI version to compile + + lib/ + miofile.C + util.C + sched/ + Makefile.am diff --git a/lib/miofile.C b/lib/miofile.C index b0fe2cb774..ffa61864cd 100644 --- a/lib/miofile.C +++ b/lib/miofile.C @@ -60,6 +60,8 @@ void MIOFILE::init_buf_write(char* _buf, int _len) { wbuf[0] = 0; } +#ifndef _USING_FCGI_ + int MIOFILE::printf(const char* format, ...) { int retval; @@ -78,6 +80,8 @@ int MIOFILE::printf(const char* format, ...) { return retval; } +#endif + char* MIOFILE::fgets(char* dst, int dst_len) { if (f) { return ::fgets(dst, dst_len, f); diff --git a/lib/util.C b/lib/util.C index 3995086785..9af320605f 100644 --- a/lib/util.C +++ b/lib/util.C @@ -466,8 +466,6 @@ void boinc_crash() { #endif } -#ifndef _USING_FCGI_ - // read file (at most max_len chars, if nonzero) into malloc'd buf // int read_file_malloc(const char* path, char*& buf, int max_len, bool tail) { @@ -481,12 +479,14 @@ int read_file_malloc(const char* path, char*& buf, int max_len, bool tail) { f = fopen(path, "r"); if (!f) return ERR_FOPEN; +#ifndef _USING_FCGI_ if (max_len && size > max_len) { if (tail) { fseek(f, (long)size-max_len, SEEK_SET); } size = max_len; } +#endif isize = (int) size; buf = (char*)malloc(isize+1); size_t n = fread(buf, 1, isize, f); @@ -495,8 +495,6 @@ int read_file_malloc(const char* path, char*& buf, int max_len, bool tail) { return 0; } -#endif - // read file (at most max_len chars, if nonzero) into string // int read_file_string(const char* path, string& result, int max_len, bool tail) { diff --git a/sched/Makefile.am b/sched/Makefile.am index f5670de609..35dcb8ee01 100644 --- a/sched/Makefile.am +++ b/sched/Makefile.am @@ -205,6 +205,7 @@ fcgi_SOURCES = \ ../lib/parse.C \ ../lib/shmem.C \ ../lib/synch.C \ + ../lib/str_util.C \ ../lib/util.C \ ../tools/process_result_template.C \ ../tools/backend_lib.C