summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2016-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2015-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * tests/sample-test: Adjust to use the single most recent year. * tests/du/bind-mount-dir-cycle-v2.sh: Fix case in copyright message, so that year is updated automatically in future.
2014-01-02maint: update all copyright year number rangesBernhard Voelker
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.
2013-01-01maint: update all copyright year number rangesJim Meyering
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.
2012-09-11build: build lib/ using non-recursive makeJim Meyering
* bootstrap.conf (gnulib_modules): Use the new module. (bootstrap_post_import_hook): Invoke prefix-gnulib-mk. * configure.ac (AC_CONFIG_FILES): Remove lib/Makefile. * lib/Makefile.am: Renamed... * lib/local.mk: ...to this. * src/local.mk (CLEANFILES): Append, don't set. (noinst_LIBRARIES): Likewise. (AM_CPPFLAGS): Don't set this here. * Makefile.am (AM_CPPFLAGS): Define here instead. (noinst_LIBRARIES, CLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES): Initialize here, so we can append to them from each included local.mk (SUBDIRS): Remove "lib".
2012-09-10maint: move the last coreutils-specific files from lib/ to gl/Jim Meyering
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.
2012-05-08maint: fix common spelling errorsKevin Lyda
These were identified using: https://github.com/lyda/misspell-check executed like: git ls-files | misspellings -f - * src/cat.c: Correct a spelling error. * src/comm.c: Likewise. * src/expr.c: Likewise. * src/pr.c: Likewise. * src/tac.c: Likewise. * src/test.c: Likewise. * src/ChangeLog-2005: Likewise. * src/ChangeLog-2007: Likewise. * src/NEWS: Likewise. * src/doc/coreutils.texi: Likewise. * src/lib/ChangeLog-2007: Likewise. * src/man/help2man: Likewise. * src/old/fileutils/ChangeLog-1997: Likewise. * src/old/fileutils/NEWS: Likewise. * src/old/sh-utils/ChangeLog.0: Likewise. * src/old/textutils/ChangeLog: Likewise. * src/tests/misc/comm: Likewise. * src/tests/misc/uniq: Likewise. * src/tests/mv/dir2dir: Likewise. * src/cfg.mk (old_NEWS_hash): update with `make update-NEWS-hash`
2012-01-27maint: use single copyright year rangeJim Meyering
Run "make update-copyright".
2012-01-09maint: straggler *.[ch] files: convert more `...' to '...'Jim Meyering
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/'
2012-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2011-11-24maint: bootstrap: run autopoint and libtoolize *before* gnulib-toolJim Meyering
* bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions. Run autopoint and libtoolize *before* gnulib-tool. After it, run an abbreviated autoreconf, rather than a loop around all tools. * bootstrap.conf (gnulib_tool_option_extras): Add both --symlink and --makefile-name=gnulib.mk. Remove stray use of $bt. * lib/Makefile.am: Initialize all of the following so that generated code in gnulib.mk may use += to append to those variables: AM_CFLAGS, AM_CPPFLAGS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST, MAINTAINERCLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES, SUFFIXES, noinst_LIBRARIES.
2011-10-09rm: do not resort to stat'ing very long names even on deficient systemsJim Meyering
This change affects only systems that have neither *at function support nor the /proc/self/fd support required to emulate those *at functions. * src/remove.c (write_protected_non_symlink): Call faccessat unconditionally. Thus we no longer need euidaccess_stat, which was the sole function used here to operate on a full relative file name. Remove full_name parameter and update caller. * lib/euidaccess-stat.h: Remove file. * lib/euidaccess-stat.c: Likewise. * m4/euidaccess-stat.m4: Likewise. * po/POTFILES.in: Remove lib/euidaccess-stat.c. * m4/prereq.m4 (gl_PREREQ): Don't require gl_EUIDACCESS_STAT. Prompted by a report from Bruno Haible that the rm/deep-2 test was failing on HP-UX 11.31. See http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1748
2011-07-02maint: use "const" and "pure" function attributes where possibleJim Meyering
* 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.
2011-07-02buffer_lcm: declare with _GL_ATTRIBUTE_CONSTJim Meyering
* lib/buffer-lcm.h (buffer_lcm): Use _GL_ATTRIBUTE_CONST. * lib/buffer-lcm.c: Include <config.h>.
2011-05-12maint: use <unistd.h>, not "group-member.h"Jim Meyering
gnulib's group-member module now ensures that the group_member function is declared in <unistd.h>, just like it is glibc. * lib/euidaccess-stat.c: Remove inclusion of "group-member.h". * src/chgrp.c: Likewise.
2011-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2010-08-04sort: -R now uses less memory on long lines with internal NULsPaul Eggert
* lib/Makefile.am (libcoreutils_a_SOURCES): Remove xmemxfrm.c, xmemxfrm.h. * lib/memxfrm.c, lib/memxfrm.h, lib/xmemxfrm.c, lib/xmemxfrm.h: Remove. * m4/memxfrm.m4: Likewise. * m4/prereq.m4 (gl_PREREQ): Remove gl_MEMXFRM. * po/POTFILES.in: Remove lib/xmemxfrm.c. * src/sort.c: Don't include xmemxfrm.h. (cmp_hashes): Remove. (xstrxfrm): New function. (compare_random): If a line contains NULs, don't create a big buffer that contains the strxfrm output of each string in the line. Instead, accumulate checksums and differences as we go, so that at any one time we have to store at most the output of a single strxfrm call when processing the line. This removes the need for an memxfrm function.
2010-01-01maint: update all FSF copyright year lists to include 2010Jim Meyering
Use this command: git ls-files | grep -v COPYING \ | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \ build-aux/update-copyright
2009-12-01rm: fix empty-name bug introduced with conversion to use ftsJim Meyering
While "rm ''" would properly fail, "rm F1 '' F2" would fail to remove F1 and F2, due to the empty string argument. This bug was introduced on 2009-07-12, via commit 4f73ecaf, "rm: rewrite to use fts". * gnulib: Update to latest, for fixed fts.c. * NEWS (Bug fixes): Describe it. * tests/rm/empty-name: Adjust for changed diagnostic. (mk_file): Define, copied from misc/ls-misc. (empty-name-2): New test, for today's fix. * lib/xfts.c (xfts_open): Reflect the change in fts_open, now that it no longer fails immediately when one argument is the empty string. Assert that the bit flags were not the cause of failure. * po/POTFILES.in: Remove xfts.c. * THANKS: Update. Reported by Ladislav Hagara.
2009-11-07chcon, chgrp, chmod and chown now diagnose a directory cycleJim Meyering
* lib/xfts.c (cycle_warning_required): New function. * lib/xfts.h: Declare it. * src/chown-core.c (change_file_owner): Diagnose a cycle. * src/chmod.c (process_file): Likewise. * src/chcon.c (process_file): Likewise. * NEWS (Bug fixes): Mention this.
2009-10-29maint: avoid exiting with magic numberEric Blake
Cope with gnulib's new sc_prohibit_magic_number_exit rule. * .x-sc_prohibit_magic_number_exit: New file, to add exemptions. * Makefile.am (syntax_check_exceptions): Distribute it. * lib/euidaccess-stat.c (main): Fix culprits. * src/chcon.c (main): Likewise. * src/runcon.c (main): Likewise. * src/setuidgid.c (main): Likewise.
2009-10-29build (--enable-gcc-warnings): enable gcc's -Werror also in lib/Jim Meyering
* configure.ac (GNULIB_WARN_CFLAGS): Define. * lib/Makefile.am (AM_CFLAGS): Use $(GNULIB_WARN_CFLAGS) rather than $(WARN_CFLAGS) and add $(WERROR_CFLAGS). * gl/lib/regcomp.c.diff: New file. * gl/lib/regex_internal.c.diff: New file. * gl/lib/regexec.c.diff: New file.
2009-09-11euidaccess-stat: remove unnecessary macrosEric Blake
* lib/euidaccess-stat.c (F_OK, R_OK, W_OK, X_OK): Delete; now guaranteed by gnulib.
2009-09-05maint: remove unused file: lib/fdopendir-glibc.cJim Meyering
* lib/fdopendir-glibc.c: Remove unused file. 2009-09-05 Jim Meyering <meyering@redhat.com>
2009-08-25global: convert indentation-TABs to spacesJim Meyering
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
2009-06-23maint: update all Copyright year lists to include 2009Jim Meyering
2009-06-23maint: remove old TODO filesJim Meyering
* lib/TODO: Remove file. * tests/join/TODO: Likewise.
2009-04-30stdopen: remove unused codeEric Blake
* m4/stdopen.m4: Delete now-unused file. * lib/stdopen.h: Likewise. * lib/stdopen.c: Likewise.
2009-04-04maint: clean up Makefile.am, rename remaining ChangeLog filesJim Meyering
* Makefile.am (changelog_etc, syntax_check_exceptions): Define. (EXTRA_DIST): Use. Remove names that are now automatically included: build-aux/git-version-gen, build-aux/vc-list-files. * build-aux/ChangeLog-2007: Rename from */ChangeLog. * doc/ChangeLog-2007: Likewise. * lib/ChangeLog-2007: Likewise. * m4/ChangeLog-2007: Likewise. * po/ChangeLog-2007: Likewise.
2009-03-07build: avoid "multiply defined..." warning from automakeJim Meyering
* Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS) via +=, not =, to avoid "multiply defined..." warning from automake.
2008-12-21build: add configure-time --enable-gcc-warnings option; avoid warningsJim Meyering
* bootstrap.conf (gnulib_modules): Add "warnings" module. * configure.ac: Add --enable-gcc-warnings, derived from code in bison. * src/Makefile.am (AM_CFLAGS): Set to $(WARN_CFLAGS) # $(WERROR_CFLAGS) * lib/Makefile.am (AM_CFLAGS): Change spelling to $(WARN_CFLAGS) Don't use $(WERROR_CFLAGS), yet. * src/system.h (usage): Declare. * src/base64.c (usage): Declare to be global, for consistency. * src/timeout.c (usage): Likewise. * src/truncate.c (usage): Likewise. * src/getlimits.c (usage): Likewise. * src/pinky.c (ttyname): Declare with prototype, rather than an empty argument list. * src/who.c (ttyname): Likewise. * src/su.c (crypt, getusershell, setusershell, endusershell): Likewise.
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-03-31dd bug fix: accept e.g., if=/dev/stdin and of=/dev/stdoutPaul Eggert
* lib/fd-reopen.c: Work even if FILE is "/dev/stdin". Problem reported by Geoffrey Lee in <http://bugs.debian.org/290727>. * tests/dd/misc: Check for this bug.
2008-03-02Create sha256 and sha512 modules and move files into gl/.Jim Meyering
* bootstrap.conf (gnulib_modules): Add sha256 and sha512. * m4/prereq.m4: Don't require gl_SHA256 or gl_SHA512. * gl/modules/sha512: New file. * gl/modules/sha256: New file. * m4/sha256.m4: Move to ... * gl/m4/sha256.m4: ...here, removing use of AC_SOURCES. * m4/sha512.m4: Move to ... * gl/m4/sha512.m4: ...here, removing use of AC_SOURCES. * lib/sha256.c, lib/sha256.h: Move to ... * gl/lib/sha256.c, gl/lib/sha256.h: ...here. * lib/sha512.c, lib/sha512.h: Move to ... * gl/lib/sha512.c, gl/lib/sha512.h: ...here. * lib/u64.h: Move to ... * gl/lib/u64.h: ...here.
2008-01-31Remove alignment constraint from the sha*_read_ctx functions.Jim Meyering
* lib/sha256.c (set_uint32): New function. (sha256_read_ctx, sha224_read_ctx): Use it. * lib/sha512.c (set_uint64): New function. (sha512_read_ctx, sha384_read_ctx): Use it. * lib/sha256.h: Remove warning about alignment constraint. * lib/sha512.h: Likewise. Prompted by similar changes in gnulib's sha1 and md[45] modules.
2007-10-07Convert coreutils' rand*.{c,h,m4} into modules.Jim Meyering
First step: move these files to gl/lib: * lib/rand-isaac.c, lib/rand-isaac.h * lib/randint.c, lib/randint.h * lib/randperm.c, lib/randperm.h * lib/randread.c, lib/randread.h Step 2: add modules/rand* and remove now-unneeded .m4 files. * gl/modules/randint: New file. * gl/modules/randperm: New file. * gl/modules/randread: New file. * m4/randint.m4: Remove file. * m4/randperm.m4: Remove file. * m4/randread.m4: Remove file. Step 3: use the new modules * bootstrap.conf (gnulib_modules): Add randint and randperm. * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require; These have been removed. (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
2007-10-04lib/search_.h: Remove unused file.Jim Meyering
2007-10-04Remove test program: lib/t-fpending.c.Jim Meyering
* lib/t-fpending.c: Remove file. Now, this test is in gnulib. * lib/Makefile.am: Remove associated rules. * .gitignore: Remove lib/t-fpending.
2007-09-08Accommodate gnulib's renaming: __fpending.h -> fpending.h.Jim Meyering
* lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
2007-08-24No longer version-control .???ignore files in lib/, m4/, and po/.Jim Meyering
* .gitignore: Ignore a few files in lib/, m4/, and po/ that are not picked up automatically. * lib/.gitignore, lib/.cvsignore: Remove files. * m4/.gitignore, m4/.cvsignore: Remove files. * po/.gitignore, po/.cvsignore: Remove files.
2007-08-20Avoid consuming too much seekable input when yesno is used.Eric Blake
* bootstrap.conf (gnulib_modules): Grab closein. * src/system.h (includes): Also include closein.h. * src/mv.c (main): Use close_stdin, not close_stdout. * src/cp.c (main): Likewise. * src/ln.c (main): Likewise. * src/rm.c (main): Likewise. * src/install.c (main): Likewise. * NEWS: Document the fix.
2007-08-18Use new "idcache.h" header.Jim Meyering
* src/ls.c: Remove ancient declarations of getuser and getgroup. Include "idcache.h", instead.
2007-08-11Accommodate more xstrtol changes.Paul Eggert
* src/df.c (long_options): Don't bother prepending "--" to long options that OPT_STR might decode, as that hack is no longer needed. (main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR. * src/du.c (long_options, main): Likewise. * src/ls.c (decode_switches): Likewise. * src/od.c (long_options, main): Likewise. * src/pr.c (first_last_page, main): Likewise. * src/sort.c (long_options, specify_sort_size): Likewise. * src/pr.c (first_last_page): Accept option index and option char instead of an assembled option string. All callers changed. * src/sort.c (specify_sort_size): Likewise. * src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT): Remove.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-07-08Remove .gdb-history.Jim Meyering
2007-07-08Add to .cvsignore and .gitignore files.Jim Meyering
2007-07-06setuidgid: set all groups, not just the primary one; mgetgroups: new moduleJim Meyering
I wanted to use the xgetgroups function from id.c, so factored it out and made it into a non-exiting function (hence the "m" prefix rather than "x"). * src/setuidgid.c (main): Use mgetgroups. Include "mgetgroups.h". * src/id.c (xgetgroups): Remove function. Include "mgetgroups.h". (print_group_list): Use mgetgroups, not xgetgroups. * gl/modules/mgetgroups: New module. * gl/lib/mgetgroups.c: New file. mgetgroups is derived from id.c's xgetgroups function. * bootstrap.conf (gnulib_modules): Add mgetgroups. * gl/m4/mgetgroups.m4: New file. * gl/lib/mgetgroups.h: New file.
2007-06-18Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.Jim Meyering
* bootstrap.conf (gnulib_modules): Add readlink-with-size. Remove xreadlink and xreadlink-with-size. * src/copy.c (copy_internal): Use mreadlink_with_size, not xreadlink_with_size. * src/ls.c (get_link_name): Likewise. * src/readlink.c (main): Likewise. * src/stat.c (print_stat): Likewise.