1. 01 Jan, 2016 1 commit
    • Paul Eggert's avatar
      version-etc: new year · 71090a2a
      Paul Eggert authored
      * build-aux/gendocs.sh (version):
      * doc/gendocs_template:
      * doc/gendocs_template_min:
      * doc/gnulib.texi:
      * lib/version-etc.c (COPYRIGHT_YEAR):
      Update copyright dates by hand in templates and the like.
      * all files: Run 'make update-copyright'.
      71090a2a
  2. 03 Apr, 2015 1 commit
  3. 01 Jan, 2015 1 commit
    • Paul Eggert's avatar
      version-etc: new year · b9bfe784
      Paul Eggert authored
      * doc/gnulib.texi:
      * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
      * all files: Run 'make update-copyright'.
      b9bfe784
  4. 01 Jan, 2014 1 commit
  5. 01 Jan, 2013 1 commit
  6. 06 Jan, 2012 1 commit
  7. 01 Jan, 2012 1 commit
  8. 30 Nov, 2011 1 commit
  9. 29 Nov, 2011 1 commit
  10. 28 Nov, 2011 1 commit
    • Jim Meyering's avatar
      mark functions with const and pure attributes · 9e62d63e
      Jim Meyering authored
      Mark functions per suggestions from gcc-4.6 when using these options:
      -Wsuggest-attribute=pure -Wsuggest-attribute=const.
      Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros.
      Follow these guidelines: when possible, apply the attribute to
      an extern declaration, not to its definition.  Apply it to the
      definition only when the definition is static.
      * lib/argmatch.h (argmatch, argmatch_to_argument): Mark.
      * lib/argv-iter.h (argv_iter_n_args): Likewise.
      * lib/base64.h (isbase64): Likewise.
      * lib/basename-lgpl.c (last_component, base_len): Likewise.
      * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise.
      (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise.
      (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise.
      (c_tolower, c_toupper): Likewise.
      * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise.
      * lib/chdir-long.c (find_non_slash): Likewise.
      * lib/dirname.h (base_len, dir_len, last_component): Likewise.
      * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise.
      * lib/file-type.h (file_type): Likewise.
      * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise.
      * lib/filevercmp.c (verrevcmp): Likewise.
      * lib/freadahead.h (freadahead): Likewise.
      * lib/fts.c (fts_maxarglen): Likewise.
      * lib/hash-pjw.h (hash_pjw): Likewise.
      * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str):
      * lib/hash.c (is_prime, next_prime): Likewise.
      * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise.
      (hash_get_n_entries, hash_get_max_bucket_length): Likewise.
      (hash_table_ok, hash_get_first, hash_string): Likewise.
      (compute_bucket_size): Likewise.
      * lib/i-ring.h (i_ring_empty): Likewise.
      * lib/isnan.c (isnanl): Likewise.
      * lib/math.h (isnanl, rpl_isnanl): Likewise.
      * lib/memcasecmp.h (memcasecmp): Likewise.
      * lib/memchr2.h (memchr2): Likewise.
      * lib/memcmp2.h (memcmp2): Likewise.
      * lib/parse-datetime.y (lookup_zone): Likewise.
      * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup)
      [!WINDOWS_SOCKETS]: Likewise.
      * lib/strnlen1.h (strnlen1): Likewise.
      * lib/uniwidth.in.h (uc_width): Likewise, but since this is installed
      as a public header by libunistring, it cannot depend on the macro
      definitions of gnulib-common.m4, so open-code the __attribute__...
      * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from
      gcc's -Wsuggest-attribute=pure for quoting_options_from_style.
      (quoting_options_from_style): Add a comment.
      * lib/propername.h (proper_name): Add a comment.
      9e62d63e
  11. 19 Nov, 2011 1 commit
  12. 18 Nov, 2011 1 commit
    • Jim Meyering's avatar
      hash: deprecate poorly-named hash_insert0: use hash_insert_if_absent · 2895f9dc
      Jim Meyering authored
      * lib/hash.c (hash_insert_if_absent): Rename from hash_insert0.
      Add a sentence to the comment.
      (hash_insert0): New function that simply calls hash_insert_if_absent.
      * lib/hash.h (hash_insert_if_absent): Declare it.
      (hash_insert0): Add deprecation attribute.
      (_GL_ATTRIBUTE_DEPRECATED): Define.
      * lib/di-set.c (di_set_insert): Use hash_insert_if_absent,
      not hash_insert0.
      * NEWS: Mention it, even though it's not really an incompatible change
      Prompted by a question from Matthew Booth <mbooth@redhat.com>.
      2895f9dc
  13. 28 Apr, 2011 1 commit
    • Eric Blake's avatar
      hash, mgetgroups: drop xalloc dependency · 83b1d641
      Eric Blake authored
      Rely on the new xalloc-oversized module to avoid requiring
      xalloc-die for functions documented as returning NULL on
      potential allocation overflow.
      
      * lib/hash.c (includes): Adjust includes.
      * lib/mgetgroups.c (includes): Likewise.
      (xgetgroups): Move...
      * lib/xgetgroups.c: ...to new file.
      * modules/xgetgroups: New file, split from...
      * modules/mgetgroups: ...here.
      (Depends-on): Add xalloc-oversized.
      * modules/hash (Depends-on): Likewise.
      * modules/hash-tests (Depends-on): Drop xalloc.
      (test_hash_LDADD): Drop unused library.
      * tests/test-hash.c (main): Break xalloc dependency.
      (includes): Drop unused include.
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      83b1d641
  14. 25 Apr, 2011 2 commits
  15. 01 Jan, 2011 1 commit
  16. 02 Sep, 2010 1 commit
  17. 31 Aug, 2010 2 commits
    • Eric Blake's avatar
      hash: factor, and guard against misbehaving hasher function · c0ebdfe2
      Eric Blake authored
      * lib/hash.c (safe_hasher): New function, to encapsulate the checking
      of table->hasher's return value.  Also protect against a hash value
      so large that adding it to table->bucket results in a NULL pointer.
      (hash_lookup, hash_get_next, hash_find_entry, transfer_entries):
      Use it in place of open-coded check-and-abort.
      c0ebdfe2
    • Bruno Haible's avatar
      hash: silence spurious clang warning · e8504907
      Bruno Haible authored
      * lib/hash.c (hash_get_next): Remove unnecessary test against NULL.
      Reported by Eric Blake.
      e8504907
  18. 04 Jul, 2010 1 commit
  19. 01 Jul, 2010 1 commit
    • Jim Meyering's avatar
      hash: extend module to deal with non-pointer keys · 5bef1a35
      Jim Meyering authored
      * lib/hash.c (hash_insert0): New interface, much like hash_insert
      but that allows insertion of non-pointer entries.
      Do not disallow an ENTRY value of NULL.
      (hash_insert): This is now just a thin wrapper.  Call hash_insert0.
      * lib/hash.h (hash_insert0): Declare.
      5bef1a35
  20. 01 Jan, 2010 1 commit
  21. 29 Dec, 2009 1 commit
    • Jim Meyering's avatar
      update nearly all FSF copyright year lists to include 2009 · 3030c5b5
      Jim Meyering authored
      The files named by the following are exempted:
      
          grep -v '^#' config/srclist.txt|grep -v '^$' \
            | while read src dst; do
                test -f "$dst" && { echo "$dst"; continue; }
                test -d "$dst" || continue
                echo "$dst"/$(basename "$src")
              done > exempt
          git ls-files tests/unictype >> exempt
      
      In the remaining files, convert to all-interval notation if
      - there is already at least one year interval like 2000-2003
      - the file is maintained by me
      - the file is in lib/uni*/, where that style already prevails
      Otherwise, use update-copyright's default.
      3030c5b5
  22. 10 Dec, 2009 1 commit
  23. 06 Oct, 2009 1 commit
  24. 19 Jun, 2009 5 commits
  25. 18 Jun, 2009 5 commits
    • Eric Blake's avatar
      hash: avoid no-op rehashing · 86514ea5
      Eric Blake authored
      * lib/hash.c (hash_rehash): Recognize useless rehash attempts.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      86514ea5
    • Eric Blake's avatar
      hash: provide default callback functions · af254bfe
      Eric Blake authored
      * lib/hash.c (raw_hasher, raw_comparator): New functions.
      (hash_initialize): Use them as defaults.
      * tests/test-hash.c (main): Test this.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      af254bfe
    • Eric Blake's avatar
      hash: minor optimization · 16908fc8
      Eric Blake authored
      * lib/hash.c (hash_lookup, hash_find_entry): Avoid function call
      when possible.
      (hash_initialize): Document this promise.
      (hash_do_for_each, hash_clear, hash_free): Use C89 syntax.
      * tests/test-hash.c (hash_compare_strings): Test this.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      16908fc8
    • Eric Blake's avatar
      hash: check for resize before insertion · 1d1b2627
      Eric Blake authored
      * lib/hash.c (hash_insert): Check whether bucket usage exceeds
      threshold before insertion, so that a pathological hash_rehash
      that fills every bucket can still trigger another rehash.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      1d1b2627
    • Eric Blake's avatar
      hash: minor cleanups · f414a500
      Eric Blake authored
      * lib/hash.h (hash_entry): Make opaque, by moving...
      * lib/hash.c (hash_entry): ...here.
      (hash_insert): Clarify restrictions on what can be inserted.
      (hash_get_next): Clarify when it is safe to remove an element
      during traversal.
      (check_tuning): Skip verification when tuning is known safe.
      (hash_initialize): Clarify restrictions on tuning.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      f414a500
  26. 07 Oct, 2007 1 commit
  27. 09 Sep, 2007 1 commit
  28. 13 Sep, 2006 1 commit
    • Paul Eggert's avatar
      * _fpending.c: Include <config.h> unconditionally, since we no · 0632e115
      Paul Eggert authored
      longer worry about uses that don't define HAVE_CONFIG_H.
      * acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c:
      * basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c:
      * canonicalize.c, chdir-long.c, chdir-safer.c, chown.c:
      * cloexec.c, close-stream.c, closeout.c, creat-safer.c:
      * cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c:
      * dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c:
      * exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c:
      * file-type.c, fileblocks.c, filemode.c, filenamecat.c:
      * fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c:
      * ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c:
      * getcwd.c, getdate.y, getdomainname.c, getgroups.c:
      * gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c:
      * getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c:
      * gettime.c, gettimeofday.c, getugroups.c, getusershell.c:
      * glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c:
      * human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c:
      * isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c:
      * malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c:
      * memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c:
      * mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c:
      * mountlist.c, nanosleep.c, obstack.c, open-safer.c:
      * openat-die.c, openat.c, pagealign_alloc.c, physmem.c:
      * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c:
      * quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c:
      * realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c:
      * same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c:
      * sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c:
      * stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c:
      * strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c:
      * timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c:
      * utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c:
      * xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c:
      * xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c:
      * xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c:
      Likewise.
      0632e115
  29. 19 Sep, 2005 1 commit
    • Paul Eggert's avatar
      Use a consistent style for including <config.h>. · 222b0486
      Paul Eggert authored
      * __fpending.c, acl.c, argmatch.c,
      argp-help.c, argp-parse.c,
      argp-pvh.c, backupfile.c, basename.c, c-stack.c,
      calloc.c, check-version.c, cloexec.c, closeout.c, copy-file.c,
      creat-safer.c, cycle-check.c, dirfd.c, dirname.c, dup-safer.c,
      dup2.c, euidaccess.c, exclude.c, exitfail.c, fatal-signal.c,
      fd-safer.c, file-type.c, fileblocks.c, filemode.c,
      filenamecat.c, findprog.c, fnmatch.c, fopen-safer.c, free.c,
      fsusage.c, ftruncate.c, full-write.c, fwriteerror.c,
      getaddrinfo.c, getcwd.c, getdelim.c, getline.c, getlogin_r.c,
      getndelim2.c, getnline.c, getopt1.c, getpass.c, group-member.c,
      hard-locale.c, hash-pjw.c, hash.c, human.c, idcache.c,
      inet_ntop.c, isdir.c, long-options.c, malloc.c, memcasecmp.c,
      memcmp.c, memcoll.c, memcpy.c, memmove.c, mkdir-p.c,
      modechange.c, mountlist.c, open-safer.c, physmem.c,
      pipe-safer.c, pipe.c, poll.c, posixver.c, progname.c,
      progreloc.c, putenv.c, quote.c, quotearg.c, readline.c,
      readlink.c, realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c,
      safe-read.c, same.c, save-cwd.c, savedir.c, sig2str.c,
      strcspn.c, strerror.c, stripslash.c, strncasecmp.c, strndup.c,
      strnlen.c, strnlen1.c, strsep.c, strstr.c, strtod.c,
      strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c,
      userspec.c, utimecmp.c, version-etc-fsf.c,
      version-etc.c, wait-process.c, xalloc-die.c, xgetcwd.c,
      xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xsetenv.c,
      xstrndup.c, xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c:
      Standardize inclusion of config.h.
      * __fpending.h, dirfd.h, getdate.h, human.h,
      inttostr.h:  Removed inclusion of config.h from header files.
      * inttostr.c:  Adjusted in-tree users.
      * timespec.h: Remove superfluous warning to include config.h.
      * atexit.c, chdir-long.c chown.c, fchown-stub.c, getgroups.c,
      gettimeofday.c, lchown.c, lstat.c, mkdir.c, mkstemp.c,
      nanosleep.c, openat.c, raise.c, readtokens0.c, readutmp.c,
      unlinkdir.c: Guard inclusion of config.h with HAVE_CONFIG_H.
      222b0486
  30. 14 May, 2005 1 commit