Define the putenv substitute in <stdlib.h> rather than in <config.h>.
[gnulib.git] / lib / getloadavg.c
index b2b1610..eac8483 100644 (file)
@@ -1,16 +1,16 @@
 /* Get the system load averages.
 
    Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994,
-   1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+   1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with gnulib.
    Bugs can be reported to bug-gnulib@gnu.org.
 
-   This program is free software; you can redistribute it and/or modify
+   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, or (at your option)
-   any later version.
+   the Free Software Foundation; either version 3 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
@@ -18,9 +18,7 @@
    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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* Compile-time symbols that this file uses:
 
    We also #define LDAV_PRIVILEGED if a program will require
    special installation to be able to call getloadavg.  */
 
-/* "configure" defines gl_GETLOADAVG to sidestep problems with
-   partially-configured source directories.  */
+/* "configure" defines CONFIGURING_GETLOADAVG to sidestep problems
+   with partially-configured source directories.  */
 
-#ifdef HAVE_CONFIG_H
-# ifndef gl_GETLOADAVG
-#  include <config.h>
-# endif
-#endif
-
-#ifndef gl_GETLOADAVG
+#ifndef CONFIGURING_GETLOADAVG
+# include <config.h>
 # include <stdbool.h>
 #endif
 
 #  include <sys/socket.h>
 #  include <net/route.h>
 #  include <sys/table.h>
+/* Tru64 4.0D's table.h redefines sys */
+#  undef sys
 # endif
 
 # if defined (__osf__) && (defined (mips) || defined (__mips__))