summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-07-17* NEWS: Mention fix for Bug#9098.Paul Eggert
2011-07-17timeout: add regression test (Bug#9098)Paul Eggert
* tests/misc/timeout: Check that 'timeout' is not confused when starting off with a child.
2011-07-16timeout: treat seconds counts like 'sleep' doesPaul Eggert
Treat fractions as a request to round up to the next representable value, and treat out-of-range values as maximal ones. This is consistent with how "sleep" works. And this way, "timeout 999999999999999999d FOO" and "timeout 4.5 foo" are more likely to do what the user wants. * src/timeout.c: Include c-strtod.h and xstrtod.h, not xstrtol.h. (apply_time_suffix): Change it to the way sleep.c's time_suffix does things. Maybe this function (identical in both programs, other than its name) should be moved to a library? (parse_duration): Return a maximal value on overflow. Return unsigned int, not unsigned long. Allow fractions, which round up to the next integer value. * tests/misc/timeout-parameters: Adjust tests to match new behavior. Add a very large number.
2011-07-16Fix capiTalization in comments.Paul Eggert
2011-07-16* src/timeout.c (main): Use waitpid, not wait (Bug#9098).Paul Eggert
Reported by Andreas Schwab. * src/timeout.c (SA_RESTART): Define to 0 if not defined.
2011-07-16timeout: port to NonStop (Bug#9077)Paul Eggert
* src/timeout.c (SA_RESTART): Define to 0 if not defined. (main): Don't assume signal handling uses SA_RESTART.
2011-07-16ls: port to NonStop (Bug#9076)Paul Eggert
* src/ls.c (SA_RESTART): Define to 0 if not defined.
2011-07-16dd: port to NonStop (Bug#9076)Paul Eggert
* src/dd.c (SA_RESETHAND): Define to 0 if not defined.
2011-07-15csplit: don't prematurely terminate cleanup (Bug#9076)Paul Eggert
* src/csplit.c (interrupt_handler): Reset signal to SIG_DFL after deleting the files, so that a second interrupt won't prematurely terminate cleanup. (main): Don't use SA_NODEFER | SA_RESETHAND, as that might allow premature termination of cleanup. Also, this ports better to platforms like NonStop, which don't ahve SA_RESETHAND.
2011-07-15* src/dd.c: Remove obsolete comments re POSIX.Paul Eggert
2011-07-15build: avoid a st_blksize compile failure on some systemsPádraig Brady
* src/stat.c (print_stat): Use ST_BLKSIZE() rather than accessing st_blksize directly, which is not present on NonStop at least. Reported by Joachim Schmitz.
2011-07-15build: avoid a fiemap compile failure on some systemsPádraig Brady
* src/fiemap.h (struct fiemap): Adjust the previous change to the fiemap_extents array, which would also require changes to the sizeof calculations in extent_scan_read(). Instead, only declare the fiemap_extents zero length array on linux, which is the only platform that references this member. This avoids a compilation failure on systems that don't support this non standard construct. We don't use the equivalent C99 flexible array construct so as to have maximum portability. * src/extent-scan.c: Cleanup. Remove a redundant #ifndef.
2011-07-14* src/fiemap.h (struct fiemap.fm_extents): Change size to 1.Paul Eggert
This is for portability to non-GCC C89 and C99 compilers. Original problem, on NonStop, reported by Joachim Schmitz in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9077>.
2011-07-14maint: fix warning 'possible use of "=" where "==" was intended'Bernhard Voelker
* src/mktemp.c: maint: avoid warning by using the comma operator rather than an always-true conditional (as suggested by Eric Blake). Reported by Joachim Schmitz in http://debbugs.gnu.org/9064.
2011-07-13doc: describe the file permissions set by mktempBenoît Knecht
* src/mktemp.c (usage): As above, for --help. Reported by Jordi Pujol in http://bugs.debian.org/551093. Wording improvments from Eric Blake.
2011-07-13doc: note the order in which wc counts are printedBenoît Knecht
This information has already been added to the Texinfo manual, but was missing from the --help output. * src/wc.c (usage): As above, for --help. Reported by Vincent Lefevre in http://bugs.debian.org/395430.
2011-07-12build: update gnulib submodule to latestJim Meyering
2011-07-12build: list makeinfo 4.13 as a build-from-git requirementEric Blake
* bootstrap.conf (buildreq): List 4.13 as minimum makeinfo version. Prompted by Joachim Schmitz's report in http://debbugs.gnu.org/9050.
2011-07-11dircolors: highlight .webm multimedia filesBenoît Knecht
* src/dircolors.hin: Add .webm multimedia files. Suggested by Josh Triplett in http://bugs.debian.org/582403.
2011-07-08maint: add syntax-check rule to prohibit "."-terminated "SEE ALSO"Jim Meyering
* cfg.mk (sc_prohibit_man_see_also_period): Prohibit a period at the end of the first line after a "SEE ALSO" marker in man/*.x. With this, we shouldn't have to make any more changes like those in today's commit, f2dabd68.
2011-07-08doc: list all new file system types recognized by stat -fPádraig Brady
NEWS (Improvements): Mention the MQUEUE and PSTOREFS file systems, recognized as of commit 171e1b98.
2011-07-08doc: don't terminate SEE ALSO sections with a periodBenoît Knecht
man-pages(7) explicitly says about SEE ALSO sections: "Do not terminate this with a period." This is also in line with all the other man pages in coreutils. * man/cat.x: Remove period at the end of the SEE ALSO section. * man/tac.x: Likewise.
2011-07-08timeout: handle signals more transparentlyPádraig Brady
* m4/jm-macros.m4: Define HAVE_SETRLIMIT. * src/timeout.c: If the child exited with a signal, raise that signal to the timeout process itself, so that callers may also see the signal status. Use setrlimit to disable core dumps for the timeout process, which would be generated by some signals.
2011-07-08timeout: support cascaded timeoutsPádraig Brady
* src/timeout.c (cleanup): Send signals directly to the child in case it has started its own process group (like a cascaded timeout command would for example). * test/misc/timeout-group: Add a test case. * NEWS: Mention the fix.
2011-07-08timeout: add --foreground to support interactive commandsPádraig Brady
Or more accurately, commands not started from the shell prompt, that are interactive, or need to receive Ctrl-C etc. from the terminal. * doc/coreutils.texi (timeout invocation): Document --foreground. * src/timeout.c (main): Set the foreground flag and don't create a separate group. (cleanup): Only send a signal directly to the monitored command when the foreground flag is set. (usage): Describe --foreground. * tests/misc/timeout-group: Add a new test. * tests/Makefile.am: Reference new test. NEWS: Mention the new option. Reported by Shay Shimony Analysis by Alan Curry Fix suggested by Paul Eggert
2011-07-08doc: note that cp -l creates _hard_ linksBenoît Knecht
This fact was already noted in the Texinfo manual, but not in the output of --help. * src/cp.c (usage): As above, for --help. Reported by Jari Aalto in http://bugs.debian.org/294327.
2011-07-07tests: exercise md5sum's new --strict optionJim Meyering
* tests/misc/md5sum: Exercise new --strict option.
2011-07-07md5sum, sha1sum, etc: accept new option: --strictPatrick Schoenfeld
Use this new option with --check when the input is expected to consist solely of checksum lines. With only --check, an invalid line evokes a warning, but the program can still exit successfully. With --strict, any invalid line makes the program exit non-zero. * src/md5sum.c (strict, STRICT_OPTION): Declare/define. (long_options): Add "strict". (usage): Describe --strict. (digest_check): Count improperly_formatted lines, too, and use that number and the global "strict" to determine the return value. (main): Handle STRICT_OPTION. Reject --strict without --check. * doc/coreutils.texi: Describe it. * NEWS (New features): Mention it.
2011-07-07doc: note date's %k, %l are space-padded and equivalent to %_H and %_IBenoît Knecht
* src/date.c (usage): As above, for --help. * doc/coreutils.texi (Time conversion specifiers): Likewise. Reported by Britton Leo Kerin in http://bugs.debian.org/115833.
2011-07-07stat: recognize GPFS as a file system typeJim Meyering
* src/stat.c (human_fstype) [S_MAGIC_GPFS]: Add a case, to handle GPFS_SUPER_MAGIC/0x47504653. Prompted by this discussion: http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/14007 * NEWS (Improvements): Mention it.
2011-07-02maint: use "const" and "pure" function attributes where possibleJim Meyering
* configure.ac (WARN_CFLAGS): Add -Wsuggest-attribute=const, -Wsuggest-attribute=pure and -Wsuggest-attribute=noreturn. (GNULIB_WARN_CFLAGS): But do not add them here... yet. * src/chown-core.h (chopt_free, uid_to_name): Add function attribute(s). * src/copy.c (is_ancestor, valid_options): Likewise. * src/copy.h (chown_failure_ok): Likewise. * src/dd.c (operand_matches, operand_is): Likewise. * src/df.c (selected_fstype, excluded_fstype): Likewise. * src/expr.c (null looks_like_integer): Likewise. * src/md5sum.c (hex_digits): Likewise. * src/od.c (get_lcm): Likewise. * src/pathchk.c (component_start, component_len): Likewise. * src/pinky.c (count_ampersands): Likewise. * src/pr.c (cols_ready_to_print): Likewise. * src/ptx.c (search_table): Likewise. * src/sort.c (find_unit_order): Likewise. * src/stty.c (mode_type_flag, string_to_baud, baud_to_value): Likewise. * src/system.h (gcd, lcm): Likewise. * src/tr.c (is_char_class_member, look_up_char_class): Likewise. (star_digits_closebracket): Likewise. * src/uniq.c (find_field): Likewise. * src/wc.c (compute_number_width): Likewise. * lib/xfts.h (cycle_warning_required): Likewise. * gl/lib/randint.h (randint_get_source): Likewise. * gl/lib/randperm.c (ceil_lg): Likewise. * gl/lib/randperm.h (randperm_bound): Likewise. * lib/strnumcmp.h (strintcmp): Likewise.
2011-07-02buffer_lcm: declare with _GL_ATTRIBUTE_CONSTJim Meyering
* lib/buffer-lcm.h (buffer_lcm): Use _GL_ATTRIBUTE_CONST. * lib/buffer-lcm.c: Include <config.h>.
2011-07-01doc: detail the effect of disabling input buffering with stdbufPádraig Brady
* docs/coreutils.texi (stdbuf invocation): Expand on the different reasons for disabling buffering on input and output.
2011-07-01doc: mention the restrictions for stdbuf more prominentlyBruno Haible
* doc/coreutils.texi (stdbuf invocation): List the contraints on the command being controlled, up front.
2011-06-25doc: improve ls --help grammarJim Meyering
* src/ls.c (usage): Improve grammar. Reported by Peng Yu.
2011-06-25doc: clarify an improvement from coreutils-7.0Jim Meyering
* NEWS (7.0 Improvements): Mention the command: "ls -1U". * cfg.mk (old_NEWS_hash): Update.
2011-06-25maint: don't use gnulib's pathmax module; define PATH_MAX if neededJim Meyering
* bootstrap.conf (gnulib_modules): Remove pathmax. * src/system.h: Don't include "pathmax.h". (PATH_MAX) [!PATH_MAX]: Define to 8192. Defining it to a constant is preferable to using a definition from pathmax.h that might expand to pathconf ("/", _PC_PATH_MAX). Prompted by discussion leading to: http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/27183/focus=27269
2011-06-25build: bootstrap: remove obsolete gettext-related file exclusionsJim Meyering
* bootstrap.conf: Don't bother to exclude gettext/intl-related .m4 files. That exclusion is no longer necessary.
2011-06-24stat: recognize MQUEUE and PSTOREFS file systemsPádraig Brady
* src/stat.c (human_fstype): Add magic numbers for PSTOREFS and MQUEUE.
2011-06-22tests: stat-free-color: do not count stat calls before mainBernhard Voelker
* tests/ls/stat-free-color: The system may perform additional stat calls upon loading (seen on OpenSuSE-11.4). Count only the number of stat calls compared to --help. This also reduces back to "1" the number of expected calls, effectively reverting part of 2011-06-01 commit, ccf2d9a4.
2011-06-21tests: cp/sparse-fiemap: use "head -n99" in place of "head -99"Bernhard Voelker
* tests/cp/sparse-fiemap: Use "head -n99" in place of "head -99". The latter is officially obsolete.
2011-06-20tests: init.sh: use "sed 1q" in place of "head -1"Jim Meyering
* tests/init.sh (warn_): Use "sed 1q" in place of "head -1". The latter is officially obsolete but more portable than "head -n1". Reported by Bernhard Voelker.
2011-06-20maint: update THANKS.inJim Meyering
* THANKS.in: Remove Stefano's name.
2011-06-20tests: improve init.sh by removing w2_Bernhard Voelker
* tests/init.sh (w2_): Remove, moving contents into... (warn_): ...here. Call self from subshell when IFS must be changed.
2011-06-19tests: avoid extra forks in the testsuiteStefano Lattarini
* tests/shell-or-perl: Prefer the `read' builtin over `grep' to look at the shebang line of test scripts. Since `read' is a special builtin, it might abort the whole program upon failures, so add extra sanity checks, verifying that the test script exists and is readable, before trying to read from it.
2011-06-19tests: make test runner a script, not a shell functionStefano Lattarini
This change implements a more correct and idiomatic use of the features of the Automake-provided 'parallel-tests' harness. Moreover, this change is required in order for the testsuite to continue to work with the new testsuite harness that is planned to be introduced in Automake 1.12 (which, as of the writing date, is still under development and in alpha state). * tests/shell-or-perl: New auxiliary script. * tests/Makefile.am (EXTRA_DIST): Distribute it. * tests/check.mk (TESTS_ENVIRONMENT): Remove definition of the `shell_or_perl_' shell function, whose code has been moved in the new script above (with a few improvements and extensions). Do not use it to run the test scripts. (LOG_COMPILER): New, properly invoking `shell-or-perl'.
2011-06-19stdbuf: fix automake variable name to work with cutting edge automakeJim Meyering
* src/Makefile.am (pkglibexec_PROGRAMS): Rename from pkglib_PROGRAMS. The latter is invalid. Without this change, automake v1.11-373-g9ca6326 and newer (on master) would fail with this: `pkglibdir' is not a legitimate directory for `PROGRAMS' This changes the default installation directory of libstdbuf.so from $prefix/lib/coreutils/ to $prefix/libexec/coreutils/ * src/stdbuf.c (set_LD_PRELOAD): Search in PKGLIBEXECDIR, not PKGLIBDIR, since that's where we install libstdbuf.so. Do not search in "", the system default search path.
2011-06-19maint: avoid a false positive syntax checkPádraig Brady
* cfg.mk (sc_strftime_check): Skip the check when there is no info to compare against. Reported by Stefano Lattarini
2011-06-19maint: typo: insert omitted word in test commentJames Youngman
* tests/misc/sort-spinlock-abuse: Fix typo: s/"very expensive" are/"very expensive" tests are/
2011-06-18maint: fix typo in comment in configure.acStefano Lattarini
* configure.ac ($MAN): Fix typo in explanatory comment.