summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-06-26truncate: handle the case in which off_t != intmax_tJim Meyering
* src/truncate.c (parse_len): Use a temporary of type intmax_t, rather than off_t; detect out of range [OFF_T_MIN..OFF_T_MAX]. (main) [IF_LINT]: Initialize, to avoid an unwarranted "may be used uninitialized" warning. Reported by Michael Geng. Signed-off-by: Pádraig Brady <P@draigBrady.com>
2008-06-23basename: List David MacKenzie as the author.Jim Meyering
* src/basename.c (AUTHORS): List David as the author. * AUTHORS: Update here, too.
2008-06-23echo: use AUTHORS from bash's built-in echoOndřej Vašík
* AUTHORS,src/echo.c: Use bash builtin echo authors instead of FIXME unknown
2008-06-22use gnulib's "open" moduleJim Meyering
* bootstrap.conf (gnulib_modules): Add open. This is required at least for Solaris 9 and HP-UX 11, to avoid a truncate test failure. For details, see this thread: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13755
2008-06-22stat: warn that the --context (-Z) option (a no-op) is obsoleteJim Meyering
* src/stat.c (main): It will be removed in a couple years. * NEWS (Change in behavior): Mention this.
2008-06-20make "make syntax-check" quieterJim Meyering
* maint.mk (po-check, makefile-check, sc_proper_name_utf8_requires_ICONV): Add "@" prefix.
2008-06-20sort: Fix bug where --batch-size option shrank SORT_SIZE.Bo Borgerson
* src/sort.c (specify_nmerge, main): Only adjust SORT_SIZE if it's already set. * tests/misc/sort-merge: Test bug fix.
2008-06-19tests: avoid test failure when root's primary group-ID is not 0Jim Meyering
* tests/cp/preserve-gid: Expect a cp-without-`-p'-created file to have a group ID of $(id -g). Reported by Jarod Wilson. Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803/focus=13837
2008-06-19tests: avoid root-only test failure when run in a chrootJim Meyering
* tests/misc/runcon-no-reorder: Accept the diagnostic that is produced when running in a chroot without /selinux/context. Reported by Jarod Wilson. Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803/focus=13837
2008-06-18* tests/check.mk: Fix a typo in a comment.Jim Meyering
2008-06-17doc: fix a syntax errorJim Meyering
* coreutils.texi (du invocation): Add missing comma.
2008-06-17sort: accept new option --batch-size=NMERGEBo Borgerson
* src/sort.c: (static unsigned int nmerge) Replace constant NMERGE. (specify_nmerge) Validate and apply new option. (mergefps) Replace some arrays with pointers to xnmalloc'd storage. * tests/misc/sort-merge: Test new option. * doc/coreutils.texi: Describe new option. * NEWS: Advertise new option.
2008-06-17sort: add new option --files0-from=FBo Borgerson
* src/sort.c: Support new option. * tests/misc/sort-files0-from: Test new option. * tests/misc/Makefile.am: Indicate new test. * docs/coreutils.texi: Explain new option. * NEWS: Advertise new option. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-06-17HACKING: Add section for tips on reducing translator workload.Bo Borgerson
* HACKING (Be nice to translators): New section. Add Jim's suggestion to avoid changing translatable strings if possible.
2008-06-17* THANKS: Add name and email for Carl Roth.Jim Meyering
2008-06-17ls, od: avoid redundant constEric Blake
* src/ls.c (long_time_format, sort_functions): Avoid redundant const. * src/od.c (charname): Likewise. * maint.mk (sc_redundant_const): Add rule to detect this.
2008-06-17join: improve memory managementBo Borgerson
* src/join.c (struct seq): Use a (struct line **) for `lines' rather than one long (struct line *). This allows individual lines to be swapped out if necessary. (reset_line): Get a line ready for new input. (init_linep): Create a new line and assign it to the the pointer passed in. (spareline[2]): Hold a spare line for each input file. (free_spareline): Clean up. (get_line): Take a (struct line **) instead of a (struct line *). If the line to be overwritten is the previous line for the current file then swap it out for the spare. (join): Accomodate new structure of SEQs and new parameters to get_line; Don't free stale lines until the end -- they're re-usable now. (dup_line): Remove function. * NEWS: Mention the performance improvement.
2008-06-16* doc/coreutils.texi (join invocation): Drop leading blanks.Ralf Wildenhues
2008-06-16remove redundant const directivesJim Meyering
In 1463824d8e7f72c31f1d803d7cfe2b608ccafc5c, I added some missing "const" directives, as well as some new, redundant ones. This removes the redundant ones. Pointed out by Eric Blake. * base64.c, cat.c, chcon.c, chgrp.c, chmod.c, chown.c, comm.c: * cp.c, csplit.c, cut.c, date.c, dd.c, df.c, dircolors.c, du.c: * env.c, expand.c, fmt.c, fold.c, groups.c, head.c, id.c: * install.c, join.c, kill.c, ln.c, ls.c, md5sum.c, mkdir.c: * mkfifo.c, mknod.c, mktemp.c, mv.c, nice.c, nl.c, od.c: * paste.c, pathchk.c, pinky.c, pr.c, ptx.c, readlink.c, rm.c: * rmdir.c, runcon.c, seq.c, shred.c, shuf.c, sort.c, split.c: * stat.c, stty.c, su.c, sum.c, tac.c, tail.c, tee.c, timeout.c: * touch.c, tr.c, truncate.c, tty.c, uname.c, unexpand.c, uniq.c: * wc.c, who.c: Remove redundant const directives. * maint.mk (sc_const_long_option): Don't require redundant "const".
2008-06-16chcon: correct --verbose output to include newlinesJim Meyering
* src/chcon.c (process_file): Append "\n" to --verbose diagnostic. * tests/misc/chcon: Add a test for the above. * NEWS: mention the bug fix Reported by Carl D. Roth in http://bugzilla.redhat.com/451478.
2008-06-15address root cause of compilation failures:Jim Meyering
The affected code wasn't even being compiled on my system, because HAVE_NL_LANGINFO was not defined. On other systems, where vasnprintf.m4 determines it needs %A or %a replacement support, it _would_ check for nl_langinfo, and expose the compilation failure. * m4/jm-macros.m4: Check for nl_langinfo, required by sort.c.
2008-06-15fix the compilation failure for realJim Meyering
* src/sort.c (monthtab): Neither "const" may be added.
2008-06-15fix a const-related compilation failure in sort.cJim Meyering
* src/sort.c (monthtab): Remove overzealous "const". Table entries are modified in an #if HAVE_NL_LANGINFO block. Introduced by 1463824d8e7f72c31f1d803d7cfe2b608ccafc5c.
2008-06-15update HACKING guidelinesJim Meyering
* HACKING: Don't suggest --signoff; it's redundant. (log requirements): Specify preferred forms. Mention preference for "<" over ">". Mention the "const placement" preference.
2008-06-14run gnulib-tests in parallelJim Meyering
* tests/Makefile.am: Define AUTOMAKE_OPTIONS, so check.mk can append. * tests/check.mk: Define SUFFIXES, so check.mk can append. * build-aux/check.mk (SUFFIXES): Append, so as not to evoke automake warning the prior definition in gnulib-tests/gnulib.mk. (AUTOMAKE_OPTIONS): Likewise. * gnulib-tests/Makefile.am (TEST_LOGS): Define. Include build-aux/check.mk
2008-06-14* maint.mk (sc_proper_name_utf8_requires_ICONV) Fix typo in diagnostic.Jim Meyering
2008-06-14add "const" attribute, where possibleJim Meyering
* maint.mk (sc_const_long_option): New rule. Enforce global change. * src/base64.c (long_options): Use "const" where possible. * src/cat.c (main): Likewise. * src/chcon.c (long_options): Likewise. * src/chgrp.c (long_options): Likewise. * src/chmod.c (long_options): Likewise. * src/chown.c (long_options): Likewise. * src/comm.c (long_options, OUTPUT_DELIMITER_OPTION): Likewise. * src/cp.c (long_opts): Likewise. * src/csplit.c (longopts): Likewise. * src/cut.c (longopts): Likewise. * src/date.c (long_options): Likewise. * src/dd.c (conversions, flags, statuses): Likewise. * src/df.c (long_options): Likewise. * src/dircolors.c (long_options): Likewise. * src/du.c (long_options): Likewise. * src/env.c (longopts): Likewise. * src/expand.c (longopts): Likewise. * src/fmt.c (long_options): Likewise. * src/fold.c (longopts): Likewise. * src/groups.c (longopts): Likewise. * src/head.c (long_options): Likewise. * src/id.c (longopts): Likewise. * src/install.c (long_options): Likewise. * src/join.c (longopts): Likewise. * src/kill.c (long_options): Likewise. * src/ln.c (long_options): Likewise. * src/ls.c (long_time_format, long_options, sort_functions): Likewise. * src/md5sum.c (long_options): Likewise. * src/mkdir.c (longopts): Likewise. * src/mkfifo.c (longopts): Likewise. * src/mknod.c (longopts): Likewise. * src/mktemp.c (longopts): Likewise. * src/mv.c (long_options): Likewise. * src/nice.c (longopts): Likewise. * src/nl.c (longopts): Likewise. * src/od.c (charname, long_options): Likewise. * src/paste.c (longopts): Likewise. * src/pathchk.c (longopts): Likewise. * src/pinky.c (longopts): Likewise. * src/pr.c (long_options): Likewise. * src/ptx.c (long_options): Likewise. * src/readlink.c (longopts): Likewise. * src/rm.c (long_opts): Likewise. * src/rmdir.c (longopts): Likewise. * src/runcon.c (long_options): Likewise. * src/seq.c (long_options): Likewise. * src/shred.c (long_opts): Likewise. * src/shuf.c (long_opts): Likewise. * src/sort.c (monthtab, long_options): Likewise. * src/split.c (longopts): Likewise. * src/stat.c (long_options): Likewise. * src/stty.c (mode_info, control_info, longopts, set_mode) Likewise. (set_control_char, speeds): Likewise. * src/su.c (longopts): Likewise. * src/sum.c (longopts): Likewise. * src/tac.c (longopts): Likewise. * src/tail.c (long_options): Likewise. * src/tee.c (long_options): Likewise. * src/timeout.c (long_options): Likewise. * src/touch.c (longopts): Likewise. * src/tr.c (long_options): Likewise. * src/truncate.c (longopts): Likewise. * src/tty.c (longopts): Likewise. * src/uname.c (uname_long_options, arch_long_options): Likewise. * src/unexpand.c (longopts): Likewise. * src/uniq.c (longopts): Likewise. * src/wc.c (longopts): Likewise. * src/who.c (longopts): Likewise.
2008-06-14revert previous change, "don't use "const" with scalar types"Jim Meyering
* src/truncate.c: There is nothing wrong with that construct. This reverts commit d7d80c5b7b122377fe250357a3ab182e8fbde20a.
2008-06-14don't use "const" with scalar typesJim Meyering
* src/truncate.c: Several vendor compilers reject that. See http://article.gmane.org/gmane.comp.lib.gnulib.bugs/13876
2008-06-13od: improve handling of paddingEric Blake
* src/od.c (decode_one_format): Alter the format, again. (FMT_BYTES_ALLOCATED): Reduce size by adjusting to new format. (MAX_INTEGRAL_TYPE_SIZE): Move earlier in the file. (charname): Turn it into a 2D array, since there's no need for pointers now. (PRINT_TYPE, print_named_ascii, print_ascii): Add a width parameter. (write_block): Account for width parameter. Using ideas from Paul Eggert.
2008-06-13od: align multiple -t specsEric Blake
* src/od.c (struct tspec): Add pad_width field, and adjust print_function prototype. (decode_one_format): Rewrite all fmt_string values to account for pad width. (FMT_BYTES_ALLOCATED): Adjust to new format style. (main): Compute pad width per spec. (write_block): Account for pad width. (dump): Don't print padding-only fields. (PRINT_TYPE, print_named_ascii, print_ascii): All print functions adjusted to use variable pad width. * tests/Makefile.am (TESTS): Add test. * tests/misc/od-multiple-t: New file. * THANKS: Update. * NEWS: Mention the improvement. Reported by Gary Johnson.
2008-06-13od: use gnulib printf replacement as necessaryEric Blake
* src/od.c (includes): Add xprintf.h. (PRINT_TYPE): New macro, using xprintf instead of printf. (print_s_char, print_char, print_s_short, print_short, print_int) (print_long, print_long_long, print_float, print_double) (print_long_double): Factor into PRINT_TYPE macro. (print_named_ascii, print_ascii): Use xprintf. * NEWS: Mention this as a bug fix.
2008-06-13od: simplify long double supportEric Blake
* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Remove obsolete check for AC_C_LONG_DOUBLE. * src/od.c (LONG_DOUBLE): Delete. (width_bytes, MAX_FP_TYPE_SIZE, decode_one_format, main): Just use 'long double' directly. (print_long_double): No longer protect by HAVE_LONG_DOUBLE.
2008-06-13doc: od defaults to -toS, not -td2Eric Blake
* src/od.c (usage): Correct description of default.
2008-06-13skip (don't fail) root-only tests for common set-up failuresJim Meyering
Address 2 of 4 failures reported by Jarod Wilson in http://bugzilla.redhat.com/442352. More details here: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13803 * tests/cp/cp-a-selinux: Skip the test if "mkfs -t ext2" fails. * tests/rm/fail-2eperm: Skip the test if "rm" is not accessible.
2008-06-12tweak to conform with syntax policyJim Meyering
Use "<" or "<=" rather than ">" or ">=". Use "Type const *", rather than "const Type *".
2008-06-12comm: accept new option: --output-delimiter=STRBo Borgerson
* src/comm.c (delimiter): New global. (writeline): Use delimiter string instead of single TAB character. (main): Initialize delimiter. * tests/misc/comm: Add tests for comm output delimiter specification. * doc/coreutils.texi: Document new option. * NEWS: Advertise new option. * TODO: Remove associated item.
2008-06-12comm: ensure that input files are sortedBo Borgerson
* NEWS: List new behavior. * doc/coreutils.texi (checkOrderOption) New macro for describing `--check-order' and `--nocheck-order', used in both join and comm. * src/comm.c (main): Initialize new options. (usage): Describe new options. (compare_files): Keep an extra pair of buffers for the previous line from each file to check the internal order. (check_order): If an order-check is required, compare and handle the result appropriately. (copylinebuffer): Copy a linebuffer; used for copy before read. * tests/misc/Makefile.am: List new test. * tests/misc/comm: Tests for the comm program, including the new order-checking functionality and attendant command-line options.
2008-06-11fix another unportable use of 'tr'Jim Meyering
* configure.ac [EXTRA_PROGRAMS]: Add omitted space in tr's STRING2. Spotted by Denis Excoffier, upon Solaris 8 build failure.
2008-06-11tests: skip a chown test on FreeBSD 6.xJim Meyering
* tests/chown/separator: Skip this test if is likely to fail due to the combination of a bogus group name and a broken getgrnam function.
2008-06-11tests: remove duplicate mention of misc/selinuxJim Meyering
* tests/Makefile.am (TESTS): Remove misc/selinux, since it's already listed in $(root_tests).
2008-06-11fix build failure on AIX 4Bruno Haible
* configure.ac: Fix unportable invocation of 'tr', introduced on 2008-04-22. Affects tr from at least AIX 4.3.2.
2008-06-10remove test for specific diagnostic when truncating missing directoryPádraig Brady
Solaris 10 returns ENOTDIR when truncating a nonexistent directory, whereas Linux returns EISDIR (because it has a trailing /). * tests/misc/truncate-fail-diag: Remove the test for the specific error.
2008-06-10timeout: use system-independent exit valuesPádraig Brady
Change exit values from ETIMEDOUT and ECANCELED, the values of which are system dependent, to 124 and 125 respectively. * src/timeout.c (EXIT_TIMEDOUT, EXIT_CANCELED): Define. (usage, main): Adjust. * coreutils.texi (timeout invocation): Update. * tests/misc/timeout: Adjust.
2008-06-09enforce the proper_name_utf8-requires-ICONV link ruleJim Meyering
* maint.mk (sc_proper_name_utf8_requires_ICONV): New rule. * src/Makefile.am (timeout_LDADD, truncate_LDADD): Add $(LIBICONV).
2008-06-09* NEWS (Improvements): Mention improved (via gnulib) ACL support.Bruno Haible
2008-06-08maint.mk: my-distcheck runs $(MAKE) syntax-check once againJim Meyering
* maint.mk (my-distcheck): Run $(MAKE) syntax-check once again. Run "$(MAKE) check" _after_ the less expensive syntax-check.
2008-06-08standardize some error messagesBo Borgerson
* maint.mk: (sc_error_message_warn_fatal, sc_error_message_uppercase): (sc_error_message_period): Add automatic checks for non-standard error messages. * .x-sc_error_message_uppercase: explicit exclusion for this check * src/cp.c: Standardize some error messages. * src/date.c: Likewise. * src/dircolors.c: Likewise. * src/du.c: Likewise. * src/expr.c: Likewise. * src/install.c: Likewise. * src/join.c: Likewise. * src/ln.c: Likewise. * src/mv.c: Likewise. * src/od.c: Likewise. * src/pr.c: Likewise. * src/split.c: Likewise. * src/truncate.c: Likewise. * src/wc.c: Likewise. * tests/du/files0-from: Expect new error message. * tests/misc/join: Likewise. * tests/misc/split-a: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * lib/xmemxfrm.c: Likewise.
2008-06-08syntax-check: detect anachronistic Perl-based testsJim Meyering
* maint.mk (sc_no_exec_perl_coreutils): Rename and rewrite.
2008-06-06Add new program: truncatePádraig Brady
* AUTHORS: Register as the author * NEWS: Mention this change * README: Add truncate command to list * src/truncate.c: New command * src/Makefile.am: Add truncate command to list to build * src/.gitignore: Add truncate binary to list to ignore * doc/coreutils.texi (truncate invocation): Add truncate info * man/Makefile.am: Add truncate man page to list to build * man/truncate.x: Add truncate man page template * po/POTFILES.in: Add truncate to list to translate * tests/Makefile.am: Add truncate tests * tests/misc/help-version: Add support for new truncate command * tests/misc/truncate-dangling-symlink: check dangling link ok * tests/misc/truncate-dir-fail: ensure dirs fail * tests/misc/truncate-fail-diag: validate messages for missing paths * tests/misc/truncate-fifo: ensure fifos ignored * tests/misc/truncate-no-create-missing: ensure -c option honoured * tests/misc/truncate-overflow: check signed integer overflows * tests/misc/truncate-owned-by-other: root permissions check * tests/misc/truncate-parameters: check invalid parameter combinations * tests/misc/truncate-relative: check invalid relative sizes