summaryrefslogtreecommitdiff
path: root/lib/getloadavg.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-31 22:29:00 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-31 22:29:00 +0000
commit7092917c5e99e47cbf65f9d7b6d73a7d5de096d5 (patch)
treeaf281d13c2fcfe062b0e94a569ca4e01768257ab /lib/getloadavg.c
parentefc9686904177e6644b5528c4703f378daaee0b0 (diff)
downloadgnulib-7092917c5e99e47cbf65f9d7b6d73a7d5de096d5.tar.gz
* modules/getloadavg (Files): Add m4/getloadavg.m4.
(configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as the former is now obsolescent. * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h or stdbool.h, because they might not exist while configuring. * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is obsolescent, and programs should use gnulib instead. * m4/getloadavg.m4: New file, with contents taken from Autoconf but with prefixes changed.
Diffstat (limited to 'lib/getloadavg.c')
-rw-r--r--lib/getloadavg.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 6879527150..b2b161000e 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -1,7 +1,8 @@
/* Get the system load averages.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994,
- 1995, 1997, 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+ Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
Bugs can be reported to bug-gnulib@gnu.org.
@@ -80,13 +81,20 @@
We also #define LDAV_PRIVILEGED if a program will require
special installation to be able to call getloadavg. */
-/* This should always be first. */
+/* "configure" defines gl_GETLOADAVG to sidestep problems with
+ partially-configured source directories. */
+
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# ifndef gl_GETLOADAVG
+# include <config.h>
+# endif
+#endif
+
+#ifndef gl_GETLOADAVG
+# include <stdbool.h>
#endif
#include <errno.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>