mirror of https://github.com/BOINC/boinc.git
- fix FCGI compile
svn path=/trunk/boinc/; revision=15265
This commit is contained in:
parent
8b9dae29d8
commit
c25344e343
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue