- fix FCGI compile

svn path=/trunk/boinc/; revision=15265
This commit is contained in:
David Anderson 2008-05-20 22:36:43 +00:00
parent 8b9dae29d8
commit c25344e343
3 changed files with 21 additions and 11 deletions

View File

@ -4186,3 +4186,10 @@ David May 20 2008
style2.css
sched/
sched_send.C
David May 20 2008
- fix FCGI compile
sched/
feeder.C
hr_info.C

View File

@ -146,6 +146,20 @@ HR_INFO hr_info;
bool using_hr;
// true iff any app is using HR
// put this here (instead of hr_info.C) so that FCGI compile
// won't choke on fscanf()
//
int PERF_INFO::read_file() {
FILE* f = fopen(PERF_INFO_FILENAME, "r");
if (!f) return ERR_FOPEN;
int n = fscanf(f, "%f %f",
&host_fpops_mean,
&host_fpops_stdev
);
fclose(f);
return 0;
}
void cleanup_shmem() {
ssp->ready = false;
detach_shmem((void*)ssp);

View File

@ -202,17 +202,6 @@ void HR_INFO::show(FILE* f) {
}
}
int PERF_INFO::read_file() {
FILE* f = fopen(PERF_INFO_FILENAME, "r");
if (!f) return ERR_FOPEN;
fscanf(f, "%f %f",
&host_fpops_mean,
&host_fpops_stdev
);
fclose(f);
return 0;
}
int PERF_INFO::write_file() {
FILE* f = fopen(PERF_INFO_FILENAME, "w");
if (!f) return ERR_FOPEN;