Paul Eggert [Mon, 6 Aug 2007 16:44:24 +0000 (16:44 +0000)]
* NEWS: Describe interface changes to human, xstrtol.
* lib/human.h: Include <xstrtol.h>.
(human_options): Return enum strtol_error, not int. Remove
bool arg; take int * instead.
* lib/human.c: Don't include "gettext.h".
(_): Remove; no longer used.
Don't include <xstrtol.h>, since human.h does it.
(human_options): Adjust to abovementioned interface changes.
Do not report error to stderr; that's now the caller's
responsibility.
* lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
interface change.
* lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
Str, Argument_type_string. All uses changed. Put " argument"
in diagnostics to make them clearer. Change wording of suffix
message for clarity.
(STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
Argument_type_string.
(STRTOL_FATAL_WARN): Remove; no longer used.
* modules/human (Depends-on): Remove gettext-h.
Jim Meyering [Mon, 30 Jul 2007 12:16:34 +0000 (12:16 +0000)]
* lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
it has valid stat data. This bug would cause du not to count the
sizes of inaccessible directories.
Patch by Jose Maria Plans, reported in http://bugzilla.redhat.com/250077
Bruno Haible [Wed, 25 Jul 2007 22:42:36 +0000 (22:42 +0000)]
2007-07-25 Jim Meyering <jim@meyering.net>
Bruno Haible <bruno@clisp.org>
* lib/xstrtol.h (_STRTOL_ERROR): Change third argument from a
localized noun to an option name.
(STRTOL_FATAL_ERROR, STRTOL_FAIL_WARN): Likewise.
* lib/human.h (human_options): Insert a third argument.
* lib/human.h (human_options): Likewise. Pass it to STRTOL_FATAL_ERROR.
Ben Pfaff [Tue, 24 Jul 2007 02:35:09 +0000 (02:35 +0000)]
(popcount32): Reduce size of constants, to allow better code
generation, and add U to large constants to avoid warnings, in non-GCC
case.
Suggested by Bruno Haible.
Ben Pfaff [Mon, 23 Jul 2007 00:21:20 +0000 (00:21 +0000)]
New module: popcount.
* MODULES.html.sh: Add popcount.
* modules/popcount: New file.
* modules/popcount-tests: New file.
* tests/test-popcount.c: New file.
* lib/popcount.h: New file.
* m4/popcount.m4: New file.
Jim Meyering [Fri, 13 Jul 2007 14:39:43 +0000 (14:39 +0000)]
df: Don't fail for Tru64's "file-on-file mount".
* m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
so we fall through and use statfs instead. Details here:
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
Reported by Albert Chin.
(func_import): Avoid duplication of --avoid statements
(func_dest_tmpfilename,func_create_testdir): Translate `-' in file
names to `_' in variable names.
Paul Eggert [Fri, 6 Jul 2007 16:42:06 +0000 (16:42 +0000)]
* lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
includes <cygwin/sys_time.h> which includes <sys/select.h> which
include <sys/time.h>.
Reported by Eric Blake.
Eric Blake [Fri, 6 Jul 2007 14:22:21 +0000 (14:22 +0000)]
Fix testing canonicalize on cygwin.
* modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
Revert patch from 2007-06-19.
* tests/test-canonicalize-lgpl.c (main): Instead, skip test when
canonicalize module is also in use.
* tests/test-canonicalize.c: New file.
* tests/test-canonicalize.sh: Likewise.
* modules/canonicalize-tests: Likewise.
Jim Meyering [Wed, 4 Jul 2007 21:46:44 +0000 (21:46 +0000)]
* lib/getugroups.h: New file.
* lib/getugroups.c: Include "getugroups.h".
Remove uses of "register" keyword.
Move local variable, "cp", down into scope where used.
Give "username" parameter the "const" attribute.
* modules/getugroups (Files): Add lib/getugroups.h