diff --git a/checkin_notes b/checkin_notes index 0e4c37ae1f..1158624650 100755 --- a/checkin_notes +++ b/checkin_notes @@ -10487,3 +10487,15 @@ Charlie 26 Sept 2006 client/ app_stats_mac.C hostinfo_unix.C + +David 27 Sept 2006 + - fix compile of FCGI scheduler and file upload handler + NOTE: I did this by manually putting in a #ifdef _USING_FCGI_ + in miofile.C + I don't understand why this was necessary. + + lib/ + miofile.C,h + parse.C + sched/ + Makefile.am diff --git a/doc/boinc_news.inc b/doc/boinc_news.inc index 121cf4f466..9f95e89fb1 100644 --- a/doc/boinc_news.inc +++ b/doc/boinc_news.inc @@ -1,6 +1,11 @@ the online workshop proceedings." +), array("September 11, 2006", "UW-Madison CAE, the first BOINC user to top the 1 TERAFLOPS barrier, diff --git a/lib/miofile.C b/lib/miofile.C index a14e35400d..9072d81c23 100644 --- a/lib/miofile.C +++ b/lib/miofile.C @@ -87,9 +87,13 @@ char* MIOFILE::fgets(char* dst, int len) { return dst; } -int MIOFILE::ungetc(int c) { +int MIOFILE::_ungetc(int c) { if (f) { - return ::ungetc(c, f); +#ifdef _USING_FCGI_ + return FCGI_ungetc(c, f); +#else + return ungetc(c, f); +#endif } buf--; *buf = c; diff --git a/lib/miofile.h b/lib/miofile.h index bbae78a56f..a92047fefd 100644 --- a/lib/miofile.h +++ b/lib/miofile.h @@ -26,6 +26,10 @@ #include "mfile.h" +#ifdef _USING_FCGI_ +#include "fcgi_stdio.h" +#endif + // MIOFILE lets you do formatted I/O to either a FILE or a memory buffer, // depending on how you initialize it. // @@ -42,7 +46,6 @@ // you can't do fdopen() on a socket. class MIOFILE { -private: MFILE* mf; FILE* f; char* buf; @@ -54,13 +57,15 @@ public: void init_buf(char*); int printf(const char* format, ...); char* fgets(char*, int); - int ungetc(int); - inline int getc() { + int _ungetc(int); + inline int _getc() { + if (f) { #ifdef _USING_FCGI_ - if (f) return FCGI_fgetc(f); + return FCGI_fgetc(f); #else - if (f) return ::getc(f); + return getc(f); #endif + } return (*buf)?(*buf++):EOF; } }; diff --git a/lib/parse.C b/lib/parse.C index ec4205dc7d..94a0e29a15 100644 --- a/lib/parse.C +++ b/lib/parse.C @@ -418,7 +418,7 @@ XML_PARSER::XML_PARSER(MIOFILE* _f) { bool XML_PARSER::scan_nonws(int& first_char) { int c; while (1) { - c = f->getc(); + c = f->_getc(); if (c == EOF) return true; if (isspace(c)) continue; first_char = c; @@ -433,7 +433,7 @@ bool XML_PARSER::scan_nonws(int& first_char) { bool XML_PARSER::scan_tag(char* buf, int len) { int c; while (1) { - c = f->getc(); + c = f->_getc(); if (c == EOF) return true; if (c == '>') { *buf = 0; @@ -452,10 +452,10 @@ bool XML_PARSER::scan_tag(char* buf, int len) { bool XML_PARSER::copy_until_tag(char* buf, int len) { int c; while (1) { - c = f->getc(); + c = f->_getc(); if (c == EOF) return true; if (c == '<') { - f->ungetc(c); + f->_ungetc(c); *buf = 0; return false; } @@ -650,7 +650,7 @@ int XML_PARSER::element_contents(const char* end_tag, char* buf, int buflen) { retval = ERR_XML_PARSE; break; } - int c = f->getc(); + int c = f->_getc(); if (c == EOF) { retval = ERR_XML_PARSE; break; diff --git a/sched/Makefile.am b/sched/Makefile.am index b35e18d489..636a4be58d 100644 --- a/sched/Makefile.am +++ b/sched/Makefile.am @@ -167,7 +167,6 @@ fcgi_SOURCES = \ sched_array.C \ sched_hr.C \ server_types.C \ - ../lib/synch.C \ sched_shmem.C \ sched_util.C \ sched_config.C \ @@ -176,15 +175,17 @@ fcgi_SOURCES = \ sched_timezone.C \ ../db/boinc_db.C \ ../db/db_base.C \ - ../lib/util.C \ + ../lib/base64.C \ ../lib/crypt.C \ ../lib/filesys.C \ - ../lib/parse.C \ - ../lib/base64.C \ - ../lib/shmem.C \ ../lib/md5.c \ ../lib/md5_file.C \ + ../lib/miofile.C \ ../lib/msg_log.C \ + ../lib/parse.C \ + ../lib/shmem.C \ + ../lib/synch.C \ + ../lib/util.C \ ../tools/process_result_template.C \ ../tools/backend_lib.C