summaryrefslogtreecommitdiff
path: root/src/getloadavg.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-06-04 05:24:48 +0000
committerRoland McGrath <roland@gnu.org>1994-06-04 05:24:48 +0000
commit9d666d456377991d167432f6823019f2ab9b4b1e (patch)
tree158cfe42dfb71f968eed716f5c5d6d1698928fa8 /src/getloadavg.c
parent361db25461401530d64d588cbbd0e2da2e3a822a (diff)
downloademacs-9d666d456377991d167432f6823019f2ab9b4b1e.tar.gz
Put #include of errno.h and decl of errno before #ifndef HAVE_GETLOADAVG.
Diffstat (limited to 'src/getloadavg.c')
-rw-r--r--src/getloadavg.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/getloadavg.c b/src/getloadavg.c
index 03b4de0239e..0f730a7ab2b 100644
--- a/src/getloadavg.c
+++ b/src/getloadavg.c
@@ -1,5 +1,5 @@
/* Get the system load averages.
- Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93
+ Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -80,9 +80,17 @@
#endif
#endif
-
/* Exclude all the code except the test program at the end
- if the system has its own `getloadavg' function. */
+ if the system has its own `getloadavg' function.
+
+ The declaration of `errno' is needed by the test program
+ as well as the function itself, so it comes first. */
+
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
#ifndef HAVE_GETLOADAVG
@@ -331,11 +339,6 @@
#endif
#include <stdio.h>
-#include <errno.h>
-
-#ifndef errno
-extern int errno;
-#endif
/* LOAD_AVE_TYPE should only get defined if we're going to use the
nlist method. */