--- projects/cms/source/ihost/libstatgrab/load_stat.c 2002/05/17 13:56:20 1.5 +++ projects/cms/source/ihost/libstatgrab/load_stat.c 2002/05/29 19:41:59 1.8 @@ -1,3 +1,27 @@ +/* + * i-scream central monitoring system + * http://www.i-scream.org.uk + * Copyright (C) 2000-2002 i-scream + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #ifdef SOLARIS @@ -9,13 +33,13 @@ char *get_load_stats(){ double loadav[3]; char *xml_load_out; -#ifdef OLDLINUX +#ifndef HAVE_GETLOADAVG FILE *f; char *loadavg; char *load_p; #endif -#ifdef OLDLINUX +#ifndef HAVE_GETLOADAVG if ((f=fopen("/proc/loadavg", "r" ))==NULL) { errf("Failed to open load averages (%m)"); return NULL;