1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-16 01:22:18 +03:00
Commit Graph

21 Commits

Author SHA1 Message Date
Bruno Haible
4dc4f1e228 getloadavg: Move AC_LIBOBJ invocations to module description.
* m4/getloadavg.m4 (gl_FUNC_GETDELIM): Set HAVE_GETLOADAVG. Move
AC_LIBOBJ and gl_PREREQ_GETLOADAVG invocations from here...
* modules/getloadavg (configure.ac): ... to here.
2011-06-16 00:06:06 +02:00
Bruno Haible
8d8a973ad8 getloadavg: Remove an unreliable safety check.
* m4/getloadavg.m4 (gl_GETLOADAVG): Drop argument. Remove test whether
getloadavg.c is in place.
* modules/getloadavg (configure.ac): Drop argument of gl_GETLOADAVG.
Reported by Sam Steingold <sds@gnu.org>.
2011-05-28 22:06:11 +02:00
Bruno Haible
a0fdbb3f59 getloadavg: Fix link error on Solaris 2.6.
* modules/getloadavg (Link): New section.
* modules/getloadavg-tests (Makefile.am): Use GETLOADAVG_LIBS for
linking test-getloadavg.
* doc/glibc-functions/getloadavg.texi: Mention that Solaris 2.6 lacks
getloadavg.
2011-02-18 04:15:19 +01:00
Paul Eggert
6a047cd32e getloadavg: don't depend on c-strtod, cloexec, fcntl-safer
See the thread rooted at
<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00090.html>.
* lib/getloadavg.c: Do not include c-strtod.h, cloexec.h, or fcntl--.h.
Include <fcntl.h> only if (defined __linux__ || defined __CYGWIN__
|| defined SUNOS_5 || (defined LOAD_AVE_TYPE && !  defined
__VMS)); previously it was always included (via fcntl--.h).
(getloadavg): Do not use c_strtod.  Instead, approximate it by
hand; this is good enough for load averages.  Also, do not use
set_cloexec_flag; instead, use the O_CLOEXEC and F_DUPFD_CLOEXEC
flags directly if available and don't bother otherwise.  (Packages
that need the extra reliability should use the modules that define
these flags on older platforms that lack them.)
* modules/getloadavg (Depends-on): Remove c-strtod, cloexec,
fcntl-safer.
2011-02-08 12:28:27 -08:00
Jim Meyering
0e0f8f12ec maint: remove useless inclusions of "alloca.h"
* lib/getloadavg.c: Remove useless inclusion of "alloca.h".
* lib/readtokens.c: Likewise.
* lib/same.c: Likewise.
* modules/getloadavg (Depends-on): Remove xalloc.
* modules/readtokens: Likewise.
* modules/same: Likewise.
2010-01-05 15:36:03 +01:00
Bruno Haible
fe18f20f2a Add a getloadavg() declaration to <stdlib.h>. 2008-10-19 12:57:06 +02:00
Bruno Haible
5eeec029e8 gnulib-tool now synthesizes the EXTRA_DIST line. 2006-10-13 12:40:22 +00:00
Bruno Haible
e8684643a2 Distribute all lib/* source files through EXTRA_DIST. 2006-10-12 18:52:30 +00:00
Bruno Haible
b857fd9057 Pass to the gl_GETLOADAVG macro the $gl_source_base from gnulib-tool. 2006-09-22 12:47:54 +00:00
Paul Eggert
7092917c5e * modules/getloadavg (Files): Add m4/getloadavg.m4.
(configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
the former is now obsolescent.
* lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
or stdbool.h, because they might not exist while configuring.
* m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
obsolescent, and programs should use gnulib instead.
* m4/getloadavg.m4: New file, with contents taken from Autoconf
but with prefixes changed.
2006-08-31 22:29:00 +00:00
Paul Eggert
266a433bc1 * modules/intprops: New file.
* MODULES.html.sh (Numeric conversion functions <stdlib.h>):
Add intprops.
* modules/getloadavg (Files): Remove lib/intprops.h.
(Depends-on): Add intprops.
* modules/human: Likewise.
* modules/inttostr: Likewise.
* modules/openat: Likewise.
* modules/sig2str: Likewise.
* modules/userspec: Likewise.
* modules/utimecmp: Likewise.
* modules/xnanosleep: Likewise.
* modules/xstrtol: Likewise.
2006-02-26 08:45:03 +00:00
Paul Eggert
7c3f8da8f0 Sync from coreutils.
* .cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
stat-time.h.
* argmatch.h: Include verify.h
(ARGMATCH_VERIFY): Use verify rather than rolling our own.
(ARGMATCH_ASSERT): Remove; unused.
* canonicalize.c: Assume STDC_HEADERS.
* exclude.c: Include "strcase.h".
* regex_internal.h [!defined _LIBC]: Likewise.
* getusershell.c: Include stdio--.h rather than stdio.h
and stdio-safer.h.
(getusershell): Call fopen, not fopen_safer.
* save-cwd.c: Include fcntl--.h rather than fcntl.h.
Do not include unistd-safer.h.
(save_cwd): Don't call fd_safer; no longer needed
now that we include fcntl--.h.

* modules/argmatch (Depends-on): Add verify.
* modules/getloadavg (Depends-on): Depend on fcntl-safer, not
unistd-safer.
* modules/save-cwd (Depends-on): Likewise.

* backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
* fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
* getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
* mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
* physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
* save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
* userspec.m4, xgetcwd.m4, xreadlink.m4:
Don't bother checking for string.h, stdlib.h, unistd.h.
* fts.m4 (gl_FUNC_FTS_CORE): Don't require
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
module's job.
* jm-macros.m4 (gl_MACROS): Likewise.
* prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.

* backupfile.c: Use ARGMATCH_VERIFY, just in case.
* posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
the .tm_year member, since otherwise gcc-4.0 would now warn about
tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
* quotearg.c (quotearg_n_options): Change code to be suboptimal, in
order to avoid an unsuppressible warning from gcc on 64-bit systems.

* lstat.m4 (gl_FUNC_LSTAT):
Use AC_LIBSOURCES to require lstat.c and lstat.h.
Remove obsolete comment.
* xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
* xstrtod.m4: Likewise.
2005-09-23 04:15:13 +00:00
Paul Eggert
d3e8c58c07 (Depends-on): Add stdbool. 2005-05-06 17:22:45 +00:00
Paul Eggert
8b03458ebe Merge from coreutils. 2005-05-02 07:00:50 +00:00
Paul Eggert
eef56b544e Factor int-properties macros into a single file, except for
glibc-related files.
* lib/intprops.h: New file.
* lib/getloadavg.c: Include it instead of limits.h.
(INT_STRLEN_BOUND): Remove.
* lib/human.c: Include intprops.h.
(group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
* lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000.
* lib/inttostr.h: Include intprops.h instead of limits.h.
(INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
* lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
for consistency with intprops.h.
(time_t_is_integer, twos_complement_arithmetic): Use them.
* lib/sig2str.h: Include <signal.h>, intprops.h.
(INT_STRLEN_BOUND): Remove.
* lib/strftime.c (TYPE_SIGNED): Remove.
(INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
* lib/strtol.c: Adjust comments to match intprops.h.
* lib/userspec.c: Include intprops.h.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
* lib/utimecmp.c, lib/xnanosleep.c, lib/xstrtol.c: Likewise.
* lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
instead of rolling our own expressions.
* lib/xstrtol.c: Include xstrtol.h first, to test interface.
* modules/getloadavg (Files): Add lib/intprops.h.
* modules/human (Files): Likewise.
* modules/inttostr (Files): Likewise.
* modules/sig2str (Files): Likewise.
* modules/userspec (Files): Likewise.
* modules/utimecmp (Files): Likewise.
* modules/xnanosleep (Files): Likewise.
* modules/xstrtol (Files): Likewise.
2005-03-09 19:11:23 +00:00
Paul Eggert
854b4d80a1 Sync from coreutils.
* modules/getloadavg (Files): Remove m4/getloadavg.m4.
(Depends-on): Add c-strtod.
(configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
* m4/getloadavg.m4, m4/glibc.m4, m4/search-libs.m4: Remove.

* m4/check-decl.m4, m4/jm-macros.m4, m4/lib-check.m4, m4/prereq.m4:
Remove files that are specific to coreutils.
2005-01-28 23:23:32 +00:00
Bruno Haible
5143f4e91f Add a license tag to every module. 2004-09-22 15:11:04 +00:00
Paul Eggert
f68c57a746 Merge changes to getloadavg.c from coreutils and Emacs; this
adds a new module cloexec.
2004-03-29 23:57:36 +00:00
Bruno Haible
6f99528a90 Add a Maintainer. 2003-01-20 10:02:37 +00:00
Bruno Haible
2e82f91f46 Add module descriptions. 2003-01-13 16:07:17 +00:00
Bruno Haible
740e9a30ef Module description. 2002-12-31 13:46:30 +00:00