diff --git a/checkin_notes b/checkin_notes index b903bffcec..b6917f9d3b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/sched/feeder.C b/sched/feeder.C index 5c0c9da570..dbe1769c68 100644 --- a/sched/feeder.C +++ b/sched/feeder.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); diff --git a/sched/hr_info.C b/sched/hr_info.C index cf8255a383..368c260c3d 100644 --- a/sched/hr_info.C +++ b/sched/hr_info.C @@ -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;