Paul Eggert
d3fdc82a4e
(getloadavg) [__CYGWIN__]: Port to cygwin.
...
[__linux__]: Allocate a big enough buffer for /proc/loadavg.
[!LDAV_DONE]: Avoid unused variable warning.
2005-07-08 23:41:43 +00:00
Paul Eggert
bd1806f708
Include fcntl--.h rather than fcntl.h.
...
Do not include unistd-safer.h.
(getloadavg): Don't call fd_safer; no longer needed
now that we include fcntl--.h.
2005-07-03 07:14:28 +00:00
Jim Meyering
410f98fc2b
Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
2005-07-02 08:41:46 +00:00
Jim Meyering
58076430c3
Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
...
and don't include <sys/file.h>).
2005-07-01 20:55:29 +00:00
Paul Eggert
ab2edb9e33
Don't use "path" or "filename" to mean "file name"
...
in comments or local variable names.
2005-06-02 05:05:29 +00:00
Jim Meyering
116e6fb244
Update FSF postal mail address.
2005-05-14 07:58:06 +00:00
Paul Eggert
8bd8ca4bf3
Include unistd-safer.h.
...
(getloadavg): Use fd_safer.
2005-04-11 20:02:28 +00:00
Paul Eggert
0040b0209c
Include intprops.h instead of limits.h.
...
(INT_STRLEN_BOUND): Remove.
2005-03-09 19:21:43 +00:00
Paul Eggert
21e7da65ea
Include <stdbool.h>.
...
(getloadavg_initialized): Use bool for booleans.
2004-08-02 22:48:05 +00:00
Paul Eggert
92a74b0a88
Include <errno.h>, <stdio.h>, <stdlib.h> even
...
if HAVE_GETLOADAVG is defined, so that the test program can work.
(errno): Remove declaration; not needed in C89 or later.
Include "c-strtod.h".
Do not include locale.h or define setlocale; no longer needed.
Include <limits.h>.
(INT_STRLEN_BOUND): New macro.
(getloadavg): Use it to compute buffer size.
Don't assume that buffer will be properly terminated by 'read'.
Use c_strtod instead of setlocale.
(main) [defined TEST]: Return int, not void.
2004-07-12 18:19:38 +00:00
Jim Meyering
c56f9d7cb0
Use `file system', not filesystem in a comment.
2004-06-30 22:39:13 +00:00
Jim Meyering
8c5584a151
Sync from gnulib.
2004-04-04 06:51:11 +00:00
Jim Meyering
922e4e22cc
Merge changes from emacs (via gnulib).
2004-03-30 13:50:44 +00:00
Jim Meyering
e7c9ecd175
(getloadavg): Use true', not
1'.
2004-03-04 13:13:43 +00:00
Jim Meyering
e819dd0dd9
Include "cloexec.h".
...
(getloadavg): Use set_cloexec_flag instead of manual fcntl call.
2004-03-03 22:06:47 +00:00
Jim Meyering
8f4368f10b
(getloadavg, main): Define via prototypes.
2003-09-10 08:44:15 +00:00
Jim Meyering
f8a1a4ef0c
Sync with gnulib.
2003-08-18 08:52:59 +00:00
Jim Meyering
d882eab2f2
Remove (or replace-with-TAB(s) to retain alignment)
...
each sequence of spaces before a TAB character.
2003-04-15 06:18:05 +00:00
Jim Meyering
243036c5fb
[HAVE_NLIST_H] (NLIST_STRUCT): Define.
2000-06-19 07:25:01 +00:00
Jim Meyering
5debbcc139
revert last change
2000-06-19 07:19:41 +00:00
Jim Meyering
890e86b6f9
s/NLIST_STRUCT/HAVE_NLIST_H/. Remove big
...
multi-platform `#ifndef NLIST_STRUCT' block.
2000-06-18 06:17:54 +00:00
Jim Meyering
a12101a224
Include locale.h.
...
[!HAVE_SETLOCALE]: Define-away setlocale.
(getloadavg): Ensure the sscanf of /proc/getloadavg data uses the
`C' numeric locale. Restore afterwards.
1999-01-31 16:54:00 +00:00
Jim Meyering
f574936f77
correct cpp-indentation
1997-07-15 14:05:07 +00:00
Jim Meyering
8abf2733e0
Merge with FSF.
1997-07-15 14:03:22 +00:00
Jim Meyering
af12dd6260
Add comment re HAVE_PSTAT_GETDYNAMIC.
1997-01-18 15:07:16 +00:00
Jim Meyering
c7837e95d2
Fix up indentation a little.
1997-01-15 04:59:07 +00:00
Jim Meyering
9130f4b9d2
Indent cpp-directives to reflect nesting.
1997-01-15 04:55:39 +00:00
Jim Meyering
c9893d18e3
[__SVR4]: Define SVR4.
...
Remove duplicate `|| defined(SVR4)' disjunct guarding the
#define KERNEL_FILE "/unix" definiton.
1996-12-07 19:03:13 +00:00
Jim Meyering
ee791d8ca1
[__linux__]: Don't bother with a.out/nlist/kernel
...
defines or includes -- Linux systems simply read /proc/loadavg.
1996-10-22 05:01:13 +00:00
Jim Meyering
fb9ee923ba
[__sun]: Define sun. Reported by Kaveh Ghazi.
1996-10-10 03:14:48 +00:00
Jim Meyering
0e6d3d87e4
[__hpux]: Define hpux. From Eric Backus.
1996-10-08 02:06:34 +00:00
Jim Meyering
e044081627
Replace with FSF version.
1996-09-19 12:54:15 +00:00
Jim Meyering
505b859fe9
Test cpp-defined __sun as well as sun, because
...
in strict ANSI mode, only __sun is defined. From Kaveh Ghazi.
1996-04-14 02:12:46 +00:00
Jim Meyering
ac22df9290
.
1996-04-10 04:03:47 +00:00