summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-05-31stat: use gnulib's alignof moduleJim Meyering
* src/stat.c (alignof): Remove definition. Instead, include "alignof.h", and sort the #include directives. And get its definition from the gnulib module by that name: * bootstrap.conf (gnulib_modules): Add alignof.
2010-05-31tests: remove unnecessary single quotes in perl hash use: ->{'SYM'}Jim Meyering
Run this command: git grep -l "limits->{'" \ | xargs perl -pi -e "s/limits->{'(.*?)'}/limits->{\$1}/g" * cfg.mk (sc_prohibit_perl_hash_quotes): New rule to match. * tests/misc/join: Remove quotes. * tests/misc/sort: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/test: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/uniq: Likewise.
2010-05-29truncate: improve handling of non regular filesPádraig Brady
Previously we copied `dd` and suppressed error messages when truncating neither regular files or shared mem objects. This was valid for `dd`, as truncation is ancillary to copying it may also do, but for `truncate` we should display all errors. Also we used the st_size from non regular files which is undefined, so we display an error when the user tries this. * src/truncate (do_truncate): Error when referencing the size of non regular files or non shared memory objects. Display all errors returned by ftruncate(). (main): Error when referencing the size of non regular files or non shared memory objects. Don't suppress error messages for any file types that can't be opened for writing. * tests/misc/truncate-dir-fail: Check that referencing the size of a directory is not supported. * tests/misc/truncate-fifo: Ensure the test doesn't hang by using the `timeout` command. Don't test the return from running ftruncate on the fifo as it's system dependent as to whether this fails or not. NEWS: Mention the change in behavior. Reported by Jim Meyering.
2010-05-28truncate: support sizes relative to an existing filePádraig Brady
* doc/coreutils.texi (truncate invocation): Mention that --reference bases the --size rather than just setting it. * src/truncate.c (usage): Likewise. Also remove the clause describing --size and --reference as being mutually exclusive. (do_truncate): Add an extra parameter to hold the size of a referenced file, and use it if positive. (main): Pass the size of a referenced file to do_truncate(). * tests/misc/truncate-parameters: Adjust for the new combinations. * NEWS: Mention the change Suggested by Richard W.M. Jones
2010-05-26tests: update help-version to work with parted, tooJim Meyering
* tests/misc/help-version: Add init code for GNU Parted.
2010-05-25maint: don't emit an extra newline in each of two diagnosticsJim Meyering
* src/shuf.c (main): Remove a stray newline in a diagnostic. * src/od.c (main): Likewise. Detected via these: git grep -A1 'error *(.*,$' | grep -C1 '\\n"[,)]' git grep 'error *(.*;$' | grep '\\n"[,)]'
2010-05-25maint: remove unneeded double quotes on RHS of shell assignmentsJim Meyering
Run this command: git grep -l 'LC_[A-Z]*="' \ | xargs perl -pi -e 's/(LC_[A-Z]*)="(.*?)"/$1=$2/' * src/Makefile.am: Write LC_ALL=$$locale, not LC_ALL="$$locale". * src/date.c (main): Similar, in a comment. * tests/misc/sort-month: Write LC_ALL=$LOC, not LC_ALL="$LOC".
2010-05-24maint: remove a redundant sort parameter from a testPádraig Brady
* tests/misc/sort-month: Remove the -b option which is redundant and ignored.
2010-05-24sort: adjust the leading blanks --debug warningPádraig Brady
* src/sort.c (key_warnings): Always warn about significant leading blanks when character offsets are specified, unless they key is possibly a line offset, i.e. of the form -k1.x,1.y. Also suppress this warning if the user could be sorting right aligned indexes.
2010-05-23maint: make copyright comment consistent with all othersJim Meyering
* tests/misc/mktemp: Change punctuation to make copyright paragraph consistent with all of the others.
2010-05-21tests: fix cp-a-selinux to skip cleanly upon mkfs failureJim Meyering
* tests/cp/cp-a-selinux: Initialize skip, to avoid a syntax error in subsequent "test". Remove redirect-to-/dev/null, now that output is always to a log file.
2010-05-19du: recognize -d N as equivalent to --max-depth=NJon Ringuette
* NEWS (New features): Mention it. * src/du.c (DEBUG_OPT): Remove. Use long-named ---debug instead. Commented out. (MAX_DEPTH_OPTION): Remove. Use 'd' instead. (main): Insert literal "d:"; remove DEBUG_OPT. * doc/coreutils.texi (du invocation): Add -d to indices. * tests/du/max-depth: Exercise -d, too.
2010-05-19tests: exercise du's --max-depth optionJim Meyering
* tests/Makefile.am (TESTS): Add du/max-depth. * tests/du/max-depth: New file.
2010-05-18tests: fix sort-debug-keys when fr_FR.utf8 not availablePádraig Brady
* tests/misc/sort-debug-keys: Correctly check for the absence of the French UTF8 locale.
2010-05-17maint: fix the fs-magic-compare ruleJim Meyering
* src/Makefile.am (fs-def): Sort definitions. This is required by fs-magic-compare's use of join.
2010-05-17tests: update init.sh from gnulibJim Meyering
* tests/init.sh: Update from gnulib.
2010-05-17build: avoid a new -Wformat-induced warningJim Meyering
* src/sort.c (mark_key): Add a cast-to-int of a printf field width, to placate -Wformat.
2010-05-16doc: fix sort info about version sort skipping blanksPádraig Brady
* doc/coreutils.text (sort invocation): leading blanks are significant for 'V'.
2010-05-16sort: --debug: output data independent warnings and infoPádraig Brady
* src/sort.c (usage): Mention --debug can output warnings to stderr. Also split the translatable string to aid translation. (default_key_compare): A new function refactored from main(), and now also called from the new key_warnings() function. (key_to_opts): A new function refactored from incompatible_options(), and now also called from the new key_warnings() function. (key_numeric): A new function refactored to test if key is numeric. (key_warnings): A new function to output warnings to stderr, about questionable use of various options. Currently it warns about zero length keys and ineffective global options. (incompatible_options): Refactor out key_to_opts() (main): Use key_init() to initialize gkey. Refactor out default_key_compare(). Call key_warnings() in debug mode. * doc/coreutils.texi (sort invocation): Mention that warnings are output by --debug. * tests/misc/sort-debug-warn: A new test for debug warnings. * tests/Makefile.am: Reference the new test. * NEWS: Mention the new feature
2010-05-12tests: fix sort-debug-keys when fr_FR.utf8 not availablePádraig Brady
* tests/misc/sort-debug-keys: Don't verify (or even run) the fr_FR tests when that locale is not available on the system.
2010-05-12sort: add a --debug option to highlight key extentsPádraig Brady
* src/sort (usage): Add description for --debug. (write_bytes): Pass a line structure so it can subsequently be passed to compare to highlight the keys when in debug mode. Also transform TAB and NUL characters written to stdout so that the highlighting in debug mode aligns correctly. (human_numcompare): Pass an "endptr" so we can record the extent of the number matched. (general_numcompare): Likewise. (find_unit_order): Likewise. (getmonth): Likewise. (numcompare): Likewise. Note we reuse find_unit_order() for this, which is a good enough approximation, and means we don't need to change the strnumcmp() interface. (check_mixed_SI_IEC): Return whether iec_present, so that can be used to set the "endptr" in find_unit_order. Also make the key parameter optional, which will be the case from numcompare(). (count_tabs): A new function to determine how much to adjust the mbswidth() values by (TABs don't have a width). (mark_key): A new function to output the key highlighting to stdout. (debug_key): A new function to determine the offset and width of the key highlighting. (key_compare): Pass the show_debug parameter so the key highlighting is only displayed when explicitly called. For each key type, set the length (lena) and whether leading blanks are auto skipped (skipb) which are then used by debug_key() to highlight the portion of the key used in the comparison. (compare): Pass the show_debug parameter so the key highlighting is only displayed when explicitly called. Call debug_key() to highlight the last resort comparison. (check): Output highlighting for disorder line to stdout. (main): Process the --debug option and make it mutually exlusive with the -o option as I don't see it useful there, even potentially harmful if someone left a --debug in by mistake when updating a file. Also restricting debug output to stdout, simplifies the logic for dealing with temporary files. * doc/coreutils.texi (sort invocation): Describe the --debug option, and reference it from the --key description. * tests/misc/sort-debug-keys: A new test for highlighting keys. * tests/Makefile.am: Reference the new test. * NEWS: Mention the new feature.
2010-05-11build: record the gettext-0.18 requirement also in configure.acJim Meyering
* configure.ac: Require gettext-0.18 here, too.
2010-05-11build: update gnulib submodule to latestJim Meyering
* tests/init.sh: Update from gnulib, to fix typo.
2010-05-10build: record that when building from git, gettext-0.18 is requiredJim Meyering
* bootstrap.conf (buildreq): Require gettext-0.18.
2010-05-10tests: avoid a new syntax-check failureJim Meyering
* .x-sc_prohibit_fail_0: Exempt tests/init.sh.
2010-05-10tests: provide a definition of gl_trap_ in cfg.mkJim Meyering
* cfg.mk (gl_trap_): Define here, now that it's gone from maint.mk. * gnulib: Update to latest.
2010-05-10tests: begin using init.shJim Meyering
* tests/init.sh: New file. * tests/Makefile.am (EXTRA_DIST): Add it here.
2010-05-09tests: update help-versionJim Meyering
* tests/misc/help-version: Use init.sh, rather than test-lib.sh. Add idutils' setup.
2010-05-09tests: move sc_prohibit_always-defined_macros to gnulib's maint.mkJim Meyering
* cfg.mk (sc_prohibit_always-defined_macros): Remove it from here. * gnulib: Update to latest, for a maint.mk that includes that rule.
2010-05-09tests: rename a syntax-checkJim Meyering
* cfg.mk (sc_prohibit_always-defined_macros): Rename from sc_always_defined_macros. * .x-sc_prohibit_always-defined_macros: New file, renamed from... * .x-sc_always_defined_macros: ...removed. * Makefile.am (syntax_check_exceptions): Rename here, too.
2010-05-09tests: loosen/tighten the always_defined_macros checkJim Meyering
* cfg.mk (.re-defmac): Generate better regexps: allow white space before the '#', and append a word-boundary requirement. Without the latter, #define NULL_DEV ... would evoke a false-positive.
2010-05-09tests: improve the always_defined_macros checkJim Meyering
* cfg.mk (sc_always_defined_macros): Adjust its helpers not to depend on the existence of ./lib. Instead, extract symbols directly from gnulib/lib/*.in.h files.
2010-05-03doc: factor hard-coded project-specific bits from README-release, ...Jim Meyering
using the new --mail-headers option to gnulib's announce-gen, and the updated maint.mk rules to connect the pieces. * README-release: Remove hard-coded To:, Cc: etc. parts, now that they're emitted automatically into the announcement template. * cfg.mk (announcement_Cc_): Override the default. * gnulib: Update to latest, to get newer announce-gen and maint.mk.
2010-05-03doc: update release procedureJim Meyering
* README-release: Rearrange slightly: post the announcement to Savannah first, so you can include a link to that post in the email.
2010-05-03maint: factor trap-related code out of two syntax-check rulesJim Meyering
* cfg.mk (gl_trap_): Define, using a loop and eval'd trap, rather than repeated "trap" uses. Also handle "13", SIGPIPE. (sc_always_defined_macros): Use it. (sc_system_h_headers): Likewise.
2010-05-03maint: extend the always_defined_macros syntax-checkJim Meyering
* cfg.mk (gl_generated_headers_): Define. (headers_with_interesting_macro_defs): Remove headers covered by the above. (.re-defmac): Extract symbol names from many more files. (sc_always_defined_macros): Use VC_LIST_EXCEPT, not VC_LIST, so that we can use the usual exception mechanism. Test for $(gnulib_dir), not system.h. * .x-sc_always_defined_macros: New file. Exempt src/seq.c. * Makefile.am (syntax_check_exceptions): Add it here.
2010-05-03maint: remove now-redundant definitions provided by signal.hJim Meyering
* src/dd.c (SA_NODEFER, SA_RESETHAND): Remove definitions, now that gnulib guarantees they are defined in <signal.h>. * src/ls.c (SA_RESTART): Likewise.
2010-05-03maint: remove now-redundant definitions provided by sys/wait.hJim Meyering
* src/timeout.c (WIFSIGNALED, WTERMSIG): Remove definitions, now that gnulib guarantees they are defined in <sys/wait.h>. * src/operand2sig.c: Likewise. * src/kill.c: Likewise.
2010-05-01sort: use long doubles only when effectivePaul Eggert
* src/sort.c (general_numcompare): Don't use long double if strtold is not available, as it may introduce needless overhead.
2010-04-30build: update gnulib submodule to latest; bootstrap, tooJim Meyering
2010-04-29sort: use long doubles for general numeric modePádraig Brady
* src/sort.c (general_numcompare): Use long doubles unconditionally, and strtold when available, to convert numbers with greater range and precision. Performance was seen to be on par with standard doubles. * doc/coreutils.texi (sort invocation): Amend the -g description to mention long double rather than double, and strtold rather than strtod. * src/getlimits.c (main): Output floating point limits for use in tests. * tests/misc/sort-float: A new test to ensure sort is using long doubles when possible, and that locale specific floats are handled. * tests/Makefile.am: Reference the new test. * tests/test-lib.sh (getlimits_): Normalize indenting. * NEWS: Mention the new behaviour. Reported by Nelson Beebe.
2010-04-29build: remove now-duplicate use of AC_SYS_LARGEFILEJim Meyering
* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Don't require AC_SYS_LARGEFILE, now that gnulib does it.
2010-04-29build: remove now-useless configure-time header checksJim Meyering
* m4/jm-macros.m4 (gl_CHECK_ALL_HEADERS): Don't test for headers that gnulib now provides: sys/ioctl.h, sys/time.h, sys/wait.h.
2010-04-25doc: tweak factor-describing wordingJim Meyering
* doc/coreutils.texi (factor invocation): Don't say that "factoring large prime numbers is hard". A pedant might ding you, since it's trivial to factor a number that is known to be prime. Instead, say that "factoring large numbers... is hard". Reported by Andreas Eder.
2010-04-24maint: remove now-unnecessary #if HAVE_header_H tests.Jim Meyering
* .x-sc_prohibit_always_true_header_tests: New file. * Makefile.am (syntax_check_exceptions): Add it. * src/cat.c: Remove #if HAVE_SYS_IOCTL_H test. * src/copy.c: Likewise. * src/ls.c: Likewise. * src/stty.c: Likewise. * src/install.c: Remove #if HAVE_SYS_WAIT_H test. * src/kill.c: Likewise. * src/operand2sig.c: Likewise. * src/timeout.c: Likewise. * src/pathchk.c: Remove #if HAVE_WCHAR_H test. * src/stat.c: Remove #if HAVE_NETINET_IN_H test.
2010-04-24build: enable gnulib modules for more replacement headersJim Meyering
* bootstrap.conf (gnulib_modules): Add the following: netinet_in, sys_ioctl, sys_wait, so that we can eliminate the #if HAVE_<header>_H tests guarding their header inclusions.
2010-04-24tests: clean up also upon SIGQUITJim Meyering
* tests/test-lib.sh: Also trap on SIGQUIT. Spotted by Dmitry V. Levin.
2010-04-23post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2010-04-23version 8.5Jim Meyering
* NEWS: Record release date.
2010-04-23tests: fix exit status of signal handlers in shell scriptsDmitry V. Levin
The value of `$?' on entrance to signal handlers in shell scripts cannot be relied upon, so set the exit code explicitly. * cfg.mk (sc_always_defined_macros, sc_system_h_headers): Set the exit code in signal handler explicitly to 128 + SIG<SIGNAL>. * src/Makefile.am (sc_tight_scope): Likewise. * tests/test-lib.sh: Likewise.