aboutsummaryrefslogtreecommitdiffstats
path: root/lib/getloadavg.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert1-1017/+0
2006-07-09Update from gnulib.Paul Eggert1-10/+10
2005-07-08(getloadavg) [__CYGWIN__]: Port to cygwin.Paul Eggert1-8/+9
[__linux__]: Allocate a big enough buffer for /proc/loadavg. [!LDAV_DONE]: Avoid unused variable warning.
2005-07-03Include fcntl--.h rather than fcntl.h.Paul Eggert1-4/+2
Do not include unistd-safer.h. (getloadavg): Don't call fd_safer; no longer needed now that we include fcntl--.h.
2005-07-02Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.Jim Meyering1-3/+1
2005-07-01Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,Jim Meyering1-5/+1
and don't include <sys/file.h>).
2005-06-02Don't use "path" or "filename" to mean "file name"Paul Eggert1-1/+1
in comments or local variable names.
2005-05-14Update FSF postal mail address.Jim Meyering1-1/+1
2005-04-11Include unistd-safer.h.Paul Eggert1-1/+3
(getloadavg): Use fd_safer.
2005-03-09Include intprops.h instead of limits.h.Paul Eggert1-8/+2
(INT_STRLEN_BOUND): Remove.
2004-08-02Include <stdbool.h>.Paul Eggert1-14/+15
(getloadavg_initialized): Use bool for booleans.
2004-07-12Include <errno.h>, <stdio.h>, <stdlib.h> evenPaul Eggert1-52/+41
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-06-30Use `file system', not filesystem in a comment.Jim Meyering1-2/+2
2004-04-04Sync from gnulib.Jim Meyering1-1/+3
2004-03-30Merge changes from emacs (via gnulib).Jim Meyering1-2/+6
2004-03-04(getloadavg): Use `true', not `1'.Jim Meyering1-1/+1
2004-03-03Include "cloexec.h".Jim Meyering1-7/+4
(getloadavg): Use set_cloexec_flag instead of manual fcntl call.
2003-09-10(getloadavg, main): Define via prototypes.Jim Meyering1-7/+3
2003-08-18Sync with gnulib.Jim Meyering1-98/+51
2003-04-15Remove (or replace-with-TAB(s) to retain alignment)Jim Meyering1-3/+3
each sequence of spaces before a TAB character.
2000-06-19[HAVE_NLIST_H] (NLIST_STRUCT): Define.Jim Meyering1-0/+6
2000-06-19revert last changeJim Meyering1-6/+71
2000-06-18s/NLIST_STRUCT/HAVE_NLIST_H/. Remove bigJim Meyering1-71/+6
multi-platform `#ifndef NLIST_STRUCT' block.
1999-01-31Include locale.h.Jim Meyering1-1/+10
[!HAVE_SETLOCALE]: Define-away setlocale. (getloadavg): Ensure the sscanf of /proc/getloadavg data uses the `C' numeric locale. Restore afterwards.
1997-07-15correct cpp-indentationJim Meyering1-2/+2
1997-07-15Merge with FSF.Jim Meyering1-7/+18
1997-01-18Add comment re HAVE_PSTAT_GETDYNAMIC.Jim Meyering1-0/+8
1997-01-15Fix up indentation a little.Jim Meyering1-9/+12
1997-01-15Indent cpp-directives to reflect nesting.Jim Meyering1-374/+395
1996-12-07[__SVR4]: Define SVR4.Jim Meyering1-1/+5
Remove duplicate `|| defined(SVR4)' disjunct guarding the #define KERNEL_FILE "/unix" definiton.
1996-10-22[__linux__]: Don't bother with a.out/nlist/kernelJim Meyering1-1/+3
defines or includes -- Linux systems simply read /proc/loadavg.
1996-10-10[__sun]: Define sun. Reported by Kaveh Ghazi.Jim Meyering1-0/+4
1996-10-08[__hpux]: Define hpux. From Eric Backus.Jim Meyering1-1/+5
1996-09-19Replace with FSF version.Jim Meyering1-6/+53
1996-04-14Test cpp-defined __sun as well as sun, becauseJim Meyering1-3/+3
in strict ANSI mode, only __sun is defined. From Kaveh Ghazi.
1996-04-10.Jim Meyering1-0/+967