Age | Commit message (Collapse) | Author |
|
The actual fix is in gnulib's lib/utimecmp.c.
* NEWS: Document fix.
|
|
|
|
* src/sort.c (MAX_MERGE): Avoid integer overflow when on a machine
with (say) 32-bit int and 64-bit size_t and when level == 15.
Without this fix, on such a machine with 32768 or more processors,
the level computation could overflow on large input, and this
would result in division by zero.
|
|
* tests/misc/sort-unique-segv: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
* src/sort.c (write_unique): Save the entire "struct line", not
just a pointer to one. Otherwise, with a multi-thread run,
sometimes, with some inputs, fillbuf would would win a race
and clobber a "saved->text" pointer in one thread just before
it was dereferenced in a comparison in another thread.
* NEWS (Bug fixes): Mention it.
|
|
* tests/envvar-check (vars): Add OMP_NUM_THREADS.
|
|
* tests/misc/sort-spinlock-abuse: New file.
* tests/Makefile.am (TESTS): Add it.
(XFAIL_TESTS): Mark this as an expected-to-fail (for now) test.
|
|
* src/tsort.c (tsort): Unconditionally invoking the free()
doesn't increase scalability, so do it only with -Dlint
|
|
* README-valgrind: Include the "noinst" programs in
those wrapped by valgrind. Update $PATH in check.mk
rather than Makefile.am. Make wrapper scripts
work when suppressions not setup. Keep lines < 80 chars.
|
|
This patch was written by Jim Meyering and myself.
* src/copy.c (copy_reg): Turn EISDIR to ENOTDIR to improve the
quality of diagnostics for commands like "cp a nosuch/". Reported
by Марк Коренберг and Alan Curry in the thread starting at:
http://lists.gnu.org/archive/html/bug-coreutils/2010-11/msg00178.html
* THANKS: Update.
* tests/mv/trailing-slash: Add a test.
|
|
* src/split.c (usage, long_options, main): New options --number,
--unbuffered, --elide-empty-files.
(set_suffix_length): New function to auto increase suffix length
to handle a specified number of files.
(create): New function. Refactored from cwrite() and ofile_open().
(bytes_split): Add max_files argument to support byte chunking.
(lines_chunk_split): New function. Split file into chunks of lines.
(bytes_chunk_extract): New function. Extract a chunk of file.
(of_info): New struct. Used by functions lines_rr and ofile_open
to keep track of file descriptors associated with output files.
(ofile_open): New function. Shuffle file descriptors when there
are more output files than available file descriptors.
(lines_rr): New function to distribute lines round-robin to files.
(chunk_parse): New function. Parses K/N syntax.
* tests/misc/split-bchunk: New test for byte chunking.
* tests/misc/split-lchunk: New test for line delimited chunking.
* tests/misc/split-rchunk: New test for round-robin chunking.
* tests/Makefile.am: Reference new tests.
* tests/misc/split-fail: Add failure scenarios for new options.
* tests/misc/split-l: Fix a typo. s/ln/split/.
* doc/coreutils.texi (split invocation): Document --number.
* NEWS: Mention the new feature.
* .mailmap: Map new email address for shortlog.
Signed-off-by: Pádraig Brady <P@draigBrady.com>
|
|
|
|
* NEWS: Add 2nd blank line to separate latest changes from
those of 8.7, to avoid syntax-check failure.
|
|
* NEWS: Describe patch.
* bootstrap.conf (gnulib_modules): Add ftoastr.
* src/od.c: Include ftoastr.h, not float.h.
(FLT_DIG, DBL_DIG): Remove. No need to verify LDBL_DIG.
(FMT_BYTES_ALLOCATED): No need to worry about floating point now,
since this format is no longer used for floating point.
(PRINT_FIELDS): New macro, with most of the guts of the old PRINT_TYPE.
(PRINT_TYPE): Rewrite to use PRINT_FIELDS.
(PRINT_FLOATTYPE): New macro. This uses the new functions from
ftoastr.
(print_float, print_double, print_long_double): Reimplement
using PRINT_FLOATTYPE.
(decode_one_format): Calculate field widths based on ftoastr-supplied
macros.
* tests/Makefile.am (TESTS): Add misc/od-float.
* tests/misc/od-float: New file.
|
|
|
|
* cfg.mk (sc_prohibit_verbose_version): New rule.
|
|
|
|
E.g.,
-test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; }
+print_ver_ pwd readlink
-test "$VERBOSE" = yes && { stdbuf --version; mv --version; }
+print_ver_ stdbuf mv
Use this command:
git grep -l 'VERBOSE.*--version'|xargs perl -ni \
-e '/^test "\$VERBOSE" = yes && { .*--version/ or print,next;' \
-e 's/env -- //g;' \
-e 's/test "\$VERBOSE" = yes && { /print_ver_ /;' \
-e ' s/(\w+) --version;/$1/g; s/ *}$//; print'
|
|
E.g.,
-test "$VERBOSE" = yes && env -- pwd --version
+print_ver_ pwd
git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \
's/test "\$VERBOSE" = yes && env -- (\w+) --version/print_ver_ $1/'
|
|
Automatically make all of the changes like this:
-test "$VERBOSE" = yes && chgrp --version
+print_ver_ chgrp
git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \
's/test "\$VERBOSE" = yes && (\w+) --version/print_ver_ $1/'
|
|
* tests/init.cfg (print_ver_): New function.
|
|
* tests/test-lib.sh: Remove file. No longer used.
* tests/Makefile.am (EXTRA_DIST): Remove it here, too.
* tests/sample-test: Correct a comment.
|
|
RHS='. "\${srcdir=.}/init.sh"; path_prepend_ ../src'
git grep -l test-lib.sh \
| xargs perl -pi -e 's,^\. \$srcdir/test-lib\.sh$,'"$RHS",
|
|
|
|
Initially, I did this,
git grep -l srcdir/test-lib.sh|xargs perl -p0i -e '~180-byte script'
but that line would have been much longer than the maximum permitted
by coreutils' commit hook, and wasn't readable besides, so here's a
more readable version:
lhs=$(printf '%s\\n' \
'if test "$VERBOSE" = yes; then' \
' set -x' \
' touch --version' \
'fi' \
'' \
'. $srcdir/test-lib.sh' \
| sed 's/\$/\\\$/g;s/touch/(\\w+)/')
rhs=$(printf '%s\\n' \
'. "${srcdir=.}/init.sh"; path_prepend_ ../src' \
'test "$VERBOSE" = yes && FIXME --version' \
| sed 's/\$/\\\$/g;s/FIXME/\$1/')
git grep -l srcdir/test-lib.sh|xargs perl -p0i -e "s,$lhs,$rhs,"
|
|
|
|
* cfg.mk (sc_NEWS_two_empty_lines): New syntax-check rule.
|
|
* bootstrap.conf (buildreq): require `patch` as it's used
by gnulib-tool to apply local diffs to gnulib modules
|
|
* src/split.c (main): Error if -[bC] value > OFF_T_MAX
* tests/misc/split-fail: Adjust for the new lower limits
|
|
src/truncate.c (main): Use a bool to store if an error occurred,
rather than an int, to protect against overflow.
(do_ftruncate): Likewise. Also change 0/false to mean failure
rather than success.
|
|
* src/csplit.c (max_out): Fix a new warning introduced with
commit 6568b173, 2010-11-10, "csplit: do not rely on..."
|
|
... when configured with the --enable-gcc-warnings option.
This follows on from commit 34ef0a01, 2010-10-14,
"sort: fix unportable cast of unsigned char * -> char *"
* configure.ac: -Wall implicitly enables this warning
so remove the explicit disabling.
|
|
* gl/modules/fadvise-tests: Add the module previously missed
in commit 63b5e816, 2010-07-14, "fadvise: new module ...".
* gl/tests/test-fadvise.c: Add a comment as to why we don't
check return values.
|
|
* doc/coreutils.texi (stat invocation): Add sentence-ending period.
* NEWS: Correct stat change description: s/floating point //.
* cfg.mk (old_NEWS_hash): Update, to match this NEWS change.
|
|
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
* NEWS: Record release date.
|
|
...to fix the failing update-copyright test,
and for the openat portability fix.
|
|
Also, do the following to avoid "make syntax-check" failure
induced by new rules.
* .x-sc_bindtextdomain: Exempt files with an #ifdef'd "main".
* Makefile.am: Add this file.
|
|
The implementation of variable-precision time stamps relied
on heuristics that made the output subtly nondeterministic,
or at least hard to reproduce:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/21531/focus=21538
So, for now at least, we're removing that feature.
* bootstrap.conf (gnulib_modules): Remove fstimeprec.
* gl/lib/fstimeprec.c, gl/lib/fstimeprec.h: Remove files.
* gl/modules/fstimeprec, gl/modules/fstimeprec-tests: Likewise.
* gl/tests/test-fstimeprec.c: Remove file.
|
|
* src/stat.c: Don't include fstimeprec.c.
(out_epoch_sec): Don't call fstimeprec.
* NEWS: Update description.
* doc/coreutils.texi: Likewise.
|
|
* doc/coreutils.texi (csplit invocation): Say that %d and %i are
aliases for %u.
* src/csplit.c (FLAG_THOUSANDS, FLAG_ALTERNATIVE): New constants.
(get_format_flags): Now take char const * and int * and return
size_t. It now stores info about the flags instead of merely
scanning them. Also, it handles '0' correctly. Drop support for
the undocumented '+' and ' ' flags since the value is unsigned.
Add support for the (undocumented) "'" flag. All uses changed.
(get_format_width, get_format_prec): Remove.
(check_format_conv_type): Renamed from get_format_conv_type, with
a different signature. It now converts the format to one that is
compatible with unsigned int, and checks flags. All uses changed.
(max_out): Have snprintf compute the number of bytes needed rather
than attempting to do it ourselves (which doesn't work portably
with outlandish formats such as %4294967296d).
(check_format_conv_type, main): Check for overflow in size
calculations. Don't assume size_t fits in unsigned int.
* tests/misc/csplit: Check for proper handling of flags, with
%0#6.3x. Coreutils 8.6 mishandles this somewhat-weird example.
|
|
* src/csplit.c (free_buffer): Also free the line offsets buffers
(remove_line): Also free the containing structure
* tests/misc/csplit-heap: A new test to trigger with leaks of
this magnitude.
* tests/Makefile.am: Reference the new test
* NEWS: Mention the fix
Reported by David Hofstee
|
|
* tests/misc/csplit-1000: Fix comments and --version invocation.
|
|
Without this fix, seq 1000 | csplit - /./ '{*}' would write
the NUL-terminated file name, xx1000, into a buffer of size 6.
* src/csplit.c (main): Use properly sized file name buffer.
* NEWS (Bug fixes): Mention it.
* tests/misc/csplit-1000: New test to trigger the bug.
* tests/Makefile.am (TESTS): Add misc/csplit-1000.
|
|
* tests/mv/i-3: Adjust so that the symlink is resolved
before redirecting to the background command, as otherwise
the stdin descriptor passed to the command will fail the
isatty() or ttyname() test.
|
|
* tests/init.cfg (retry_delay_): Adjust awk script to print a single
floating point value, rather than many.
|
|
because dash-0.5.6-2.fc14.x86_64 would also be disqualified.
This reverts part of yesterday's commit 6c058b2d, "tests: avoid
failure due to bug in FreeBSD 8.1's /bin/sh". Note that the offending
aspect of those shells is not officially a bug, since "local" is not
specified by POSIX. However, it is very unintuitive that prepending
"local" to an existing, standards-compliant assignment would evoke
such a fundamental change in semantics.
* tests/init.sh: Remove snippet requiring sane "local" support.
Upstream dash bug report:
http://thread.gmane.org/gmane.comp.shells.dash/419
|
|
* src/stat.c (digits, printf_flags): New static vars.
(make_format): New function.
(out_string, out_int, out_uint, out_uint_o, out_uint_x):
(out_minus_zero): Use it to avoid undefined behavior when invoking
printf.
(print_it): Check for invalid conversion specifications such as
%..X and %1-X, which would otherwise rely on undefined behavior
when invoking printf.
* tests/misc/stat-nanoseconds: Check that the "I" printf flag
doesn't mess up in the C locale, as it formerly did on non-GNU
hosts.
|
|
* tests/init.sh: Arrange not to accept FreeBSD 8.1's /bin/sh, since
it fails this test: /bin/sh -c 'f(){ local s=$IFS; test -n "$s"; }; f'
* tests/init.cfg (sanitize_path_): Stop-gap measure to work around
a bug in FreeBSD 8.1's /bin/sh. We'll un-do this change once all
300+ tests use init.sh.
|
|
|