and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

This project is mirrored from git://git.sv.gnu.org/coreutils.git. Pull mirroring failed .
Last successful update .
  1. 23 Oct, 2012 6 commits
  2. 21 Oct, 2012 1 commit
  3. 19 Oct, 2012 1 commit
  4. 17 Oct, 2012 2 commits
  5. 13 Oct, 2012 1 commit
  6. 08 Oct, 2012 2 commits
    • Pádraig Brady's avatar
      factor: fix integer validation and GMP fallback · 024a1d57
      Pádraig Brady authored
      In the recent factor rewrite, the GMP code
      wasn't actually used; just an error was printed
      on integer overflow.  While fixing that it was noticed
      that correct input validation wasn't done in all cases
      when falling back to the GMP code.
      
      * src/factor.c (print_factors) Fallback to GMP on overflow.
      (strto2uintmax): Scan the string for invalid characters,
      so that case can be detected independently of overflow.
      Return an error when an empty string is passed.
      Also allow leading spaces and '+' in input numbers.
      * tests/misc/factor.pl: Ensure the GMP code is exercised
      when compiled in. Also add a test to verify leading
      spaces and '+' are allowed.
      024a1d57
    • Pádraig Brady's avatar
      build: support older GMP versions · cf9cd895
      Pádraig Brady authored
      The new factor code introduced usage of mpz_inits() and
      mpz_clears(), which are only available since GMP >= 5,
      and will result in a compile error when missing.
      
      * m4/gmp.m4 (cu_GMP): Define HAVE_DECL_MPZ_INITS appropriately.
      * src/factor (mpz_inits): New function, defined where missing.
      (mpz_clears): Likewise.
      cf9cd895
  7. 07 Oct, 2012 1 commit
    • Jim Meyering's avatar
      maint: avoid warning from gcc's -Wunused-macros · 231e40a6
      Jim Meyering authored
      On some systems, -Wunused-macros would warn about two macros:
      src/factor.c:148:0: warning: macro "__clz_tab" is not used
      src/factor.c:126:0: warning: macro "UHWtype" is not used
      * src/factor.c: Add a use to placate gcc.
      231e40a6
  8. 05 Oct, 2012 1 commit
    • Jim Meyering's avatar
      build: avoid link failure when strerror is replaced · f947735d
      Jim Meyering authored
      When building the new make-prime-list program on a system for which
      strerror is defined to rpl_strerror, we'd get a link failure.
      The problem is that we're including <config.h> for some definitions,
      but do not want the rpl_ ones, since this particular program must
      not be linked against gnulib (aka libcoreutils.a).  This did not
      arise on Fedora 17 or 18, but did on Debian wheezy/sid.
      * src/make-prime-list.c (strerror): #undef.
      Build failure introduced by commit v8.19-152-gcf67e4cc.
      f947735d
  9. 04 Oct, 2012 8 commits
    • Jim Meyering's avatar
      factor: 25% speed-up, on output · 06b7ed80
      Jim Meyering authored
      * src/factor.c (print_factors_single): Use fputs and umaxtostr
      rather than printf with "%ju".  This reduced the time required
      to compute and print the factors of the first 10^7 integers from
      over 8 seconds to 5.75s.  Run this command:
      seq $((10**7)) | env time factor > /dev/null
      06b7ed80
    • Jim Meyering's avatar
      factor: merge with preexisting factor; integrate tests; avoid warnings · 759ebcb5
      Jim Meyering authored
      * src/factor.c: Renamed from factor-ng.c, with the following changes:
      Adjust copyright header to be consistent with others.
      Use xmalloc and xrealloc, to avoid segv upon OOM.
      Switch back to using readtokens to handle input.
      Diagnose invalid inputs.
      s/fprintf+exit/error/
      (print_factors): Add comments.
      (strto2uintmax): Return strtol_error, not int.
      (read_item): Remove, no longer used.
      (main): Use atexit(close_stdout) so that we don't ignore failed write.
      * cfg.mk: Exempt src/longlong.h from several tests.
      Exempt run.sh from the test-list-consistency test.
      Exempt make-prime-list.c from numerous tests, since we won't
      be making it conform: it must not link with libcoreutils.a.
      Exempt factor-ng.c from the no-upper-case error message test.
      * AUTHORS (factor): Add Torbjörn and Niels.
      * tests/local.mk (factor_tests): Encode the 37 tests.
      ($(factor_tests)): Rule to generate a test script for each test.
      * tests/factor/run.sh: New script, marked as very expensive.
      * .gitignore: Ignore new generated files.
      * src/local.mk (src/primes.h): New rule.
      (noinst_PROGRAMS): Add make-prime-list.
      (noinst_HEADERS): Add longlong.h.
      Remove all wheel-related rules and files.
      * src/wheel-gen.pl: Remove file.
      
      maint: mark set-but-not-used variables with ATTRIBUTE_UNUSED
      * src/factor-ng.c (redcify, prime_p, isqrt2): Mark them, so we
      don't have to disable -Wunused-but-set-variable.
      
      maint: use __builtin_expect only if __GNUC__
      * src/factor-ng.c (LIKELY, UNLIKELY) [__GNUC__]: Add #ifdef guard.
      
      build: avoid warning about unused macro
      * src/factor-ng.c (__GMP_DECLSPEC): Don't define here
      * src/longlong.h (__GMP_DECLSPEC): Define if not already defined.
      759ebcb5
    • Niels Möller's avatar
      factor: more improvements · 49f5c21f
      Niels Möller authored
      * src/factor-ng.c: Import some improvements from
      http://gmplib.org:8000/factoringCo-authored-by: default avatarTorbjörn Granlund <tg@gmplib.org>
      49f5c21f
    • Torbjörn Granlund's avatar
      factor: new much-improved implementation; not yet integrated · a38890b2
      Torbjörn Granlund authored
      * src/factor-ng.c: New file, from nt-factor.
      * src/longlong.h: New file.
      * NEWS (Improvements): Mention the upcoming improvements.
      Co-authored-by: Niels Möller
      a38890b2
    • Jim Meyering's avatar
      maint: make-prime-list: syntax conventions; be robust for large N · d836ea73
      Jim Meyering authored
      * src/make-prime-list.c: Insert spaces before parens.
      (main): Abort if the 8-delta value ever exceeds 255.
      d836ea73
    • Jim Meyering's avatar
      maint: make-prime-list: do not ignore write failure · c6369e90
      Jim Meyering authored
      Even though this is just a helper program that is run solely to create
      primes.h, it should not ignore a write failure.  Normally we would
      simply call atexit (close_stdout), but we cannot do that from this
      helper program, since it must be built before the generated header,
      primes.h.  If we were to make the linking of make-prime-list depend
      on libcoreutils.a, that would add all lib/*.o files to the list
      of dependents of $(BUILT_HEADERS).  Then, since there is currently no
      provision to ensure that a file like lib/stdio.h (another built header)
      is built before the first lib/*.o file that also includes <stdio.h>,
      some lib/*.o files would be built before lib/stdio.h and some after.
      The former would provoke link failures due to undefined rpl_* functions.
      * src/make-prime-list.c: Include <errno.h>.
      (fclose): Undef, so that a definition to rpl_fclose does not
      cause a link failure.
      (main): Per the above, in this exceptional case, we check for fclose
      and ferror failure manually, and don't worry about the ferror-only
      failure case in which errno may not be relevant.
      c6369e90
    • Jim Meyering's avatar
      maint: make-prime-list: avoid -Wsuggest-attribute=const warning · cf67e4cc
      Jim Meyering authored
      * src/make-prime-list.c: Include <config.h>.
      (binvert): Add _GL_ATTRIBUTE_CONST.
      cf67e4cc
    • Torbjörn Granlund's avatar
      factor: prepare for the new factor program · 1fb5db95
      Torbjörn Granlund authored
      * src/make-prime-list.c: New file, from nt-factor.
      Co-authored-by: default avatarNiels Möller <nisse@lysator.liu.se>
      1fb5db95
  10. 03 Oct, 2012 1 commit
    • Jim Meyering's avatar
      build: remove redundant dependency: $(PROGRAMS): lib/libcoreutils.a · 852930e8
      Jim Meyering authored
      * src/local.mk: Remove the above dependency.
      A soon-to-be-added new program, make-prime-list, must not depend
      on that, since it is used to create a BUILT_SOURCES file.
      That dependency is already handled via the ..._LD_ADD variables,
      and so that redundant dependency has so far been harmless.
      852930e8
  11. 30 Sep, 2012 1 commit
  12. 29 Sep, 2012 1 commit
  13. 28 Sep, 2012 3 commits
    • Jim Meyering's avatar
      doc: correct an old bit of ugliness in nice --help output · 0d4efc37
      Jim Meyering authored
      * src/nice.c (usage): s/Nicenesses/Niceness values/
      0d4efc37
    • Pádraig Brady's avatar
      doc: disambiguate the niceness explanation in nice --help · b212af43
      Pádraig Brady authored
      * src/nice.c (usage): Specify the entity (process) that
      that relative terms are referring to.
      * THANKS: Update.
      Reported-by: David Diggles
      b212af43
    • Ondrej Oprala's avatar
      cp: fix the --no-preserve=mode option · 24ebca61
      Ondrej Oprala authored
      The --no-preserve=mode option did not do what its name implies:
      it would mistakenly preserve permission mode bits.
      * NEWS: Mention the fix.
      * TODO: Remove an entry.
      * src/copy.c (copy_reg): Add a condition to properly
      handle the --no-preserve=mode option for files
      (copy_internal): Add a condition to properly handle the
      --no-preserve=mode option for directories.
      * src/copy.h (struct cp_options): Add a new boolean.
      * src/cp.c (cp_option_init,decode_preserve_arg): Set the
      new boolean value according to specified options.
      * src/install.c (struct cp_options): Initialize the new boolean.
      * src/mv.c (struct cp_options): Initialize the new boolean.
      * tests/cp/preserve-mode.sh: Add a new test.
      * tests/cp/link-preserve.sh (-a --no-preserve=mode): Adjust the
      expected perms: now, --no-preserve=mode overrides the --preserve=mode
      that is inherent in -a, as it should.
      * tests/local.mk: Add the new test to the list.
      24ebca61
  14. 24 Sep, 2012 2 commits
    • Pádraig Brady's avatar
      timeout: handle signals more transparently · 64be8b40
      Pádraig Brady authored
      This was originally attempted in commit v8.12-117-g5a647a05,
      but reverted before release because of the unreliability
      of disabling core dumps using setrlimit() on Linux kernels.
      This new version instead uses prctl() where available to
      more reliably disable core dumps for the timeout process.
      
      * m4/jm-macros.m4: Define HAVE_SETRLIMIT and HAVE_PRCTL.
      * src/timeout.c (disable_core_dumps): A new function
      that disables coredumps using prctl or setrlimit if available.
      (main): If the child exited with a signal and we can
      disable core dumps, then raise that signal to the timeout
      process itself, so that callers may also see the signal status.
      Also print a message indicating when the monitored command
      dumped core, as that information is lost in the signal
      propagation through timeout.
      64be8b40
    • Pozsár Balázs's avatar
      dd: new option, status=none to suppress output statistics · 7331ab55
      Pozsár Balázs authored
      * src/dd.c (STATUS_NONE): A new bitmask combining all STATUS_
      options, thus used to suppress all informational output.
      (struct symbol_value statuses): Expose the "none" option,
      corresponding to the STATUS_NONE bitmask above.
      (print_stats): Return early if STATUS_NONE is specified.
      Also move the call to gethrxtime() down so that it's only
      called when needed.
      (usage): Describe the new options.
      * doc/coreutils.texi (dd invocation): Likewise.
      * NEWS: Mention the new feature.
      * tests/dd/misc.sh: Ensure the new option works.
      7331ab55
  15. 23 Sep, 2012 1 commit
    • Jim Meyering's avatar
      tail,stat: improve support for vmhgfs · 2dad87f6
      Jim Meyering authored
      Teach tail -f that it must use polling on vmhgfs file systems, and
      let stat -f --format=%T report the file system type name, "vmhgfs".
      * src/stat.c (human_fstype): Add a case: vmhgfs, 0xbacbacbc, remote.
      * NEWS (Improvements): Mention it.
      * THANKS.in: Update.
      Reported by Daniel Tschinder in http://bugs.gnu.org/12461.
      2dad87f6
  16. 20 Sep, 2012 1 commit
    • Jim Meyering's avatar
      build: move non-recursive-gnulib-prefix-hack to gnulib; update · 958bef88
      Jim Meyering authored
      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.
      958bef88
  17. 19 Sep, 2012 2 commits
    • Jim Meyering's avatar
      rm: be even more careful when using a replacement errno value · ba034fc4
      Jim Meyering authored
      * src/remove.c (excise): The change in commit v8.19-107-gccbd3f3b made
      the "rm -rf D" (for unreadable dir, D) diagnostic worse on Solaris 10:
        -rm: cannot remove 'D': Permission denied
        +rm: cannot remove 'D': File exists
      That happened because unlinkat would fail with EEXIST there, given
      an unreadable directory, which made the two tests, tests/rm/unread2
      and tests/rm/unreadable fail.  Accommodate the EEXIST case, too.
      ba034fc4
    • Jim Meyering's avatar
      maint: fix a comment typo · 0bb0c2c0
      Jim Meyering authored
      * cfg.mk: Fix comment typo: s/recursive/non-recursive/ make
      0bb0c2c0
  18. 18 Sep, 2012 4 commits
  19. 16 Sep, 2012 1 commit
    • Pádraig Brady's avatar
      ls: fix coloring of dangling symlinks in default listing mode · a04ddb8d
      Pádraig Brady authored
      When listing a directory containing dangling symlinks,
      and not outputting a long format listing, and orphaned links
      are set to no coloring in LS_COLORS, then the symlinks
      would get no color rather than reverting to the standard
      symlink color.  The issue was introduced in v8.13-19-g84457c49
      
      * src/ls.c (print_color_indicator): Use the standard method
      to check if coloring is specified for orphaned symlinks.
      The existing method would consider 'or=00' or 'or=0' as significant
      in LS_COLORS. Even 'or=' was significant as in that case the
      string='or=' and the length=0.  Also apply the same change
      for missing symlinks for consistency.
      (gobble_file): Remove the simulation of linkok, which is only
      tested in print_color_indicator() which now handles this directly
      by keying on the LS_COLORS values correctly.
      * tests/misc/ls-misc.pl: Add a test case.
      * THANKS: Add the reporter.
      * NEWS: Mention the fix.
      Reported-by: David Matei
      a04ddb8d