mirror of https://github.com/BOINC/boinc.git
- scheduler: get FCGI version to compile
svn path=/trunk/boinc/; revision=14621
This commit is contained in:
parent
8636ddd5ec
commit
f2761c6f68
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue