Jim Meyering [Fri, 23 Jan 2009 17:27:36 +0000 (18:27 +0100)]
build: resolve conflict with new declaration from version-etc.h
* src/system.h (emit_bug_reporting_address): Define away,
now, gnulib's version-etc.h also declares this function.
In this package, we choose to include each program's name in
the diagnostic. Define away the conflicting declaration.
(emit_bug_reporting_address): Also emit home page and
"General help..." links, like the new function does.
Reported by Bob Proulx.
Pádraig Brady [Thu, 22 Jan 2009 19:34:11 +0000 (19:34 +0000)]
doc: shred: Correct docs on default number of overwrites.
* NEWS: Mention the change to the default number of passes.
* doc/Makefile.am: Update constants.texi with the default
number of passes shred uses, so that the documentation
will automatically reflect any future changes.
* doc/coreutils.texi (shred invocation): Update the description
of the --iterations option to have the correct default number,
while still conveying that there are 25 internal patterns
that may be useful.
Pádraig Brady [Thu, 22 Jan 2009 13:09:44 +0000 (13:09 +0000)]
shred: change default number of overwrites from 25 to 3
* src/shred.c: The concensus is that a default of 3
passes is appropriate for current drive technologies.
* src/TODO: Reference Paul Eggert's suggestion
of enhancing shred to conform to DoD 5220 rules.
Jim Meyering [Wed, 21 Jan 2009 13:48:15 +0000 (14:48 +0100)]
m4: don't use AC_REQUIRE([AC_C_BIGENDIAN])
* m4/jm-macros.m4: Use AC_REQUIRE([gl_BIGENDIAN]) instead.
This avoids a subtle problem recently documented in autoconf:
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=
34e2c8d5484
Jim Meyering [Mon, 19 Jan 2009 20:27:40 +0000 (21:27 +0100)]
no longer define *_FILENO constants
* src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
Remove definitions. Now guaranteed by gnulib.
Jim Meyering [Sun, 30 Nov 2008 18:35:10 +0000 (19:35 +0100)]
build: use dist-xz, not dist-lzma, cont'd
* README-hacking: mention XZ utils
* README-prereq: Add a FIXME comment.
Jim Meyering [Mon, 19 Jan 2009 11:09:12 +0000 (12:09 +0100)]
tests: tail-2/infloop-1 is racy
* tests/tail-2/infloop-1: Add a comment to that effect.
Jim Meyering [Sun, 30 Nov 2008 18:35:10 +0000 (19:35 +0100)]
build: use dist-xz, not dist-lzma
* configure.ac (AM_INIT_AUTOMAKE): s/dist-lzma/dist-xz/.
Requires recent "xz" from git://ctrl.tukaani.org/lzma-utils.git
Jim Meyering [Thu, 8 Jan 2009 12:31:01 +0000 (13:31 +0100)]
maint: remove obsolete sc_author_mark_check rule
* maint.mk (sc_author_mark_check): Remove rule.
"and" no longer appears in the definition of AUTHORS.
Jim Meyering [Fri, 16 Jan 2009 22:30:27 +0000 (23:30 +0100)]
Merge branch 'master' of git://git.sv.gnu.org/coreutils
Jim Meyering [Sat, 13 Dec 2008 13:26:25 +0000 (14:26 +0100)]
maint: enforce existing prohibition: no cvs $keywords$
* maint.mk (sc_prohibit_cvs_keyword): New rule.
Jim Meyering [Fri, 16 Jan 2009 09:16:53 +0000 (10:16 +0100)]
echo, printf, test: remove unused #include directives
* src/echo.c: Don't include "long-options.h". No longer used.
* src/printf.c: Likewise.
* src/test.c: Likewise.
Pádraig Brady [Thu, 15 Jan 2009 17:36:27 +0000 (17:36 +0000)]
pathchk: avoid -Wsign-compare warnings
* src/pathchk.c: Compare pathconf limits to _signed_ MAX constants,
as pathconf returns signed values.
Pádraig Brady [Thu, 15 Jan 2009 17:32:31 +0000 (17:32 +0000)]
pr: avoid -Wsign-compare warnings
* src/pr.c: Use unsigned variables in unsigned comparisons.
Pádraig Brady [Thu, 15 Jan 2009 17:26:59 +0000 (17:26 +0000)]
shred: avoid -Wsign-compare warnings
* src/shred.c: Use already assigned signed variable sizeof_r,
rather than the unsigned sizeof(r). Don't use signed integer
overflow check that contemporary compilers may remove anyway.
Pádraig Brady [Wed, 14 Jan 2009 19:17:39 +0000 (19:17 +0000)]
simplify mgetgroups() and avoid -Wsign-compare warnings
* gl/lib/mgetgroups.c: Avoid -Wsign-compare warning by using unsigned
types for the parameters of the new function realloc_groupbuf().
mgetgroups() was refactored to use this function rather than
explicitly allocating and copying from automatic storage itself.
* src/group-list.c: Use int rather than size_t as variable is
used in signed comparisons.
* src/id.c: ditto.
Eric Blake [Wed, 14 Jan 2009 04:59:35 +0000 (21:59 -0700)]
test, echo, printf: don't accept option abbreviation
* src/test.c (main): Directly parse accepted options, thus
avoiding abbreviations.
* src/echo.c (main): Likewise.
* src/printf.c (main): Likewise.
Kamil Dudka [Tue, 13 Jan 2009 17:35:00 +0000 (18:35 +0100)]
cp/mv: add --no-clobber (-n) option to not overwrite target
* src/cp.c (usage): Show new option -n in --help.
(main): Handle new option -n.
* src/mv.c (usage): Show new option -n in --help.
(main): Handle new option -n.
* doc/coreutils.texi: Document new cp/mv option -n.
* tests/cp/cp-i: Add tests for -f, -i and -n options.
* tests/mv/mv-n: New test for mv -n.
* tests/Makefile.am: Add test mv/mv-n to the list.
* NEWS: Mention the change.
Eric Blake [Thu, 8 Jan 2009 13:33:16 +0000 (06:33 -0700)]
option handling: make exceptions more consistent
* doc/coreutils.texi (Common options): Not all utilities reject
option abbreviations.
* src/chroot.c (main): Report correct name on failure.
* src/echo.c (usage): Clarify long option usage.
* src/setuidgid.c (usage): Likewise.
* src/hostid.c (usage): Condense.
Jim Meyering [Fri, 2 Jan 2009 16:30:42 +0000 (17:30 +0100)]
* bootstrap.conf (avoided_gnulib_modules): Add dummy.
Jim Meyering [Wed, 7 Jan 2009 21:54:11 +0000 (22:54 +0100)]
* maint.mk: align some backslashes
Pádraig Brady [Sun, 4 Jan 2009 01:06:10 +0000 (01:06 +0000)]
doc: pathchk description enhancements
* doc/coreutils.texi (pathchk invocation): Mention pathchk
checks validity (for current system) as well as portability.
Say messages go to stderr, and reorder description of checks
done for the -p option, to match what's done in code.
* src/pathchk.c (usage): Mention pathchk checks name validity.
Suggested clarifications were from Dan Jacobson.
Pádraig Brady [Thu, 1 Jan 2009 01:44:57 +0000 (01:44 +0000)]
src/.gitignore: Ignore getlimits utility
* src/.gitignore: Ignore getlimits
Pádraig Brady [Fri, 12 Dec 2008 10:25:34 +0000 (10:25 +0000)]
tests: refactor to use the new getlimits utility
* tests/Coreutils.pm: Add function to make limits available
* tests/test-lib.sh: ditto
* tests/misc/join: Check for both SIZE_OFLOW and UINTMAX_OFLOW
rather than using arbitrary 2^128
* tests/misc/sort: ditto
* tests/misc/uniq: ditto
* tests/misc/printf: Check for both INT_OFLOW and INT_UFLOW
rather than using arbitrary -2^31
* tests/misc/seq-long-double: Check for INTMAX_OFLOW
rather than using arbitrary 2^63
* tests/misc/split-fail: Check --lines --bytes and --line-bytes
options limits on all platforms. Note getlimits obviates the
need to use expr to check if 32 bit integers are supported,
which I think was invalid anyway as expr now supports bignum?
* tests/misc/test: Check for UINTMAX_OFLOW rather than
using arbitrary 2^64 and 2^128. Check for INTMAX_UFLOW
rather than using arbitrary -2^64
* tests/misc/timeout-parameters: Check for UINT_OFLOW
rather than using arbitrary 2^32
* tests/misc/truncate-overflow: Don't depend on truncate
to determine if we're on a 32 or 64 bit platform and
instead use the various OFF_T limits
* tests/misc/sort-merge: Check for UINTMAX_OFLOW
rather than using arbitrary 2^64+1
* tests/misc/unexpand: ditto
Michael Meskes [Fri, 2 Jan 2009 15:40:52 +0000 (16:40 +0100)]
stat: print file-system total inode count (%c) as an unsigned number
* src/stat.c (print_statfs): Print statfs.f_files, the total inode
count of a file system, as an unsigned number.
Jim Meyering [Wed, 31 Dec 2008 19:11:18 +0000 (20:11 +0100)]
tests: factor ls-misc (no semantic change)
* tests/misc/ls-misc: Factor out uses of "\e[0m".
Jim Meyering [Thu, 1 Jan 2009 01:05:25 +0000 (02:05 +0100)]
update copyright year
* doc/coreutils.texi: Likewise.
* tests/sample-test: Likewise.
Jim Meyering [Tue, 30 Dec 2008 18:16:08 +0000 (19:16 +0100)]
improve M4 quoting
* configure.ac: Add quotes.
* gl/m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise.
* m4/boottime.m4 (GNULIB_BOOT_TIME): Likewise.
* m4/check-decl.m4 (gl_CHECK_DECLS): Likewise.
* m4/gmp.m4 (cu_GMP): Likewise.
* m4/jm-macros.m4 (coreutils_MACROS, gl_CHECK_ALL_HEADERS): Likewise.
(gl_CHECK_ALL_TYPES): Likewise.
* m4/lib-check.m4 (cu_LIB_CHECK): Likewise.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Likewise.
FYI, I first ran this command:
git ls-files | grep -E '\.(m4|ac)$' | xargs perl -pi \
-e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_[A-Z_]+\(\[[^,]+?\], )([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g'
Then I updated serial numbers and copyright dates manually.
Also, I manually added two pairs of quotes in boottime.m4.
Jim Meyering [Mon, 29 Dec 2008 19:43:48 +0000 (20:43 +0100)]
bootstrap: don't use cmp's -s option when reading from a pipe
GNU cmp exits without reading all input when given the -s option,
and that can cause termination of the writing process via SIGPIPE.
Instead, when reading from a pipe, just redirect output to /dev/null
so that all input is read.
Jim Meyering [Mon, 29 Dec 2008 15:34:45 +0000 (16:34 +0100)]
maint: factor out common code; prohibit use of HAVE_MBRTOWC
* maint.mk (_prohibit_regexp): New macro.
(sc_avoid_if_before_free, sc_cast_of_argument_to_free):
(sc_cast_of_x_alloc_return_value, sc_cast_of_alloca_return_value):
(sc_space_tab, sc_prohibit_atoi_atof, sc_prohibit_strcmp):
(sc_prohibit_stat_st_blocks, sc_prohibit_S_IS_definition): Use it.
(sc_prohibit_HAVE_MBRTOWC): New rule.
Jim Meyering [Fri, 26 Dec 2008 14:53:03 +0000 (15:53 +0100)]
maint: use more sc_-prefixed names
* maint.mk (sc_po_check): Renamed from po-check.
(sc_author_mark_check): Renamed from author_mark_check.
(sc_copyright_check): Renamed from copyright-check.
(sc_makefile_path_separator_check): Renamed from
makefile_path_separator_check.
(local-checks-available): Remove the old names.
* Makefile.am (EXTRA_DIST): Reflect the renaming: .x-sc_po_check
* .x-po-check: Rename to...
* .x-sc_po_check: ...new file.
Jim Meyering [Fri, 26 Dec 2008 14:33:34 +0000 (15:33 +0100)]
maint: tighten m4 AC_ quoting check
* maint.mk (sc_m4_quote_check): Renamed from m4-check.
Also search for AC_DEFINE and AC_DEFINE_UNQUOTED.
Also search in configure.ac.
* configure.ac: Quote first argument of AC_DEFINE.
* jm-macros.m4 (coreutils_MACROS): Quote the first argument to AC_DEFINE.
Jim Meyering [Fri, 26 Dec 2008 14:39:41 +0000 (15:39 +0100)]
maint: move coreutils-specific syntax check rules into cfg.mk
* maint.mk (sc_dd_max_sym_length, sc_prohibit_jm_in_m4):
(sc_root_tests, sc_always_defined_macros, sc_system_h_headers):
(sc_sun_os_names, sc_tight_scope, sc_no_exec_perl_coreutils):
Move rules into cfg.mk.
(sc_strftime_check): Renamed from strftime-check, and moved, too.
* cfg.mk: Add the above rules.
Jim Meyering [Tue, 23 Dec 2008 19:00:27 +0000 (20:00 +0100)]
portability: accommodate gnulib's getaddrinfo change
* src/Makefile.am (pinky_LDADD, who_LDADD): Append $(GETADDRINFO_LIB)
Jim Meyering [Tue, 23 Dec 2008 18:06:31 +0000 (19:06 +0100)]
cleanup/modernize: don't test HAVE_MBRTOWC; now gnulib provides it
* bootstrap.conf (gnulib_modules): Include mbrtowc explicitly.
* src/ls.c (quote_name): Don't test HAVE_MBRTOWC, now that we're
guaranteed to have the function.
* src/wc.c (wc): Likewise.
Eric Blake [Sat, 27 Dec 2008 16:38:09 +0000 (09:38 -0700)]
doc: mention long option abbreviation
* doc/coreutils.texi (Common options): Give example of
abbreviating options.
* THANKS: Update.
Reported by Adam Jimerson.
Jim Meyering [Fri, 26 Dec 2008 11:00:18 +0000 (12:00 +0100)]
maint: ensure dd's computation of O_FULLBLOCK uses all O_ symbol names
* src/dd.c (O_FULLBLOCK): Use a more uniform initializer, that makes
it easier to extract all O_ symbol names.
* maint.mk (syntax-check-rules): Also search for sc_ rules in cfg.mk.
(sc_root_tests): Ensure that this rule sets $diff.
* cfg.mk (sc_dd_O_FLAGS): New rule.
Matt Harden [Mon, 22 Dec 2008 04:06:16 +0000 (22:06 -0600)]
dd: add support for opening files in Concurrent I/O (CIO) mode
* src/dd.c (O_CIO): New flag.
* src/dd.c (O_FULLBLOCK): Add O_CIO to the list of flags that
O_FULLBLOCK should be greater than.
* src/dd.c (flags): Give the name "cio" to the new O_CIO flag, mirroring
the treatment of O_DIRECT.
* src/dd.c (usage): Add a description of the new flag when it is available.
* doc/coreutils.text (dd invocation): Describe the new flag.
* NEWS: Mention the new feature.
Jim Meyering [Mon, 22 Dec 2008 17:21:59 +0000 (18:21 +0100)]
build: do enable $(WERROR_CFLAGS) for src/ files.
This reverts the more recent commit (of two) entitled "build:
add configure-time --enable-gcc-warnings option; avoid warnings".
Pádraig Brady spotted the contradiction between the log message
and actual change.
This reverts commit
292d68565a34b237cd2bf586ace545b7cd3dbfcf.
Pádraig Brady [Tue, 23 Dec 2008 11:55:46 +0000 (11:55 +0000)]
doc: stty: Clarification of some input and output settings
* doc/coreutils.texi (stty invocation): Clarify any
ambiguity in regard to the direction of input and output settings.
Add some notes on the case changing settings.
Most of the text was supplied by Dan Jacobson.
Pádraig Brady [Tue, 23 Dec 2008 09:36:22 +0000 (09:36 +0000)]
timeout: remove problematic casts
* src/timeout.c (apply_time_suffix): Change input parameter from
unsigned int to unsigned long, which is the type of the variable it's
actually manipulating. This removes the need for the cast which was
giving a warning with the gcc options: -fstrict-aliasing
-Wstrict-aliasing. Also add a check for overflow possible on 16-bit
platforms, and fix indents.
(main): Remove a redundant cast in the alarm() call.
Jim Meyering [Sun, 21 Dec 2008 16:38:08 +0000 (17:38 +0100)]
* .x-sc_require_config_h: Remove obsolete regexps.
Jim Meyering [Sun, 21 Dec 2008 16:37:22 +0000 (17:37 +0100)]
maint.mk: enforce the "include <config.h> first" rule
* maint.mk (sc_require_config_h_first): New rule.
* .x-sc_require_config_h_first: New file.
Jim Meyering [Wed, 12 Nov 2008 10:11:54 +0000 (11:11 +0100)]
build: add configure-time --enable-gcc-warnings option; avoid warnings
* bootstrap.conf (gnulib_modules): Add "warnings" module.
* configure.ac: Add --enable-gcc-warnings, derived from code in bison.
* src/Makefile.am (AM_CFLAGS): Set to $(WARN_CFLAGS) # $(WERROR_CFLAGS)
* lib/Makefile.am (AM_CFLAGS): Change spelling to $(WARN_CFLAGS)
Don't use $(WERROR_CFLAGS), yet.
* src/system.h (usage): Declare.
* src/base64.c (usage): Declare to be global, for consistency.
* src/timeout.c (usage): Likewise.
* src/truncate.c (usage): Likewise.
* src/getlimits.c (usage): Likewise.
* src/pinky.c (ttyname): Declare with prototype, rather than an
empty argument list.
* src/who.c (ttyname): Likewise.
* src/su.c (crypt, getusershell, setusershell, endusershell): Likewise.
Jim Meyering [Sun, 30 Nov 2008 21:41:50 +0000 (22:41 +0100)]
build: turn on $(WERROR_CFLAGS) for src/
Jim Meyering [Wed, 12 Nov 2008 10:11:54 +0000 (11:11 +0100)]
build: add configure-time --enable-gcc-warnings option; avoid warnings
* bootstrap.conf (gnulib_modules): Add "warnings" module.
* configure.ac: Add --enable-gcc-warnings, derived from code in bison.
* src/Makefile.am (AM_CFLAGS): Set to $(WARN_CFLAGS) # $(WERROR_CFLAGS)
* lib/Makefile.am (AM_CFLAGS): Change spelling to $(WARN_CFLAGS)
Don't use $(WERROR_CFLAGS), yet.
* src/system.h (usage): Declare.
* src/base64.c (usage): Declare to be global, for consistency.
* src/timeout.c (usage): Likewise.
* src/truncate.c (usage): Likewise.
* src/getlimits.c (usage): Likewise.
* src/pinky.c (ttyname): Declare with prototype, rather than an
empty argument list.
* src/who.c (ttyname): Likewise.
* src/su.c (crypt, getusershell, setusershell, endusershell): Likewise.
Pádraig Brady [Wed, 17 Dec 2008 10:41:34 +0000 (10:41 +0000)]
doc: Remove curly quotes from shell examples in man pages
Use \(aq rather than a literal ' as groff will convert apostrophe
to a right quote (\u2029) in utf8 locales for example.
Stepan Kasal details the issue and fix here:
http://lists.gnu.org/archive/html/bug-coreutils/2008-12/msg00124.html
Jim Meyering [Tue, 16 Dec 2008 07:15:18 +0000 (08:15 +0100)]
ChangeLog-2008: say ChangeLog files are no longer manually maintained
and point to HACKING's policy. Suggestion from Dan Jacobson.
Jim Meyering [Tue, 9 Dec 2008 07:22:21 +0000 (08:22 +0100)]
du: -H now does what POSIX requires
* src/du.c (usage): Update --help output.
(main): Move -H-handling code from the --si block to
the one for --dereference-args (-D).
* doc/coreutils.texi (du invocation): Update description.
* NEWS (Changes in behavior): Mention this.
Jim Meyering [Sat, 13 Dec 2008 07:32:55 +0000 (08:32 +0100)]
doc: pr: formatting corrections
* doc/coreutils.texi (pr invocation): Fix some overzealous uses of @var.
Reported by Andreas Schwab.
Ralf Wildenhues [Sat, 13 Dec 2008 09:24:18 +0000 (10:24 +0100)]
more portable bootstrap procedure
* bootstrap (get_version): Fix portability issues in sed script.
(check_versions): For buildreq apps, honor the corresponding
$APP variable like $AMTAR, $AUTOCONF.
(usage): Document this.
(update_po_files): Honor $SHA1SUM.
(main): Honor $AUTOPOINT, $ACLOCAL, $AUTOCONF, $AUTOHEADER,
$AUTOMAKE, $LIBTOOLIZE.
Jim Meyering [Sat, 29 Nov 2008 09:47:12 +0000 (10:47 +0100)]
tests: ensure that chmod, chgrp and chown honor --silent
* tests/chmod/silent: New file, to test all three programs.
* tests/Makefile.am (TESTS): Add chmod/silent.
* NEWS (Bug fixes): Mention this.
The bug was introduced in
96a5d2ce6a53d96cb667af78f13e56fadcdb91e6.
Ondřej Vašík [Thu, 27 Nov 2008 14:04:10 +0000 (15:04 +0100)]
chmod, chown, chgrp: honor --silent (-f) once again
* chmod.c (process_file): Make -f suppress fts-related diagnostics.
* chown-core.c (change_file_owner): Likewise.
Reported via <http://bugzilla.redhat.com/474220>.
Jim Meyering [Tue, 25 Nov 2008 17:38:26 +0000 (18:38 +0100)]
wc: read and process --files0-from= input a name at a time,
when the file name list is not too large. Before, wc would always read
the entire file name list into memory and *then* process each file name.
wc does read the list into memory when the list is known not to be too
large; this is done in order to be able to align the output numbers,
as it does with arguments specified on the command-line
* src/wc.c: Include "argv-iter.h".
(main): Rewrite to use argv-iter when the input file name list
is known to be too large.
* NEWS (Bug fixes): Mention it.
Jim Meyering [Mon, 24 Nov 2008 08:55:55 +0000 (09:55 +0100)]
du: read and process --files0-from= input a name at a time,
rather than by reading the entire input into memory and *then*
processing each file name.
* src/du.c: Include "argv-iter.h", not "readtokens0.h".
(main): Rewrite to use argv-iter.
Call xfts_open on each argument, rather than on the entire
argv list at once.
Call print_size here, not from du_files.
Diagnose read failure.
* NEWS (Bug fixes): Mention it.
* THANKS: update.
Reported by Barry Kelly. More details in
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/15159/
Jim Meyering [Mon, 1 Dec 2008 21:39:58 +0000 (22:39 +0100)]
seq: plug a leak
* src/factor.c (emit_ul_factor): Call mpz_clear.
Jim Meyering [Sun, 30 Nov 2008 21:37:42 +0000 (22:37 +0100)]
avoid warnings about initialization of automatic aggregates
* src/system.h (DZA_CONCAT0, DZA_CONCAT): New macros.
(DECLARE_ZEROED_AGGREGATE): New macro.
* src/ls.c (quote_name): Use it.
* src/pathchk.c (portable_chars_only): Use it.
* src/shred.c (main): Use it.
* src/stty.c (main): Use it.
* src/wc.c (SUPPORT_OLD_MBRTOWC): Use it.
Jim Meyering [Sun, 30 Nov 2008 19:21:28 +0000 (20:21 +0100)]
* bootstrap.conf (gnulib_modules): Add argv-iter.
Jim Meyering [Wed, 26 Nov 2008 21:51:09 +0000 (22:51 +0100)]
argv-iter: add tests
* gl/modules/argv-iter-tests: New module.
* gl/tests/test-argv-iter.c: New file.
Jim Meyering [Mon, 24 Nov 2008 13:11:15 +0000 (14:11 +0100)]
argv-iter: new module
* gl/lib/argv-iter.h: New file.
* gl/lib/argv-iter.c: New file.
* gl/modules/argv-iter: New file.
With a suggestion for improved memory management by Pádraig Brady.
Jim Meyering [Mon, 1 Dec 2008 06:27:55 +0000 (07:27 +0100)]
* src/hostname.c (sethostname) [!HAVE_SETHOSTNAME]: Remove declaration.
Jim Meyering [Wed, 8 Oct 2008 06:51:38 +0000 (08:51 +0200)]
cp, mv: remove 3-year-deprecated+warned-about --reply option
* src/cp.c (reply_args, reply_vals): Remove globals.
[REPLY_OPTION]: Remove enum.
(long_opts) ["reply"]: Remove initializer.
(main): Remove case stmt.
* src/mv.c: Likewise.
Don't include "argmatch.h". No longer used.
* NEWS (Changes in behavior): Mention this.
* tests/Makefile.am (TESTS): Remove mv/reply-no.
* tests/mv/reply-no: Remove file.
* tests/mv/i-link-no: Update, now that --reply= is gone.
Pádraig Brady [Mon, 1 Dec 2008 10:41:50 +0000 (10:41 +0000)]
doc: Make descriptions of ASCII NUL and --zero-terminated option consistent
doc/coretuils.texi: Refactor shuf, sort and uniq --zero-terminated
option to use the same text. Also refer to NUL characters as
@acronym{ASCII} @sc{nul} consistently.
Jim Meyering [Mon, 1 Dec 2008 08:17:51 +0000 (09:17 +0100)]
doc: enforce @var{lower} policy
* doc/coreutils.texi: Fix remaining violations.
* doc/Makefile.am (sc-lower-case-var): New rule.
Add some command-suppressing "@" directives so that a successful
"make check" run is less noisy.
Pádraig Brady [Mon, 1 Dec 2008 02:29:57 +0000 (02:29 +0000)]
doc: Tweak info docs to standarise on lower-case @var{file}
* doc/coreutils.texi: s/@var{FILE}/@var{file}/
Pádraig Brady [Mon, 1 Dec 2008 02:09:19 +0000 (02:09 +0000)]
doc: Improve description of --files0-from option
* doc/coreutils.texi: Describe the most common
usage of --files0-from=- to read names from stdin.
* src/du.c: Likewise.
* src/sort.c: Likewise.
* src/wc.c: Likewise.
Pádraig Brady [Mon, 1 Dec 2008 01:08:02 +0000 (01:08 +0000)]
tests: dd/reblock: Reduce chance of timing related failures
* tests/dd/reblock: Change the IPC mechanism to the dd process
under test, from pipes to fifos. Also change the delay
between data writes to 0.2s for both tests.
This should increase the chance that the dd process
will read the data chunks separately.
Jim Meyering [Sun, 30 Nov 2008 16:39:11 +0000 (17:39 +0100)]
m4: avoid a warning from gcc's -Wstrict-prototypes
* m4/jm-macros.m4 (ARGMATCH_DIE_DECL): Use proper prototype for usage.
Jim Meyering [Sat, 29 Nov 2008 10:22:00 +0000 (11:22 +0100)]
tests: df: skip total-verify if df fails
* tests/df/total-verify: Skip the test if df fails.
Jim Meyering [Fri, 28 Nov 2008 21:08:09 +0000 (22:08 +0100)]
build: don't reject definition of STREQ
* maint.mk (sc_prohibit_strcmp): Tighten rule: exclude
macro definitions like the one in system.h.
* .x-sc_prohibit_strcmp: Don't exempt src/system.h.
Jim Meyering [Fri, 28 Nov 2008 20:32:39 +0000 (21:32 +0100)]
tests: start long-running cp/link-heap earlier
* tests/Makefile.am (TESTS): Move cp/link-heap nearer the start of the
list, so that its termination doesn't delay a parallel "make check".
Jim Meyering [Mon, 24 Nov 2008 09:03:25 +0000 (10:03 +0100)]
tests: avoid failure of cp/link-heap on some systems
* tests/cp/link-heap: Raise virtual memory limit from 10,000
to 14,000, to avoid failure on Debian/unstable (libc6 2.7-16).
Jim Meyering [Wed, 12 Nov 2008 10:02:50 +0000 (11:02 +0100)]
remove explicit declaration of putenv, ...
* src/date.c: ... now that gnulib guarantees that it's in <stdlib.h>.
* src/env.c: Likewise.
Jim Meyering [Sun, 30 Nov 2008 17:43:55 +0000 (18:43 +0100)]
tests: dd/reblock: avoid occasional failure
* tests/dd/reblock: Sleep longer to avoid a race condition.
Reported by Bob Proulx.
James Youngman [Thu, 27 Nov 2008 10:20:18 +0000 (10:20 +0000)]
pwd: add pwd -P, -L to TODO
* TODO: Add to-do entry for -P and -L options of pwd.
Ondřej Vašík [Wed, 26 Nov 2008 15:00:57 +0000 (16:00 +0100)]
doc: fix typo in units factorization, removed TODO items
* doc/coreutils: switch typo (switched gibibytes/gigabytes)
* TODO: removed missing chcon and runcon documentation from list
Jim Meyering [Wed, 26 Nov 2008 14:02:58 +0000 (15:02 +0100)]
doc: factor out list of suffix-to-number (e.g., KB->1000B) mappings
* coreutils.texi (multiplierSuffixes, multiplierSuffixesNoBlocks):
New macros.
(od invocation, head invocation, tail invocation, split invocation):
(truncate invocation): Use them.
Jim Meyering [Wed, 26 Nov 2008 06:12:50 +0000 (07:12 +0100)]
doc: tail: one more s/bytes/n/ change
* doc/coreutils.texi (tail invocation): Make one more
@var{bytes} -> @var{n} change.
Pádraig Brady [Wed, 26 Nov 2008 14:27:09 +0000 (14:27 +0000)]
doc: tail: fix description of --bytes=N (-c)
* doc/coreutils.texi (tail invocation): Use @var{n} consistently,
not a mix of that and @var{bytes}. Reported by anonymous
in <http://savannah.gnu.org/bugs/?24934>.
Karl Berry [Sun, 23 Nov 2008 11:45:40 +0000 (12:45 +0100)]
doc: move @shortcontents and @contents from end to start
* doc/coreutils.texi: Move @shortcontents and @contents from the
end to the beginning, just after "@end titlepage".
Jim Meyering [Sun, 23 Nov 2008 11:33:02 +0000 (12:33 +0100)]
doc (stat): clarify: there are two sets of format directives
* doc/coreutils.texi (stat invocation): Clarify description of
--file-system format directives.
Karl Berry [Sun, 23 Nov 2008 11:29:24 +0000 (12:29 +0100)]
doc (stat): correct formatting in coreutils.texi
* doc/coreutils.texi (stat invocation): Move the list of regular,
non-file-system, format directives from the description of --terse,
out of the enclosing table.
Jim Meyering [Fri, 21 Nov 2008 22:12:17 +0000 (23:12 +0100)]
tests: dd: add a test for the required behavior
* tests/dd/reblock: New file. Test for the required functionality.
Based on an example and discussion from this thread:
http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00153.html
* tests/Makefile.am (TESTS): Add dd/reblock.
Pádraig Brady [Fri, 21 Nov 2008 22:17:44 +0000 (23:17 +0100)]
Revert part of "dd: avoid unnecessary memory copies"
This reverts part of commit
fbd87029cfc494a72bb73ade27ef46382c5bc832.
Paul Eggert noticed the problem in
http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00153.html
* doc/coreutils.texi (dd invocation): Clarify.
Pádraig Brady [Thu, 20 Nov 2008 11:02:15 +0000 (11:02 +0000)]
getlimits: A new utility for use in coreutils' tests
* src/getlimits.c: A utility to print platform dependent
limits in a format suitable for use in shell scripts.
* src/Makefile.am: Add getlimits to list of utilities
to build but not install. Also add it to the list linked
with libiconv
* po/POTFILES.in: Add getlimits to translation list.
Pádraig Brady [Thu, 20 Nov 2008 22:49:02 +0000 (22:49 +0000)]
dd: avoid unnecessary memory copies
* src/dd.c (scanargs): When not otherwise required (e.g. for
conversion), use two-buffer mode only when the input and output
buffer sizes differ. Before, some of the most basic invocations of
dd, e.g., dd < in > out, would unnecessarily use separate buffers
and perform memory copies between them.
Jim Meyering [Wed, 19 Nov 2008 18:36:45 +0000 (19:36 +0100)]
cp: use far less memory in some cases
cp --link was "remembering" many name,dev,inode triples unnecessarily.
cp was doing the same, even without --link, for every directory in the
source hierarchy, while it can do its job with entries merely for the
command-line arguments. Prompted by a report from Patrick Shoenfeld.
Details <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15081>.
* src/copy.c (copy_internal): Refrain from remembering
name,dev,inode for most files, when invoked via cp --link.
Record an infloop-avoidance triple for each directory specified
on the command line, not for each directory in the source tree.
Don't record a dir-triple when x->hard_link is set.
* NEWS (Buf fixes): Mention it.
* tests/cp/link-heap: New file. Test for cp's lowered memory usage.
* tests/Makefile.am (TESTS): Add link-heap.
Jim Meyering [Wed, 19 Nov 2008 18:16:34 +0000 (19:16 +0100)]
tests: add a test of cp --preserve=links
* tests/cp/link-preserve: Add a case and comments.
Jim Meyering [Wed, 19 Nov 2008 09:24:52 +0000 (10:24 +0100)]
cp: remove unused code
* src/cp-hash.c (remember_created): Remove unused function.
Remove thus-obviated headers: <stdio.h>, "quote.h", "error.h".
* src/cp-hash.h (remember_created): Remove declaration.
Jim Meyering [Mon, 17 Nov 2008 10:16:19 +0000 (11:16 +0100)]
doc: HACKING: reference gnu.org/licenses/why-assign.html
Suggestion from Patrick Schoenfeld.
Jim Meyering [Sun, 16 Nov 2008 09:45:18 +0000 (10:45 +0100)]
tests: remove debug code that would try to write into /t/k-env
* tests/ls/no-cap: Remove debugging "tee".
Jim Meyering [Sun, 16 Nov 2008 08:53:48 +0000 (09:53 +0100)]
tests: change misc/printf-surprise so that it doesn't segfault anymore
* tests/misc/printf-surprise: Disable MALLOC_PERTURB_, so that "make
check" no longer provokes a segfault from printf(1). Before, that
would be detected as a known problem and cause the test to be skipped.
Adjust the test so that a segfault once again results in test failure.
Jim Meyering [Wed, 12 Nov 2008 12:29:38 +0000 (13:29 +0100)]
tests: remove df/total
* tests/df/total: Remove file.
* tests/Makefile.am (TESTS): Remove df/total.
It is subsumed by df/total-verify.
Ondřej Vašík [Wed, 12 Nov 2008 12:27:23 +0000 (13:27 +0100)]
* tests/df/total-verify [VERBOSE]: Run df --version, not ls --version.
Jim Meyering [Wed, 12 Nov 2008 11:53:54 +0000 (12:53 +0100)]
avoid spurious test failure when df always fails
* tests/df/total-verify: Skip upon _df_ failure, not tee failure.
Reported by Ondřej Vašík. Details in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15028>.
Eric Blake [Tue, 11 Nov 2008 17:44:59 +0000 (10:44 -0700)]
jm-macros.m4: avoid syntax issue with newer autoconf
* jm-macros.m4 (coreutils_MACROS): Make LIB_CAP assignment persistent.
Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering [Tue, 11 Nov 2008 08:51:30 +0000 (09:51 +0100)]
Update references to GFDL: 1.2 -> 1.3
* doc/coreutils.texi: Likewise.
* doc/perm.texi: Likewise.
* old/fileutils/NEWS: Likewise.
* old/sh-utils/NEWS: Likewise.
* old/textutils/NEWS: Likewise.
Jim Meyering [Sun, 9 Nov 2008 16:15:57 +0000 (17:15 +0100)]
make --help print "Report PROGRAM translation bugs to <...>."
for all but the C/POSIX locale.
* src/system.h: Include "hard-locale.h".
(emit_bug_reporting_address): Tell where to report translation bugs.
don't include "hard-locale.h", now that system.h does
* src/comm.c: Likewise.
* src/join.c: Likewise.
* src/ls.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/sort.c: Likewise.
* src/uniq.c: Likewise.
* src/who.c: Likewise.
Jim Meyering [Tue, 28 Oct 2008 21:06:44 +0000 (22:06 +0100)]
avoid warnings about discarding "qualifiers from pointer target type"
Use the new "bad_cast" function or an actual cast-to-"(char *)"
to avoid warnings.
* src/system.h (bad_cast): Define.
* src/chown.c (main):
* src/chroot.c (main):
* src/date.c (main):
* src/du.c (main):
* src/expand.c (stdin_argv):
* src/ls.c (decode_switches):
* src/md5sum.c (main):
* src/paste.c (main):
* src/pr.c (col_sep_string, column_separator, line_separator, main):
* src/sort.c (main):
* src/split.c (main):
* src/tail.c (main):
* src/unexpand.c (stdin_argv):
* src/yes.c (main):
Jim Meyering [Tue, 28 Oct 2008 21:00:39 +0000 (22:00 +0100)]
avoid a compiler warning
(strip_program): Declare to be const.