summaryrefslogtreecommitdiff
path: root/gl
AgeCommit message (Collapse)Author
2009-11-24tests: fix link failure on cygwinEric Blake
Counterpart to commit 8fe40b84bd8, since test-link.c uses rename, and we override gnulib with a rename() replacement that can xalloc_die. * gl/modules/link-tests.diff: New file.
2009-11-20maint: move xfreopen module to gnulibJim Meyering
* gl/lib/xfreopen.c: Remove file. * gl/lib/xfreopen.h: Likewise. * gl/modules/xfreopen: Likewise.
2009-11-17maint: remove local gnulib-related patchesJim Meyering
* gl/lib/printf-args.c.diff: Remove file. No longer needed. * gl/lib/vasnprintf.c.diff: Likewise.
2009-11-13build: update gnulib, for getgroups improvementsEric Blake
A replacement getgroups is now guaranteed to exist, but it may fail with ENOSYS. mgetgroups is moved to gnulib, and now takes gid_t instead of GETGROUPS_T (but setgroups still needs GETGROUPS_T). * gnulib: Update to latest. * gl/modules/mgetgroups: Delete, moved to gnulib. * gl/m4/mgetgroups.m4: Likewise. * gl/lib/mgetgroups.h: Likewise. * gl/lib/mgetgroups.c: Likewise. * src/group-list.c (print_group_list): Adjust callers. * src/id.c (print_full_info): Likewise.
2009-11-07build: consistently use freopen-saferEric Blake
cat, head, ptx, shuf, tac, tail, tee, tr, and uniq used freopen on stdout, and were potentially vulnerable. dircolors, du, and tsort only used it on stdin, which is unaffected by freopen_safer, but this covers all uses for consistency. * cfg.mk (sc_require_stdio_safer): New rule. * gl/modules/xfreopen (Depends-on): Add freopen-safer. * gl/lib/xfreopen.c (includes): Use stdio--.h. * src/ptx.c (includes): Likewise. * src/shuf.c (includes): Likewise. * src/uniq.c (includes): Likewise. * src/dircolors.c (includes): Likewise. * src/du.c (includes): Likewise. * src/tsort.c (includes): Likewise.
2009-11-05build: reflect gnulib changes to tempnameEric Blake
In glibc 2.11 and gnulib, gen_tempname added a parameter suffixlen (unfortunately, it is typed as int rather than size_t, for historical compatibility to a poor choice by BSD). * gnulib: Import latest changes. * gl/lib/tempname.h.diff: Accommodate new suffixlen parameter. * gl/lib/tempname.c.diff (check_x_suffix): Allow for X in suffix beyond x_suffix_len. (gen_tempname_len): Add suffixlen parameter. (__gen_tempname): Update caller. * src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers.
2009-11-05build: override gnulib tempname via diffEric Blake
Diffs are more robust than wholesale replacement, because bootstrap will inform us of any incompatible changes made in upstream gnulib. * gl/lib/tempname.h: Change... * gl/lib/tempname.h.diff: ...to diff. * gl/lib/tempname.c: Change... * gl/lib/tempname.c.diff: ...to diff.
2009-11-02build: avoid some warningsEric Blake
* gl/lib/mbsalign.c (mbsalign): Mark unused parameter. * bootstrap.conf (gnulib_modules): Remove obsolete rename-dest-slash. * gnulib-tests/Makefile.am (AM_CFLAGS): Reduce set of warnings for gnulib tests. * gl/modules/rename-tests.diff (Makefile.am): New file, to add LIBINTL to LDADD, since we avoid canonicalize-lgpl module. * gl/lib/regcomp.c.diff (regerror, calc_next) (build_collating_symbol, parse_bracket_element, build_equiv_class) (free_tree): Mark unused parameters. * gl/lib/regex_internal.h.diff (re_string_elem_size_at): New file, to mark unused parameters. * gl/lib/printf-args.c.diff (PRINTF_FETCHARGS): New file, to avoid type mismatch. * gl/lib/vasnprintf.c (VASNPRINTF): New file, to avoid shadowing local variable name. * .gitignore: Ignore temporary build artifacts.
2009-10-29remove stray closing comment delimiter, "*/", in previous changeJim Meyering
* gl/lib/regexec.c.diff: Fix a typo.
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-19mktemp: adapt to new, 3-argument gen_tempname_lenJim Meyering
* src/mktemp.c (mkstemp_len, mkdtemp_len): Update callers of gen_tempname_len. * gl/lib/tempname.c, gl/lib/tempname.h: Rebase against recently API-modified copy of tempname module in gnulib. Reported by Lluís Batlle.
2009-09-01maint: mbsalign.c: remove unnecessary assignmentJim Meyering
* gl/lib/mbsalign.c (mbsalign): Remove assignment, the result of which is never used.
2009-08-25maint: remove Local Variables: indent-tabs-mode: nil from all sourcesJim Meyering
* src/getlimits.c: Likewise. * src/group-list.c: Likewise. * src/groups.c: Likewise. * src/mktemp.c: Likewise. * src/setuidgid.c: Likewise. * src/stdbuf.c: Likewise. * src/timeout.c: Likewise. * src/truncate.c: Likewise. * gl/lib/mbsalign.c: Likewise. * tests/test-lib.sh: Likewise. * bootstrap: Likewise. * README-hacking: Likewise.
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-08-06maint: move selinux-at module from gl/ to gnulibJim Meyering
* gl/lib/selinux-at.c: Remove file. * gl/lib/selinux-at.h: Likewise. * gl/modules/selinux-at: Likewise. * gnulib: update to latest, to get the new module.
2009-07-04move argv-iter module to gnulibJim Meyering
* gl/lib/argv-iter.c: Remove file. * gl/lib/argv-iter.h: Remove file. * gl/modules/argv-iter: Remove file. * gl/modules/argv-iter-tests: Remove file. * gl/tests/test-argv-iter.c: Remove file. * gnulib: Update submodule, to get argv-iter
2009-06-23maint: update all Copyright year lists to include 2009Jim Meyering
2009-04-09id: fix infinite loop on some systemsPádraig Brady
Steven Parkes reported that `id -G $USER` went into an infinite loop on Darwin systems for users in more than 10 groups: http://bugs.gentoo.org/show_bug.cgi?id=264007 * gl/lib/mgetgroups.c (mgetgroups): Work around buggy getgrouplist implementations that don't update the required size correctly, by doubling the result buffer and retrying. Also return the parameter updated by getgrouplist rather than its return value, as the documentation doesn't actually state the number of groups stored is returned by getgrouplist. * tests/misc/id-groups: Add test to exercise this logic * tests/Makefile.am: Reference new test * NEWS: Mention the fix * THANKS: Update
2009-04-07maint: remove compiler warnings from randint and randread modulesPádraig Brady
* gl/lib/randint.c: Remove unused MAX macro * gl/lib/randread.c (randread_error): Add __attribute__((__noreturn__))
2009-04-07shred,sort,shuf: don't use /dev/urandom by defaultPádraig Brady
Suggestion from Steven Schveighoffer at: http://savannah.gnu.org/patch/?6797 to greatly speed up the random passes done by shred. * gl/lib/randread.c: Default to using the internal pseudorandom generator, rather than reading /dev/urandom * src/shred.c (usage): remove mention of /dev/urandom * src/shuf.c (usage); ditto * src/sort.c (usage): ditto * doc/coreutils.text: Document the new behaviour for aquiring random data.
2009-04-03ls: fix alignment when month names have varying widthsPádraig Brady
Reported by Samuel Thibault and Stéphane Raimbault, as the glibc fr_FR locale has recently changed to use the official but variable width abbreviated month names. Other glibc locales also have variable widths. http://sourceware.org/ml/libc-locales/2008-q1/msg00035.html http://sourceware.org/bugzilla/show_bug.cgi?id=9859 * NEWS: Mention the fix * gl/lib/mbsalign.c: A new module to align and truncate a string in a specified number of screen cells, while handling multi-byte characters appropriately. * gl/lib/mbsalign.h: Ditto * gl/modules/mbsalign: Ditto * bootstrap.conf: Reference the new module * src/ls.c (abmon_init): New function, precompute the abbreviated months aligned left in a minimum width column <= 5 screen cells. (align_nstrftime): New function, replace the first %b in the format specification to strftime with the precomputed month string. Note using the cached month strings speeds up `ls -lU` by around 17% on glibc-2.7-2 on linux at least. Also if we implement this function using heap storage rather than automatic storage, and use snprintf instead of strcpy, ls will slow down by 2% and 1% respectively (i.e. a net gain of 14% rather than 17%). * tests/ls/abmon-align: A new test to test ls alignment for various formats and locales * tests/Makefile.am: Reference the new test
2009-03-27tests: test-argv-iter.c: avoid declaration-after-stmtJim Meyering
* gl/tests/test-argv-iter.c: Move declaration "up", so as not to ruffle feathers of crufty compilers. We accommodate such compilers here solely because this module may migrate to gnulib. Tiny patch by Matthew Woehlke.
2009-03-15maint: remove unused include and definitionsJim Meyering
* gl/lib/randread.c (__attribute__): Remove unused definition. (ATTRIBUTE_UNUSED): Likewise. * gl/lib/selinux-at.c (_): Remove unused definition. Don't include <gettext.h>. No longer needed.
2009-02-26argv-iter: avoid variadic macroEric Blake
* gl/lib/argv-iter.h (_ATTRIBUTE_NONNULL_): Don't assume C99 variadic macros are portable yet; needed for at least IRIX/MIPSpro. * THANKS: Update. Reported by Stuart Shelton.
2009-01-16simplify mgetgroups() and avoid -Wsign-compare warningsPádraig Brady
* gl/lib/mgetgroups.c: Avoid -Wsign-compare warning by using unsigned types for the parameters of the new function realloc_groupbuf(). mgetgroups() was refactored to use this function rather than explicitly allocating and copying from automatic storage itself. * src/group-list.c: Use int rather than size_t as variable is used in signed comparisons. * src/id.c: ditto.
2009-01-01improve M4 quotingJim Meyering
* configure.ac: Add quotes. * gl/m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise. * m4/boottime.m4 (GNULIB_BOOT_TIME): Likewise. * m4/check-decl.m4 (gl_CHECK_DECLS): Likewise. * m4/gmp.m4 (cu_GMP): Likewise. * m4/jm-macros.m4 (coreutils_MACROS, gl_CHECK_ALL_HEADERS): Likewise. (gl_CHECK_ALL_TYPES): Likewise. * m4/lib-check.m4 (cu_LIB_CHECK): Likewise. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Likewise. FYI, I first ran this command: git ls-files | grep -E '\.(m4|ac)$' | xargs perl -pi \ -e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_[A-Z_]+\(\[[^,]+?\], )([^,[()]+?)([,)])/$1\[$2]$3/g;' \ -e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g' Then I updated serial numbers and copyright dates manually. Also, I manually added two pairs of quotes in boottime.m4.
2008-12-01argv-iter: add testsJim Meyering
* gl/modules/argv-iter-tests: New module. * gl/tests/test-argv-iter.c: New file.
2008-12-01argv-iter: new moduleJim Meyering
* gl/lib/argv-iter.h: New file. * gl/lib/argv-iter.c: New file. * gl/modules/argv-iter: New file. With a suggestion for improved memory management by Pádraig Brady.
2008-11-10xfreopen: new moduleJim Meyering
* gl/lib/xfreopen.c: New file. * gl/lib/xfreopen.h: New file. * gl/modules/xfreopen: New file.
2008-10-22clean up gl/modules/selinux-atJim Meyering
* gl/modules/selinux-at: Ensure that LIB_SELINUX is cleared, in case it's set in the environment. m4-quote the first two args to AC_SEARCH_LIBS. Don't violate autoconf's ac_ namespace: s/ac_save/gl_save/ Drop the useless double quotes around a simple assignment RHS.
2008-10-21move selinux-h module from gl/ to gnulibJim Meyering
* gl/lib/se-context.in.h: Remove file. * gl/lib/se-selinux.in.h: Likewise. * gl/m4/selinux-context-h.m4: Likewise. * gl/m4/selinux-selinux-h.m4: Likewise. * gl/modules/selinux-h: Likewise.
2008-10-21prepare to move selinux-h module to gnulibJim Meyering
* gl/modules/selinux-h (Makefile.am) [selinux/selinux.h, selinux/context.h]: Remove temporary file and target, in case they're read-only. Use $(MKDIR_P), not mkdir -p. (License): Relax to LGPLv2+. Remove vestigial comments.
2008-10-19accommodate gnulib header removalsJim Meyering
* src/copy.c: Don't include "euidaccess.h" or "lchmod.h". * src/cp.c: Don't include "lchmod.h". * src/ls.c: Don't include "dirfd.h". * src/mkdir.c: Don't include "lchmod.h". * src/pwd.c: Don't include "dirfd.h". * src/remove.c: Don't include "dirfd.h" or "euidaccess.h". * src/test.c: Don't include "euidaccess.h". * gl/modules/getloadavg.diff: Adjust diff for changed context. * src/uptime.c (uptime): Remove declaration.
2008-06-03remove duplicate definition of matchpathcon_init_prefixJim Meyering
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Remove definition. It is already defined there. Reported by Eric Blake.
2008-06-02accommodate older SELinux which lacks matchpathcon_init_prefixJim Meyering
* m4/jm-macros.m4: Check for matchpathcon_init_prefix. * src/install.c [!HAVE_MATCHPATHCON_INIT_PREFIX] (matchpathcon_init_prefix): Define away. * gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define. Reported by Ilya N. Golubev in <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13686>.
2008-05-19use gnulib's base64 module, now that it's sync'd to match this oneJim Meyering
* gl/lib/base64.c: Remove file. * gl/lib/base64.h: Remove file.
2008-05-11move sha256 and sha512 modules to gnulibJim Meyering
* bootstrap.conf (gnulib_modules) [sha256, sha512]: Add "crypto/" prefix to module name, now that they come from gnulib. * gl/lib/sha256.c: Remove file. * gl/lib/sha256.h: Likewise. * gl/lib/sha512.c: Likewise. * gl/lib/sha512.h: Likewise. * gl/lib/u64.h: Likewise. * gl/m4/sha256.m4: Likewise. * gl/m4/sha512.m4: Likewise. * gl/modules/sha256: Likewise. * gl/modules/sha512: Likewise.
2008-05-05base64 module: adjust API so it's compatible with gnulib'sBo Borgerson
* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in, treat newlines as garbage (this is the historical behavior). Formerly base64_decode. (base64_decode_alloc_ctx): Formerly base64_decode_alloc. * gl/lib/base64.h (base64_decode): Macro for four-argument calls. (base64_decode_alloc): Likewise. * src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-03-16sha512_process_bytes: fix a bug in processing a buffer where length&64 != 0J. Scott Edwards
* gl/lib/sha512.c (sha512_process_bytes): s/63/127/.
2008-03-03Define SHA*_DIGEST_SIZE symbols.Simon Josefsson
* gl/lib/sha256.h (SHA224_DIGEST_SIZE, SHA256_DIGEST_SIZE): Define. * gl/lib/sha512.h (SHA384_DIGEST_SIZE, SHA512_DIGEST_SIZE): Define.
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-03-01Don't depend on gnulib's deprecated "free" module.Jim Meyering
* bootstrap.conf (obsolete_gnulib_modules): Remove free. * gl/modules/mgetgroups (Depends-on): Remove free.
2008-02-24* gl/lib/mgetgroups.c (mgetgroups): Parenthesize correctly.Jim Meyering
2008-02-24* gl/lib/mgetgroups.c: Include <stdlib.h>.Jim Meyering
2008-02-22id: avoid race when a group is added between getgrouplist callsJim Meyering
* gl/lib/mgetgroups.c (mgetgroups) [N_GROUPS_INIT]: Rename enum. Use a larger value. Update *groups only upon success. Iterate upon failed getgrouplist.
2008-02-21id: use getgrouplist when possibleJames Youngman
* gl/m4/mgetgroups.m4: Check for getgrouplist. * gl/lib/mgetgroups.c (mgetgroups): Use getgrouplist, if available. * TODO: Remove the item about switching to getgrouplist. * NEWS: mention this
2008-01-17Do not define-away __attribute__ when __STRICT_ANSI__ is set.Jim Meyering
* src/system.h (__attribute__): Remove the __STRICT_ANSI__ disjunct. It has been unnecessary since approximately gcc-2.6, and now, leaving it would cause gcc -Werror -ansi to fail to compile csplit.c. * gl/lib/randread.c (__attribute__): Likewise.
2007-11-28* gl/modules/randread (Depends-on): Remove nonexistent rand-isaac.Paul Eggert
2007-11-10install+SELinux: reduce a 12x performance hit to ~1.5xJim Meyering
* src/install.c (setdefaultfilecon): Call matchpathcon_init_prefix, to mitigate what would otherwise be a large performance hit due to the use of matchpathcon. Dan Walsh suggested the use of matchpathcon_init_prefix. * gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define. Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-28Define ENOTSUP, not ENOSYS. Needed on OpenBSD 3.9.Jim Meyering
* gl/lib/se-context.in.h (ENOTSUP): Define if missing. * gl/lib/se-selinux.in.h: Likewise.