Age | Commit message (Collapse) | Author |
|
Problem reported by Sebastian Rasmussen in: http://bugs.gnu.org/18054
* gl/lib/randread.c (randread_error): Don't put multiple string
literals inside _(...), as xgettext doesn't support that.
* src/chroot.c (main): In diagnostics, don't bother to distinguish
between setting the number of supplemental group IDs to a zero or
to a nonzero value, as the underlying system call is the same
either way. This also makes the string easier to translate correctly.
|
|
* gl/lib/fadvise.c (fadvice_t): This might go to gnulib some day so
remove the trailing comma.
Fixes http://bugs.gnu.org/17329
|
|
* gl/lib/fadvise.c: s/the the/the/, indroduced in commit
v8.22-40-g4f21182. Promted by sc_prohibit_doubled_word.
While at it, also s/be candidate/be a candidate/.
|
|
* gl/lib/fadvise.c: Use a pragma to turn off this warning option:
-Wsuggest-attribute=const. Without this change, building with
--enable-gcc-warnings would evoke this error:
lib/fadvise.c:25:1: error: function might be candidate for\
attribute 'const' [-Werror=suggest-attribute=const]
|
|
Run "make update-copyright", but then also run this,
perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
|
|
The patch was corrupted in commit v8.21-50-g7b65f8e
* gl/modules/tempname.diff: Fix the offsets so that the patch
applies cleanly. Note that this was only apparent with patch < 2.6.
With patch >= 2.6, patch will not indicate an error applying
the second hunk of the patch and silently ignore it.
I double checked that all patches now apply cleanly by adjusting
gnulib-tool to run patch with --fuzz=0 which might be advisable
going forward, even on a per project basis.
The silent ignoring of hunks by newer patch(1) has been reported.
Fixes http://bugs.gnu.org/15255
|
|
Consolidate all smack routines and checks in a module.
We replace and wrap the most commonly used smack routines,
which allows removing ifdefs throughout the code.
* gl/lib/smack.h: A new header containing the implementation
of the wrapped and replacement routines. Note the is_smack_enabled()
routine should be optimized out at compile time when compiled
on a system without libsmack.
* gl/modules/smack: Describe the new module and move the
configure time code here from ...
* m4/jm-macros.m4: ... here.
* bootstrap.conf: Reference the new module.
* src/id.c: Use the routines without ifdefs where possible.
* src/ls.c: Likewise.
* src/mkdir.c: Likewise.
* src/mkfifo.c: Likewise.
* src/mknod.c: Likewise.
|
|
* configure.ac: If clang, add -Wno-format-extra-args and
-Wno-tautological-constant-out-of-range-compare.
* gl/lib/rand-isaac.c (ind):
* gl/lib/randread.c (readisaac):
* src/ls.c (dev_ino_push, dev_ino_pop):
* src/sort.c (buffer_linelim):
* src/system.h (is_nul):
* src/tail.c (tail_forever_inotify):
Rewrite to avoid casts that clang dislikes.
It's good to avoid casts anyway.
* src/expr.c (integer_overflow): Declare only if it exists.
(die): Remove; unused.
* src/ls.c (dev_ino_push): New function, replacing ...
(DEV_INO_PUSH): ... this removed macro. All uses changed.
(decode_switches): Rewrite "str"+i to &str[i].
|
|
|
|
Run "make update-copyright", but then also run this,
perl -pi -e 's/2\d\d\d-//' tests/sample-test
to make that one script use the single most recent year number.
|
|
I've moved the non-recursive-gnulib-prefix-hack module to
gnulib, with two small improvements, so remove it from here
and update gnulib to the latest.
* gl/build-aux/prefix-gnulib-mk: Remove file.
* gl/m4/non-recursive-gnulib-prefix-hack.m4: Remove file.
* gl/modules/non-recursive-gnulib-prefix-hack: Remove file.
* gnulib: Update to latest.
|
|
* gl/build-aux/prefix-gnulib-mk (prefix_assignment): Exempt
the RHS of a "GPERF = ..." assignment from lib/ prefixing.
|
|
* gl/lib/mbsalign.h: Fix comment typo.
|
|
Here is a good reason to avoid alloca with non-recursive make. These:
$ grep @ALLOCA lib/gnulib.mk
lib_libcoreutils_a_LIBADD += lib/@ALLOCA@
lib_libcoreutils_a_DEPENDENCIES += lib/@ALLOCA@
would lead to this, when @ALLOCA@ expands to the empty string,
which is essentially "always", now:
$ grep ' lib/$' Makefile
lib_libcoreutils_a_LIBADD = $(gl_LIBOBJS) lib/
lib_libcoreutils_a_DEPENDENCIES = $(gl_LIBOBJS) lib/
Tell the prefix-adding script not to add a prefix when the word it's
prefixing is "@ALLOCA@". That is fine for most cases, but what about
when the expansion of @ALLOCA@ is nonempty?
* build-aux/prefix-gnulib-mk (prefix_word): Exclude @ALLOCA@.
* gl/m4/non-recursive-gnulib-prefix-hack.m4: Prefix non-empty
$ALLOCA with "lib/". FIXME: I'm not sure this is required,
now that we...
Use AC_CONFIG_LIBOBJ_DIR([lib]).
Without using AC_CONFIG_LIBOBJ_DIR([lib]), automake (not autoconf)
would complain of failure to find aclocal.c, due to the use of
AC_LIBSOURCES(alloca.c).
|
|
* gl/modules/non-recursive-gnulib-prefix-hack: New module.
* gl/m4/non-recursive-gnulib-prefix-hack.m4:
(gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): This is the snippet
that this module inserts near the end of configure.
* gl/build-aux/prefix-gnulib-mk: New script, from bison.
Changes from the code in bison:
(prefix_assignment): Split a long line.
(prefix): Add trailing slashes to avoid a single false match.
Prefix imaxtostr.c and the other *tostr.c file names manually.
Also, use $prefix in place of hard-coded "lib/".
|
|
* gl/lib/mbsalign.h: Add MBA_UNIBYTE_ONLY (to allow
faster processing). Also add MBA_NO_LEFT_PAD, MBA_NO_RIGHT_PAD
to give greater control of padding, useful with the first
or last fields on a line.
* gl/lib/mbsalign.c (mbsalign): Implement the new flags.
* gl/tests/test-mbsalign.c (main): Test combinations
of the new flags.
|
|
Convert the few remaining coreutils-specific files in lib/ to
gnulib-style modules under gl/, removing their corresponding .m4
files, since the information recorded in those files is better
stored in module-description file in gl/modules/.
* bootstrap.conf (gnulib_modules): Add new modules:
fd-reopen, buffer-lcm, xfts, strnumcmp.
* gl/lib/buffer-lcm.c: Renamed from the file in lib/.
* gl/lib/buffer-lcm.h: Likewise.
* gl/lib/fd-reopen.c: Likewise.
* gl/lib/fd-reopen.h: Likewise.
* gl/lib/strintcmp.c: Likewise.
* gl/lib/strnumcmp-in.h: Likewise.
* gl/lib/strnumcmp.c: Likewise.
* gl/lib/strnumcmp.h: Likewise.
* gl/lib/xfts.c: Likewise.
* gl/lib/xfts.h: Likewise.
* gl/modules/buffer-lcm: New module-description file.
* gl/modules/fd-reopen: Likewise.
* gl/modules/strnumcmp: Likewise.
* gl/modules/xfts: Likewise.
* m4/fd-reopen.m4: Remove, no longer needed.
* m4/strnumcmp.m4: Likewise.
* m4/xfts.m4: Likewise.
* m4/prereq.m4: Do not AC_REQUIRE the m4 functions from
our just-removed m4/*.m4 files.
|
|
We can get the same effect using the modules file.
* gl/m4/root-dev-ino.m4: Remove file.
* gl/modules/root-dev-ino (Depends-on): Add lstat.
(Files): Remove m4/root-dev-ino.m4.
(Makefile.am) [lib_SOURCES]: Add root-dev-ino.c and root-dev-ino.h.
(configure.ac): Remove reference to gl_ROOT_DEV_INO.
|
|
We carry local adjustments for a few gnulib modules via the
patches in gl/. Nearly all of those patches had become stale
due to evolution of the originals in gnulib.
To refresh them, first make sure you have no local changes in gl/
or in the gnulib submodule, then run "make refresh-gnulib-patches".
|
|
* tests/misc/help-version: Fix comment grammar:
s/all these/all of these/
* gl/lib/tempname.c.diff: Likewise.
|
|
* gl/lib/regcomp.c.diff: Correct invalid hunk lengths (s/1/7/g)
in the last hunk's @@-line.
|
|
* gnulib: Update submodule to latest.
* bootstrap: Update from gnulib.
* gl/lib/regcomp.c.diff: Adapt to gnulib changes.
|
|
Run "make update-copyright".
|
|
The preceding commands ignored .[ch] files in lib/ and gl/.
This is what I should have been doing from the start:
git grep -l '`.*'\' $(g ls-files |grep '\.[ch]$') \
| xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
|
|
Run "make update-copyright".
|
|
This avoids spurious diagnostics when running our "bootstrap" script.
* gl/modules/heap: Append colon after "License".
* gl/modules/randint: Likewise.
* gl/modules/randperm: Likewise.
* gl/modules/randread: Likewise.
Reported by Stefano Lattarini. Diagnosed by Bruno Haible.
|
|
* gl/modules/randread (Depends-on): Add stdalign.
* gl/lib/randread.c: Include <stdalign.h>, so we can ...
[!_STRING_ARCH_unaligned]: remove definition of stdalign.
|
|
* gl/modules/tempname.diff: Regenerate to correct bogus offsets
and adjust for 1-line offset. Eric Blake reported that this
patch failed to apply when using patch-2.5.8.
Note that it applies fine using patch-2.6.1.
|
|
* gl/lib/randread.c: Add a FIXME comment suggesting how to improve
performance by using the RDRAND hardware instruction.
|
|
* gl/lib/heap.c: Move declaration to the top of scope.
Reported by Rob McMahon and Wolfgang Steinwender
in relation to "Sun WorkShop 6 update 2 C 5.3 Patch 111679-12
2003/05/18" and "GCC 2.95.3" respectively.
|
|
* gl/lib/tempname.c.diff (gen_tempname_len):
Use x_suffix_len bytes' worth of entropy, not 8 bytes.
|
|
* 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.
|
|
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.
|
|
* gl/modules/getloadavg.diff: Remove file. It stopped being
useful back in February.
* Makefile.am (EXTRA_DIST): Remove it.
|
|
* cfg.mk (sc_preprocessor_indentation): New test, from libvirt.
Exempt 3 files from new cppi test.
* gl/lib/randread.c: Adjust cpp indentation to comply.
* src/extent-scan.c (extent_need_sync): Likewise.
|
|
* gl/lib/randperm.c (randperm_new): When the number of items
to return H, is much smaller than the total number of items N,
use a hash to represent the sparse permutations of the set N.
This is currently enabled for N > 128K and N/H > 32.
* tests/misc/shuf: Ensure shuf can quickly return 2 numbers
from a large range.
* gl/modules/randperm: Depend on hash.
* NEWS: Mention the change.
|
|
* tests/ls/color-norm: s/to to/to/
* gl/lib/mbsalign.h (mbs_align_t): s/or or/or/
* src/extent-scan.c (extent_scan_read): s/the the/the/
* src/libstdbuf.c: s/the the/the/
* tests/misc/stdbuf: s/on on/on/
* ChangeLog-2005: s/for\n\tfor /for\n\t/
|
|
* gl/lib/mbsalign.c (rpl_wcswidth): Remove this in favor
of the equivalent wcswidth replacement in gnulib.
* bootstrap.conf: Depend on the wcswidth module.
Suggested by Bruno Haible.
|
|
* gl/modules/randread-tests (Files): Add tests/macros.h
* gl/tests/test-rand-isaac.c: Remove now-unneeded #include directives.
(ASSERT): Remove definition.
Instead, include "macros.h".
Prompted by suggestions from Bruno Haible.
|
|
* gl/lib/di-set.c: Remove file.
* gl/lib/di-set.h: Likewise.
* gl/lib/ino-map.c: Likewise.
* gl/lib/ino-map.h: Likewise.
* gl/modules/di-set: Likewise.
* gl/modules/di-set-tests: Likewise.
* gl/modules/ino-map: Likewise.
* gl/modules/ino-map-tests: Likewise.
* gl/tests/test-di-set.c: Likewise.
* gl/tests/test-ino-map.c: Likewise.
* gnulib: Update to latest, now that these two modules are there.
|
|
This is required for patch, and hence is about to move to gnulib.
* gl/lib/di-set.c (di_set_lookup): New function.
* gl/lib/di-set.h: Declare it.
* gl/tests/test-di-set.c (main): Exercise it.
The bug was introduced on 2004-12-04 via commit 7380cf79.
|
|
Run "make update-copyright".
|
|
* 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.
|
|
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.
|
|
* NEWS: Document this.
* doc/coreutils.texi (stat invocation): Likewise.
* gl/lib/fstimeprec.c, gl/lib/fstimeprec.h, gl/modules/fstimeprec:
* gl/modules/fstimeprec-tests, gl/tests/test-fstimeprec.c:
New files.
* bootstrap.conf (gnulib_modules): Add fstimeprec.
* src/stat.c: Include fstimeprec.h. Don't include xstrtol.h.
(decimal_point, decimal_point_len): New static vars.
(main): Initialize them.
(epoch_sec, out_ns): Remove.
(out_int, out_uint): Now returns whatever printf returned.
(out_minus_zero, out_epoch_secs): New functions.
(print_stat): Use out_epoch_sec instead of out_ns and epoch_sec.
(print_stat, print_it, usage): Remove the %:X-style formats.
* tests/misc/stat-nanoseconds: Set TZ=UTC0 to avoid problems
with weird time zones. Use a time stamp near the Epoch so that we
don't have to worry about leap seconds. Redo test cases to match
new behavior.
* tests/touch/60-seconds: Change %Y.%:Y to %.9Y, to adjust to
new behavior.
|
|
* gl/lib/mbsalign.c: Include <stdint.h> for SIZE_MAX.
Use SIZE_MAX rather than (size_t) -1, to avoid warning for
"size_t x = -1" on Solaris 10 cc.
* gl/modules/mbsalign (Depends-on): Add stdint.
|
|
* gl/tests/test-rand-isaac.c (main): Fix swapped arguments to strtol.
|
|
This module may be moved to gnulib at some stage,
so keep it C89 compatible.
* gl/lib/mbsalign.c (mbsalign): Declare variables at start of scope
(ambsalign): Likewise
* gl/lib/mbsalign.h: Remove trailing comma from enum
Reported by Andrei Suhan
|
|
* .x-sc_program_name: Exclude all current and future
c files in gl/tests from this check
* gl/tests/test-di-set.c: Remove the hack to work around
the set_program_name syntax-check
* gl/tests/test-ino-map.c: Likewise
* gl/tests/test-rand-isaac.c: Likewise
|
|
* gl/tests/test-rand-isaac.c (main): Avoid warnings from
syntax-check.
|