mirror of
https://github.com/mirror/make.git
synced 2025-01-19 08:40:13 +08:00
Put #include of errno.h and decl of errno before #ifndef HAVE_GETLOADAVG.
This commit is contained in:
parent
fff5a9ece0
commit
0cb47363e1
19
getloadavg.c
19
getloadavg.c
@ -1,5 +1,5 @@
|
|||||||
/* Get the system load averages.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@ -80,9 +80,17 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Exclude all the code except the test program at the end
|
/* 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
|
#ifndef HAVE_GETLOADAVG
|
||||||
|
|
||||||
@ -331,11 +339,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#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
|
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
||||||
nlist method. */
|
nlist method. */
|
||||||
|
Loading…
Reference in New Issue
Block a user