]> git.ipfire.org Git - thirdparty/coreutils.git/commit
Include <errno.h>, <stdio.h>, <stdlib.h> even
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 Jul 2004 18:19:38 +0000 (18:19 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 Jul 2004 18:19:38 +0000 (18:19 +0000)
commit92a74b0a8831f74e19dde24ce51a344bb0f75793
tree615f9cc8051b55ea0f080e78c8c3f4ecb10be40a
parent6301ff874e3dba7c321129cc61e9fa99a09948eb
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.
lib/getloadavg.c