summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2011-06-18tests: sort-debug-keys: fix a bug with translated diagnosticsJim Meyering
Ensure that English diagnostics are emitted even when using French sorting rules. * tests/misc/sort-debug-keys: Unset LC_ALL and set LC_COLLATE, LC_CTYPE and LC_NUMERIC to the fr_FR.UTF-8 locale, while setting LC_MESSAGES=C. Reported by Stefano Lattarini.
2011-06-17maint: remove duplicate names from THANKSPádraig Brady
* .mailmap: Merge email addresses * THANKS.in: Remove a duplicate name Reported by Stefano Lattarini
2011-06-17maint: use modules/tempname.diff file, not a replacement; update gnulibJim Meyering
Using a .diff is much more maintainable. Otherwise, changes in the gnulib module description file may not be noticed and merged promptly and may even result in subtle errors. Luckily, this time, the failure to propagate gnulib's changes to modules/tempname resulted only in an obvious link failure. * gl/modules/tempname: Remove file. * gl/modules/tempname.diff: Use a .diff file instead. * gnulib: Update submodule to latest.
2011-06-17tests: avoid sort-spinlock-abuse false positive under heavy loadJim Meyering
* tests/misc/sort-spinlock-abuse: Classify as "very expensive" to avoid unwarranted failure once and for all.
2011-06-17tests: remove skip_test_ function; use new skip_ insteadJim Meyering
* tests/init.cfg (skip_test_): Remove function. Use skip_ in place of skip_test_ everywhere else. * cfg.mk (sc_prohibit_skip_): Remove rule. * tests/**: Use skip_, not skip_test_, everywhere.
2011-06-17tests: make init.sh's warn_ emit to both the tty and the log fileJim Meyering
* tests/init.sh (warn_): When $stderr_fileno_ != 2, emit the diagnostic to both the tty and the log file.
2011-06-17tests: use printf, not echo in init.sh's warn_ functionJim Meyering
* tests/init.sh (warn_): Use printf, not echo. The latter would misbehave when given strings containing a backslash or starting with e.g., -n. James Youngman suggested setting IFS.
2011-06-14tests: accommodate HP-UX and ksh-derived shellsJim Meyering
Running "make check" normally prints a diagnostic to the outermost stderr (usually a tty) to explain why a test is skipped. It did this by redirecting FD 9 to stderr (via "exec 9>&2") before invoking the shell script. Shell scripts write skip-explanation to FD 9 via init.sh's skip_ function. However, with ksh and HP-UX's /bin/sh, the effects of "exec 9>&2" are canceled upon fork-and-exec, so we would get a "Bad file number" diagnostic and no skip explanation on those systems. * tests/check.mk (TESTS_ENVIRONMENT): Redirect more portably, via "$(SHELL) 9>&2", rather than the prior "exec 9>&2; $(SHELL) ..." Actually, we use "shell_or_perl_ 9>&2", to make this effective also for the perl-based tests. * tests/init.sh (stderr_fileno_): Update the advice in comments. See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488 for lots of discussion. Stefano Lattarini suggested the solution of putting "9>&2" after the command. Reported by Bruno Haible.
2011-06-13init.sh: sync from gnulibJim Meyering
* tests/init.sh: Sync recent changes from gnulib.
2011-06-13maint: revert previous commitJim Meyering
Revert "init.sh: accommodate shells for which 1>&$stderr_fileno_ fails" This reverts commit 6fb9aeedd1b858a61d5cbf7f15782adf29ff733a. That change did not solve the problem. For details, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8846#74
2011-06-13init.sh: accommodate shells for which 1>&$stderr_fileno_ failsJim Meyering
* tests/init.sh (warn_): Use eval to work around a bug in some shells, like those of Solaris 10 and HP-UX 11.11. Improved by Stefano Lattarini.
2011-06-13doc: add NEWS items for recent gnulib fixesJim Meyering
* NEWS (Improvements): Mention the new HP-UX 11.11 ACL support. (Build-related): Mention the cc/HP-UX 11.11 build fix.
2011-06-13tests: avoid sort-spinlock-abuse false positive under heavy loadJim Meyering
* tests/misc/sort-spinlock-abuse: This test would frequently fail when run on a system under heavy load. Increase duration and limit.
2011-06-13maint: use stat-size module from gnulibJames Youngman
* gnulib: Update to latest. * src/system.h: Definitions of ST_* macros have moved into the gnulib module stat-size (specifically, the header file stat-size.h), so remove them from here. * src/truncate.c: Include stat-size.h. * src/stat.c: Likewise. * src/shred.c: Likewise. * src/ls.c: Likewise. * src/du.c: Likewise. * src/ioblksize.h: New file. Move definition of io_blksize out of system.h so that system.h does not have to include stat-size.h. * src/cat.c: Include ioblksize.h. * src/split.c: Likewise. * src/copy.c: Include both stat-size.h and ioblksize.h. * src/Makefile.am (noinst_HEADERS): Add ioblksize.h.
2011-06-13tests: avoid a false failure on HPUX systemsPádraig Brady
* tests/dd/nocache: Relax the test, as the system may return various errors from posix_fadvise(). HPUX 11.31 returns ENOTTY for example. Reported by Bruno Haible
2011-06-11tests: inotify-rotate: avoid false positive under heavy loadJim Meyering
* tests/tail-2/inotify-rotate: Increase timeout from 10s to 40s to avoid load-induced false positive.
2011-06-09maint: remove unneeded includesPádraig Brady
Remove unneeded includes as reported by: http://code.google.com/p/include-what-you-use/ * src/cp-hash.c: Remove unused include. * src/dd.c: Likewise. * src/du.c: Likewise. * src/head.c: Likewise. * src/kill.c: Likewise. * src/ls.c: Likewise. * src/stdbuf.c: Likewise. * src/timeout.c: Likewise. * src/truncate.c: Likewise.
2011-06-09doc: add examples to date --helpPádraig Brady
* src/date.c (usage): Add examples for TZ handling, and "seconds since epoch" parsing, neither of which was mentioned in the man page until now. * THANKS.in: Add Rick. Suggested by Rick Stanley.
2011-06-04build: require at least 2-year old autoconf-2.64 (was 2.62)Jim Meyering
* configure.ac: Require autoconf-2.64, which is nearly two years old. * src/system.h (emit_ancillary_info): Use PACKAGE_URL, now that we require autoconf-2.64.
2011-06-04maint: remove now-spurious curly bracesJim Meyering
* src/chown-core.c (restricted_chown): Remove FIXME comment and superfluous curly braces.
2011-06-01tests: stat-free-color: accommodate stat of /selinux on rawhideJim Meyering
* tests/ls/stat-free-color: This test recently began to fail on rawhide because dynamic library start-up code now stats "/selinux", making the total number of calls 2 rather than the prior 1. Create two more dangling symlinks, so that any erroneous stat- or lstat-calling code will get at least those three.
2011-06-01yes.c: do not use exit after errorMarek Polacek
I think it would be better to exit through the error() and not to call the exit() after the error(). This way we can get rid of one function call (and curly brackets). * src/yes.c (main): Exit through the error(), remove exit() call after error().
2011-06-01tail: fix an inconsequential bug spotted by coverityJim Meyering
* src/tail.c (start_bytes): Increase *READ_POS (not READ_POS) by the number of bytes read. This is a real bug that happens to have no consequence in practice. First, this code is exercised only when tailing-forever a non-regular file by bytes, and with a start-relative offset, e.g., "mkfifo f; tail -f -c +3 f", but even then, the invalid READ_POS value does not influence how tail works. It is stored in the File_spec.size member, but that member is not used at all in tail_forever_inotify, and in tail_forever, it is used only when the File_spec refers to a regular file.
2011-05-31* doc/coreutils.texi (sort invocation): I/0 -> I/O (sr#107504)Paul Eggert
2011-05-29maint: remove unnecessary gnulib .diff fileJim Meyering
* gl/modules/getloadavg.diff: Remove file. It stopped being useful back in February. * Makefile.am (EXTRA_DIST): Remove it.
2011-05-29maint: placate -Wsign-compare when it's non-invasiveJim Meyering
* src/stdbuf.c: Declare loop index to be unsigned.
2011-05-28ls: placate gcc-4.7.0's -Wstrict-overflowJim Meyering
* src/ls.c (enum parse_state): Define. (parse_ls_color): Use enum names in place of constants, thus avoiding the offending -1.
2011-05-28maint: remove useless (off_t) cast of lseek argJim Meyering
* src/wc.c (wc): Remove unnecessary cast. * src/head.c (elide_tail_bytes_file, elide_tail_lines_file): Likewise. * src/tac.c (tac_seekable, tac_file): Likewise.
2011-05-28tests: move tests/misc/split-* into tests/split/...Jim Meyering
* tests/split/suffix-length: Rename from tests/misc/split-a. * tests/split/b-chunk: Rename from misc/split-bchunk. * tests/split/fail: Rename from tests/misc/split-fail. * tests/split/lines: Rename from tests/misc/split-l. * tests/split/l-chunk: Rename from tests/misc/split-lchunk. * tests/split/r-chunk: Rename from tests/misc/split-rchunk. * tests/Makefile.am (TESTS): Reflect renaming.