]> Savannah Git Hosting - gnulib.git/log
gnulib.git
6 years agobootstrap: die when some submodules are not initialized
Akim Demaille [Mon, 31 Dec 2018 18:20:46 +0000 (19:20 +0100)]
bootstrap: die when some submodules are not initialized

* build-aux/bootstrap: Make sure all submodules are initialized.

6 years agoautoupdate
Karl Berry [Fri, 4 Jan 2019 16:09:17 +0000 (08:09 -0800)]
autoupdate

6 years agobitsetv: Fix module dependencies.
Bruno Haible [Fri, 4 Jan 2019 11:56:22 +0000 (12:56 +0100)]
bitsetv: Fix module dependencies.

* lib/bitsetv.c: Include xalloc.h.
* modules/bitsetv (Depends-on): Add 'xalloc'.

6 years agoxmemdup0: Remove redundant code.
Bruno Haible [Fri, 4 Jan 2019 11:32:14 +0000 (12:32 +0100)]
xmemdup0: Remove redundant code.

* lib/xmemdup0.h (xalloc_die): Remove declaration.

6 years agobackupfile: Fix module dependencies.
Bruno Haible [Fri, 4 Jan 2019 11:26:44 +0000 (12:26 +0100)]
backupfile: Fix module dependencies.

* modules/backupfile (Depends-on): Add 'xalloc'.

6 years agobitset, crypto/gc: fix conflicts with Solaris 11
Paul Eggert [Fri, 4 Jan 2019 06:36:21 +0000 (22:36 -0800)]
bitset, crypto/gc: fix conflicts with Solaris 11

* lib/bitset.h (_GL_BITSET_H): Rename from _BITSET_H, to
avoid clash with Solaris 11 <sys/bitset.h>.
* lib/gc.h (_GL_GC_H): Rename from GC_H, to avoid clash
with Solaris 11 <xorg/gc.h>.

6 years agosafe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.
Bruno Haible [Fri, 4 Jan 2019 05:22:00 +0000 (06:22 +0100)]
safe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.

Reported by Andy Fiddaman <andy@omniosce.org>.

* lib/sys-limits.h: Add a '_GL' prefix to the guard symbol.

6 years agoautoupdate
Karl Berry [Thu, 3 Jan 2019 17:47:26 +0000 (09:47 -0800)]
autoupdate

6 years agomaintainer-makefile: fix typo in previous patch
Eric Blake [Thu, 3 Jan 2019 15:19:27 +0000 (09:19 -0600)]
maintainer-makefile: fix typo in previous patch

* top/maint.mk (_sc_search_regexp): Fix my accidental corruption
of Roman's work.

Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agomaint.mk: Replace grep with $(GREP)
Roman Bolshakov [Wed, 2 Jan 2019 20:08:00 +0000 (14:08 -0600)]
maint.mk: Replace grep with $(GREP)

A project that uses maint.mk can specify regular expressions that are
not supported in system grep. Autoconf can discover an alias for GNU
grep and set it in GREP but it takes no effect for maint.mk

The patch provides an ability to use GNU grep if it was discovered by
autoconf and by calling GNU grep we don't get the messages in syntax-check:
  prohibit_diagnostic_without_format
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20181213153453.38123-3-r.bolshakov@yadro.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agomaint.mk: Split long argument lists
Roman Bolshakov [Thu, 13 Dec 2018 15:34:52 +0000 (18:34 +0300)]
maint.mk: Split long argument lists

$(VC_LIST_EXCEPT) is usually expanded into arguments for a command.
When a project contains too many, some operating systems can't pass all
the arguments because they hit the limit of arguments. FreeBSD and macOS
are known to have the exec limit of 256k memory used by arguments.

More on the issue:
http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg00019.html
https://www.redhat.com/archives/libvir-list/2015-August/msg00758.html

xargs without flags can be used to limit number of arguments, coupled
with use of the shell's built-in echo which is not subject to the exec
limits.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20181213153453.38123-2-r.bolshakov@yadro.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agoautoupdate
Paul Eggert [Tue, 1 Jan 2019 02:07:08 +0000 (18:07 -0800)]
autoupdate

6 years agomaint: Run 'make update-copyright'
Paul Eggert [Mon, 31 Dec 2018 23:25:11 +0000 (00:25 +0100)]
maint: Run 'make update-copyright'

6 years agoautoupdate
Paul Eggert [Mon, 31 Dec 2018 23:19:26 +0000 (15:19 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Mon, 31 Dec 2018 17:12:05 +0000 (09:12 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Sat, 29 Dec 2018 17:21:41 +0000 (09:21 -0800)]
autoupdate

6 years ago* lib/mknodat.c: Remove incorrect comments.
Paul Eggert [Fri, 28 Dec 2018 06:24:14 +0000 (22:24 -0800)]
* lib/mknodat.c: Remove incorrect comments.

6 years agomkfifo: bring back HAVE_MKFIFO macro
Paul Eggert [Fri, 28 Dec 2018 06:22:41 +0000 (22:22 -0800)]
mkfifo: bring back HAVE_MKFIFO macro

* m4/mkfifo.m4 (gl_FUNC_MKFIFO): #define HAVE_MKFIFO as needed.
Problem reported by Andrew Janke in:
https://lists.gnu.org/r/bug-gnulib/2018-12/msg00147.html

6 years agoautoupdate
Paul Eggert [Thu, 27 Dec 2018 19:20:42 +0000 (11:20 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Fri, 21 Dec 2018 16:37:23 +0000 (08:37 -0800)]
autoupdate

6 years agoAssume Autoconf >= 2.63.
Bruno Haible [Fri, 21 Dec 2018 08:34:05 +0000 (09:34 +0100)]
Assume Autoconf >= 2.63.

* modules/stdarg (configure.ac-early): Remove comment about Autoconf
versions < 2.60.

6 years agomemcmp: Mention the clang bug.
Bruno Haible [Fri, 21 Dec 2018 08:25:57 +0000 (09:25 +0100)]
memcmp: Mention the clang bug.

* tests/test-memcmp.c: Add comment about a known test failure.
* doc/posix-functions/memcmp.texi: Mention the clang bug.

6 years agorevert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7
Jim Meyering [Fri, 21 Dec 2018 03:51:48 +0000 (19:51 -0800)]
revert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7

v0.1-2213-gae4b73e28 caused a regression in grep-3.2 (no match):
  echo '123-x'|LC_ALL=C grep -E '.\bx'
The goal is to revert the first, but reverting it requires to restore
the function deleted in the second. I ran this to restore the deleted
function:
  git show v0.1-2281-g95cd86dd7 lib/dfa.c \
    | perl -0777 -pe 's/^@@[^\n]*dfaan.*//ms' \
    | patch -R -p1
* lib/dfa.c (charclass_context): Restore deleted function.
Reverting the primary commit removes this change:
dfa: Simplify a building state
* lib/dfa.c (build_state): Simplify a building state.

6 years agoversion-etc: allow zero authors
Paul Eggert [Fri, 21 Dec 2018 00:10:29 +0000 (16:10 -0800)]
version-etc: allow zero authors

* lib/version-etc.c (version_etc_arn): If no authors are given,
omit authorship info instead of dumping core.
No need to include stdlib.h now.

6 years agolchown tests: Be more permissive regarding errno values.
Bruno Haible [Thu, 20 Dec 2018 02:11:34 +0000 (03:11 +0100)]
lchown tests: Be more permissive regarding errno values.

Reported by Ivan Zakharyaschev <imz@altlinux.org>.

* tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
alternative to ENOSYS.
* modules/lchown-tests (Depends-on): Add 'errno'.
* modules/fchownat-tests (Depends-on): Likewise.

6 years agoduplocale: Avoid test failure on AIX 7.
Bruno Haible [Tue, 18 Dec 2018 08:59:41 +0000 (09:59 +0100)]
duplocale: Avoid test failure on AIX 7.

* modules/duplocale-tests (Files): Add m4/intl-thread-locale.m4.
(configure.ac): Invoke gt_FUNC_USELOCALE.
* tests/test-duplocale.c: Test HAVE_WORKING_USELOCALE instead of
HAVE_USELOCALE. Assume that nl_langinfo_l only works when uselocale
works.

6 years agolocalename: Fix test failure on AIX 7.
Bruno Haible [Tue, 18 Dec 2018 08:49:42 +0000 (09:49 +0100)]
localename: Fix test failure on AIX 7.

Reported by Assaf Gordon in
<https://lists.gnu.org/archive/html/sed-devel/2018-12/msg00019.html>.

* m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): New macro.
(gt_INTL_THREAD_LOCALE_NAME): Invoke it. Test gt_cv_func_uselocale_works
instead of ac_cv_func_uselocale.
* lib/localename.c: Test HAVE_WORKING_USELOCALE instead of
HAVE_USELOCALE.
* lib/localename-table.h: Likewise.
* lib/localename-table.c: Likewise.
* tests/test-localename.c: Likewise.
* doc/posix-functions/uselocale.texi: Mention the AIX problem.

6 years agolocalename: Update comments regarding Cygwin.
Bruno Haible [Tue, 18 Dec 2018 07:53:49 +0000 (08:53 +0100)]
localename: Update comments regarding Cygwin.

* lib/localename.c: Update comment.
* doc/posix-functions/uselocale.texi: Update platforms list.
* doc/posix-functions/newlocale.texi: Likewise.
* doc/posix-functions/duplocale.texi: Likewise.
* doc/posix-functions/freelocale.texi: Likewise.

6 years agoc-stack: Fix for Linux/sparc.
Bruno Haible [Sun, 16 Dec 2018 22:18:36 +0000 (23:18 +0100)]
c-stack: Fix for Linux/sparc.

* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Set
ac_cv_sys_xsi_stack_overflow_heuristic to 'no' on Linux/sparc.

6 years agolocalename: Avoid test failure on some glibc systems.
Bruno Haible [Sun, 16 Dec 2018 20:31:15 +0000 (21:31 +0100)]
localename: Avoid test failure on some glibc systems.

* tests/test-localename.c (test_locale_name, test_locale_name_posix):
Unset environment variables that might disturb the first setlocale call,
and verify that this setlocale call succeeds.

6 years agoautoupdate
Paul Eggert [Sun, 16 Dec 2018 15:33:54 +0000 (07:33 -0800)]
autoupdate

6 years agorandom: Fix build error on native Windows (regression from 2018-06-21).
Assaf Gordon [Sun, 16 Dec 2018 15:24:28 +0000 (16:24 +0100)]
random: Fix build error on native Windows (regression from 2018-06-21).

* lib/random.c (__srandom, __initstate, __setstate, __random,
__srandom_r, __initstate_r, __setstate_r, __random_r) [!_LIBC]: Redirect
to the symbols without '__' prefix.

6 years agoautoupdate
Bruno Haible [Sun, 16 Dec 2018 14:58:18 +0000 (15:58 +0100)]
autoupdate

6 years agoobstack, libc-config: Support HP-UX cc in C99 mode.
Bruno Haible [Sun, 16 Dec 2018 09:46:13 +0000 (10:46 +0100)]
obstack, libc-config: Support HP-UX cc in C99 mode.

* lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER): Treat HP-UX cc as a pre-C99
compiler, even when in C99 mode.
* lib/cdefs.h (__flexarr): Likewise.
* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update comment.

6 years agolocalename: Fix test failure on OpenBSD >= 6.2.
Bruno Haible [Sun, 16 Dec 2018 06:11:44 +0000 (07:11 +0100)]
localename: Fix test failure on OpenBSD >= 6.2.

* m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Test for fake
locale system. Define HAVE_FAKE_LOCALES in this case.
* lib/localename.c (HAVE_GOOD_USELOCALE): New macro. Use it instead of
HAVE_USELOCALE.
* tests/test-localename.c (HAVE_GOOD_USELOCALE): New macro. Use it
instead of HAVE_NEWLOCALE && HAVE_USELOCALE.
* doc/posix-functions/uselocale.texi: Mention OpenBSD problem. Update
platforms list.
* doc/posix-functions/newlocale.texi: Likewise.
* doc/posix-functions/duplocale.texi: Update platforms list.
* doc/posix-functions/freelocale.texi: Likewise.

6 years agoduplocale tests: Re-enable the test on platforms without <monetary.h>.
Bruno Haible [Sun, 16 Dec 2018 05:45:51 +0000 (06:45 +0100)]
duplocale tests: Re-enable the test on platforms without <monetary.h>.

* tests/test-duplocale.c: Use more fine-grained #ifs to re-enable most
of the test, on platforms without <monetary.h>.

6 years agolocalename: Update comments.
Bruno Haible [Sun, 16 Dec 2018 04:40:53 +0000 (05:40 +0100)]
localename: Update comments.

* lib/localename.c (HAVE_USELOCALE): Update list of platforms.

6 years agoregex: fix indentation
Jim Meyering [Sun, 16 Dec 2018 00:40:00 +0000 (16:40 -0800)]
regex: fix indentation

* m4/regex.m4 (gl_REGEX): Indent with spaces, not TABs.

6 years agoopenat-safer tests: Avoid test failure on NetBSD 8. Part 2.
Bruno Haible [Sat, 15 Dec 2018 23:48:58 +0000 (00:48 +0100)]
openat-safer tests: Avoid test failure on NetBSD 8. Part 2.

6 years agoopenat-safer tests: Avoid test failure on NetBSD 8.
Bruno Haible [Sat, 15 Dec 2018 23:34:25 +0000 (00:34 +0100)]
openat-safer tests: Avoid test failure on NetBSD 8.

* tests/test-openat-safer.c (main): Execute a Linux specific test only
on Linux.

6 years agoregex: work around a bug in glibc-2.27 and prior
Jim Meyering [Sat, 15 Dec 2018 23:24:21 +0000 (15:24 -0800)]
regex: work around a bug in glibc-2.27 and prior

* m4/regex.m4 (gl_REGEX): Reject any system regexp that gets a failed
assertion for /0|()0|\1|0/.
* tests/test-regex.c (main): Add the same test here.

6 years agolocalename: Fix use of uninitialized shell variable.
Bruno Haible [Sat, 15 Dec 2018 22:27:49 +0000 (23:27 +0100)]
localename: Fix use of uninitialized shell variable.

* m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Initialize
gt_cv_locale_solaris114 always before use. Remove assignment without
effect.

6 years agodfa tests: Avoid test failure on Alpine Linux.
Bruno Haible [Sat, 15 Dec 2018 21:01:27 +0000 (22:01 +0100)]
dfa tests: Avoid test failure on Alpine Linux.

* tests/dfa-match.sh (timeout_10): Accommodate the BusyBox 'timeout'
command found on Alpine Linux.

6 years agodfa: avoid new warnings from gcc
Jim Meyering [Sat, 15 Dec 2018 18:09:35 +0000 (10:09 -0800)]
dfa: avoid new warnings from gcc

These would prevent building with -Werror and a Dec snapshot of gcc.
* lib/dfa.c (dfaanalyze): Avoid shadowing warnings for "pos".
Rename each inner instance to "p".
(charclass_context): Remove unused static function.

6 years agomkdir-p: improve diagnostic for FUSE mounts
Paul Eggert [Sat, 15 Dec 2018 00:25:13 +0000 (16:25 -0800)]
mkdir-p: improve diagnostic for FUSE mounts

Problem reported by Niklas Hambüchen in:
https://lists.gnu.org/r/bug-gnulib/2018-12/msg00074.html
* lib/mkdir-p.c (make_dir_parents): In diagnostic, prefer stat
errno to mkdir errno if the stat errno is likely more interesting.

6 years agohash-map: Add tests.
Bruno Haible [Fri, 14 Dec 2018 22:08:10 +0000 (23:08 +0100)]
hash-map: Add tests.

* tests/test-hash_map.c: New file.
* modules/hash-map-tests: New file.

6 years agolinkedhash-map: Add tests.
Bruno Haible [Fri, 14 Dec 2018 22:08:06 +0000 (23:08 +0100)]
linkedhash-map: Add tests.

* tests/test-linkedhash_map.c: New file.
* modules/linkedhash-map-tests: New file.

6 years agoarray-map: Add tests.
Bruno Haible [Fri, 14 Dec 2018 22:08:02 +0000 (23:08 +0100)]
array-map: Add tests.

* tests/test-array_map.c: New file.
* modules/array-map-tests: New file.

6 years agoxmap: New module.
Bruno Haible [Fri, 14 Dec 2018 22:07:58 +0000 (23:07 +0100)]
xmap: New module.

* lib/gl_xmap.h: New file.
* lib/gl_xmap.c: New file.
* modules/xmap: New file.

6 years agohash-map: New module.
Bruno Haible [Fri, 14 Dec 2018 22:07:53 +0000 (23:07 +0100)]
hash-map: New module.

* lib/gl_hash_map.h: New file.
* lib/gl_hash_map.c: New file.
* modules/hash-map: New file.

6 years agolinkedhash-map: New module.
Bruno Haible [Fri, 14 Dec 2018 22:07:49 +0000 (23:07 +0100)]
linkedhash-map: New module.

* lib/gl_linkedhash_map.h: New file.
* lib/gl_linkedhash_map.c: New file.
* lib/gl_anyhash1.h: Update comments.
* lib/gl_anyhash2.h: Likewise.
* modules/linkedhash-map: New file.

6 years agoarray-map: New module.
Bruno Haible [Fri, 14 Dec 2018 22:07:43 +0000 (23:07 +0100)]
array-map: New module.

* lib/gl_array_map.h: New file.
* lib/gl_array_map.c: New file.
* modules/array-map: New file.

6 years agomap: New module.
Bruno Haible [Fri, 14 Dec 2018 22:07:39 +0000 (23:07 +0100)]
map: New module.

* lib/gl_map.h: New file.
* lib/gl_map.c: New file.
* lib/gl_omap.h (gl_mapkey_dispose_fn, gl_mapvalue_dispose_fn): Avoid
conflict with gl_map.h.
* modules/map: New file.

6 years agoselect tests: Avoid test failure on Cygwin.
Bruno Haible [Thu, 13 Dec 2018 21:17:50 +0000 (22:17 +0100)]
select tests: Avoid test failure on Cygwin.

* tests/test-select.h (test_bad_fd): Use an fd < FD_SETSIZE.

6 years agolocaltime-buffer: Avoid endless recursion in localtime and gmtime.
Bruno Haible [Thu, 13 Dec 2018 11:00:22 +0000 (12:00 +0100)]
localtime-buffer: Avoid endless recursion in localtime and gmtime.

* lib/localtime-buffer.c: Undefine localtime and gmtime before use.

6 years agolocaleconv tests: Avoid test failure on Cygwin.
Bruno Haible [Thu, 13 Dec 2018 10:28:32 +0000 (11:28 +0100)]
localeconv tests: Avoid test failure on Cygwin.

* tests/test-localeconv.c (main): On Cygwin, skip the 'grouping' and
'mon_grouping' tests.

6 years agoomap: Don't dispose the old value when the function returns it.
Bruno Haible [Wed, 12 Dec 2018 00:14:34 +0000 (01:14 +0100)]
omap: Don't dispose the old value when the function returns it.

* lib/gl_array_omap.c (gl_array_remove_at): Don't invoke the vdispose_fn
here.
* lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
* lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
* lib/gl_omap.h (gl_omap_nx_put, gl_omap_remove): Invoke the vdispose_fn
here.

6 years agoarray-omap, avltree-omap, rbtree-omap: Tweak style.
Bruno Haible [Wed, 12 Dec 2018 00:03:13 +0000 (01:03 +0100)]
array-omap, avltree-omap, rbtree-omap: Tweak style.

* lib/gl_anytree_omap.h (gl_tree_nx_getput): Return 1 or 0, not true or
false.
* lib/gl_array_omap.c (gl_array_nx_getput): Likewise.

6 years agorbtree-omap: Add tests.
Bruno Haible [Tue, 11 Dec 2018 19:56:37 +0000 (20:56 +0100)]
rbtree-omap: Add tests.

* tests/test-rbtree_omap.c: New file.
* modules/rbtree-omap-tests: New file.

6 years agoavltree-omap: Add tests.
Bruno Haible [Tue, 11 Dec 2018 19:56:35 +0000 (20:56 +0100)]
avltree-omap: Add tests.

* tests/test-avltree_omap.c: New file.
* modules/avltree-omap-tests: New file.

6 years agoarray-omap: Add tests.
Bruno Haible [Tue, 11 Dec 2018 19:56:33 +0000 (20:56 +0100)]
array-omap: Add tests.

* tests/test-array_omap.c: New file.
* modules/array-omap-tests: New file.

6 years agoxomap: New module.
Bruno Haible [Tue, 11 Dec 2018 19:56:30 +0000 (20:56 +0100)]
xomap: New module.

* lib/gl_xomap.h: New file.
* lib/gl_xomap.c: New file.
* modules/xomap: New file.

6 years agorbtree-omap: New module.
Bruno Haible [Tue, 11 Dec 2018 19:56:27 +0000 (20:56 +0100)]
rbtree-omap: New module.

* lib/gl_rbtree_omap.h: New file.
* lib/gl_rbtree_omap.c: New file.
* lib/gl_rbtree_ordered.h: Code moved to here from lib/gl_rbtree_oset.c.
Parameterize.
* lib/gl_rbtree_oset.c: Include gl_rbtree_ordered.h.
* modules/rbtree-omap: New file.
* modules/rbtree-oset (Files): Add lib/gl_rbtree_ordered.h.
(Makefile.am): Add gl_rbtree_ordered.h to lib_SOURCES.

6 years agoavltree-omap: New module.
Bruno Haible [Tue, 11 Dec 2018 19:56:25 +0000 (20:56 +0100)]
avltree-omap: New module.

* lib/gl_avltree_omap.h: New file.
* lib/gl_avltree_omap.c: New file.
* lib/gl_avltree_ordered.h: Code moved to here from
lib/gl_avltree_oset.c. Parameterize.
* lib/gl_avltree_oset.c: Include gl_avltree_ordered.h.
* lib/gl_anytree_omap.h: New file.
* modules/avltree-omap: New file.
* modules/avltree-oset (Files): Add lib/gl_avltree_ordered.h.
(Makefile.am): Add gl_avltree_ordered.h to lib_SOURCES.

6 years agoarray-omap: New module.
Bruno Haible [Tue, 11 Dec 2018 19:56:22 +0000 (20:56 +0100)]
array-omap: New module.

* lib/gl_array_omap.h: New file.
* lib/gl_array_omap.c: New file.
* modules/array-omap: New file.

6 years agoomap: New module.
Bruno Haible [Tue, 11 Dec 2018 19:56:20 +0000 (20:56 +0100)]
omap: New module.

* lib/gl_omap.h: New file.
* lib/gl_omap.c: New file.
* modules/omap: New file.

6 years agohash-set, linkedhash-set: Reduce code duplication.
Bruno Haible [Tue, 11 Dec 2018 19:44:55 +0000 (20:44 +0100)]
hash-set, linkedhash-set: Reduce code duplication.

* lib/gl_anyhash1.h: Rename from lib/gl_anyhash_list1.h and
lib/gl_anyhash_set1.h.
* lib/gl_anyhash2.h: Rename from lib/gl_anyhash_list2.h and
lib/gl_anyhash_set2.h. Parameterize.
(hash_resize_after_add): New function, from lib/gl_anyhash_set2.h.
* lib/gl_anytreehash_list1.h (hash_resize_after_add): Remove function.
* lib/gl_avltreehash_list.c: Include gl_anyhash1.h instead of
gl_anyhash_list1.h. Include gl_anyhash2.h instead of gl_anyhash_list2.h.
* lib/gl_rbtreehash_list.c: Likewise.
* lib/gl_linkedhash_list.c: Likewise.
(hash_resize_after_add): Remove function.
* lib/gl_linkedhash_set.c: Include gl_anyhash1.h instead of
gl_anyhash_set1.h. Include gl_anyhash2.h instead of gl_anyhash_set2.h.
* gl_hash_set.c: Likewise.
* modules/avltreehash-list (Files, Makefile.am): Update file list.
* modules/rbtreehash-list (Files, Makefile.am): Likewise.
* modules/linkedhash-list (Files, Makefile.am): Likewise.
* modules/linkedhash-set (Files, Makefile.am): Likewise.
* modules/hash-set (Files, Makefile.am): Likewise.

6 years agoarray-set: Optimize.
Bruno Haible [Tue, 11 Dec 2018 19:43:22 +0000 (20:43 +0100)]
array-set: Optimize.

* lib/gl_array_set.c (gl_array_search, gl_array_remove): Test equals_fn
outside the loop, not inside the loop.

6 years agotimes: Fix tests.
Bruno Haible [Tue, 11 Dec 2018 19:21:52 +0000 (20:21 +0100)]
times: Fix tests.

* tests/test-times.c (doublecmp): Implement a total order.

6 years agoarray-set, linkedhash-set, hash-set: Fix tests.
Bruno Haible [Tue, 11 Dec 2018 19:36:35 +0000 (20:36 +0100)]
array-set, linkedhash-set, hash-set: Fix tests.

* tests/test-array_set.c (cmp_objects_in_array): New function.
(check_equals): Use it.
* tests/test-hash_set.c: Likewise.
* tests/test-linkedhash_set.c: Likewise.

6 years agoFix comments.
Bruno Haible [Sat, 8 Dec 2018 14:25:51 +0000 (15:25 +0100)]
Fix comments.

* lib/gl_list.h (gl_list_free): Clarify what it does.
* lib/gl_oset.h (gl_oset_free): Likewise.
* lib/gl_set.h (gl_set_free): Likewise.
* lib/gl_anytree_oset.h (gl_tree_search_atleast): Fix typo in comment.
* lib/gl_array_oset.c (gl_array_search_atleast): Likewise.
* lib/gl_anyavltree_list1.h (MAXHEIGHT): Likewise.
* lib/gl_avltree_oset.c (MAXHEIGHT): Likewise.

6 years agohash-set: Add tests.
Bruno Haible [Mon, 3 Dec 2018 23:57:58 +0000 (00:57 +0100)]
hash-set: Add tests.

* tests/test-hash_set.c: New file.
* modules/hash-set-tests: New file.

6 years agolinkedhash-set: Add tests.
Bruno Haible [Mon, 3 Dec 2018 23:57:19 +0000 (00:57 +0100)]
linkedhash-set: Add tests.

* tests/test-linkedhash_set.c: New file.
* modules/linkedhash-set-tests: New file.

6 years agoarray-set: Add tests.
Bruno Haible [Mon, 3 Dec 2018 23:56:31 +0000 (00:56 +0100)]
array-set: Add tests.

* tests/test-array_set.c: New file.
* modules/array-set-tests: New file.

6 years agoxset: New module.
Bruno Haible [Mon, 3 Dec 2018 23:55:34 +0000 (00:55 +0100)]
xset: New module.

* lib/gl_xset.h: New file.
* lib/gl_xset.c: New file.
* modules/xset: New file.

6 years agohash-set: New module.
Bruno Haible [Mon, 3 Dec 2018 23:54:30 +0000 (00:54 +0100)]
hash-set: New module.

* lib/gl_hash_set.h: New file.
* lib/gl_hash_set.c: New file.
* modules/hash-set: New file.

6 years agolinkedhash-set: New module.
Bruno Haible [Mon, 3 Dec 2018 23:53:12 +0000 (00:53 +0100)]
linkedhash-set: New module.

* lib/gl_linkedhash_set.h: New file.
* lib/gl_linkedhash_set.c: New file.
* lib/gl_anyhash_set1.h: New file, based on lib/gl_anyhash_list1.h.
* lib/gl_anyhash_set2.h: New file, based on lib/gl_anyhash_list2.h.
* lib/gl_anyhash_primes.h: New file, extracted from
lib/gl_anyhash_list2.h.
* lib/gl_anyhash_list2.h: Include it.
(primes, next_prime): Remove definitions.
* modules/linkedhash-set: New file.
* modules/avltreehash-list (Files): Add lib/gl_anyhash_primes.h.
(Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
* modules/linkedhash-list (Files): Add lib/gl_anyhash_primes.h.
(Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
* modules/rbtreehash-list (Files): Add lib/gl_anyhash_primes.h.
(Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.

6 years agoarray-set: New module.
Bruno Haible [Mon, 3 Dec 2018 23:43:22 +0000 (00:43 +0100)]
array-set: New module.

* lib/gl_array_set.h: New file.
* lib/gl_array_set.c: New file.
* modules/array-set: New file.

6 years agoset: New module.
Bruno Haible [Mon, 3 Dec 2018 23:41:24 +0000 (00:41 +0100)]
set: New module.

* lib/gl_set.h: New file.
* lib/gl_set.c: New file.
* lib/gl_oset.h (gl_setelement_dispose_fn): Avoid conflict with
gl_set.h.
* modules/set: New file.

6 years agobison: don't force the Yacc mode
Akim Demaille [Fri, 7 Dec 2018 05:26:08 +0000 (06:26 +0100)]
bison: don't force the Yacc mode

Passing -y forces Bison into POSIX YACC mode.  This includes reporting
errors when Bison features are used in the grammar file.  Some of
these features (such as %expect) were flagged non-yacc recently.  Most
of the time, -y is actually used to please Automake's ylwrap which
expects the output to be y.tab.c.

* m4/bison.m4 (gl_BISON): Use `-o y.tab.c` rather than `-y`.

6 years agoautoupdate
Karl Berry [Fri, 7 Dec 2018 16:10:15 +0000 (08:10 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Thu, 6 Dec 2018 16:29:09 +0000 (08:29 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Tue, 4 Dec 2018 16:22:59 +0000 (08:22 -0800)]
autoupdate

6 years agognupload: Document short options.
Bruno Haible [Sat, 1 Dec 2018 15:28:17 +0000 (16:28 +0100)]
gnupload: Document short options.

* build-aux/gnupload (usage): Document the short options.

6 years agognupload: Support option -h as alias of --help.
Ben Elliston [Wed, 28 Nov 2018 07:00:51 +0000 (18:00 +1100)]
gnupload: Support option -h as alias of --help.

The first time I ran gnupload, I used -h and got an error. ;-) This
patch adds -h as an alias for --help.

* build-aux/gnupload: Support -h.

6 years agomemrchr: port better to clang
Paul Eggert [Sat, 1 Dec 2018 00:25:38 +0000 (16:25 -0800)]
memrchr: port better to clang

* lib/memrchr.c (__memrchr): Cast to void * instead of to
longword *, to pacify clang -Wcast-align (Bug#33544).

6 years agodocs: mention printf %m considerations
Eric Blake [Thu, 29 Nov 2018 19:33:28 +0000 (13:33 -0600)]
docs: mention printf %m considerations

gcc -Wformat does NOT flag printf("%m") on a BSD system, even though
it prints only "m" instead of the desired GNU/Linux behavior of the
current errno value (you have to use -Wpedantic to flag it, but that's
a rather heavy hammer).  Still, it's easy enough (even if verbose)
to write out strerror() usage directly, to the point that gnulib will
probably never provide a module to guarantee %m everywhere.
See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88270

* doc/glibc-functions/asprintf.texi (asprintf): Document that %m
is not portable, and is easy enough to work around.
* doc/glibc-functions/obstack_printf.texi (obstack_printf): Likewise.
* doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf): Likewise.
* doc/glibc-functions/vasprintf.texi (vasprintf): Likewise.
* doc/posix-functions/dprintf.texi (dprintf): Likewise.
* doc/posix-functions/fprintf.texi (fprintf): Likewise.
* doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
* doc/posix-functions/printf.texi (printf): Likewise.
* doc/posix-functions/snprintf.texi (snprintf): Likewise.
* doc/posix-functions/sprintf.texi (sprintf): Likewise.
* doc/posix-functions/swprintf.texi (swprintf): Likewise.
* doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
* doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
* doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
* doc/posix-functions/vprintf.texi (vprintf): Likewise.
* doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
* doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
* doc/posix-functions/vswprintf.texi (vswprintf): Likewise.
* doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
* doc/posix-functions/wprintf.texi (wprintf): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agoautoupdate
Karl Berry [Thu, 29 Nov 2018 16:26:00 +0000 (08:26 -0800)]
autoupdate

6 years agobitset: rename ebitset/expandable.* as tbitset/table.*
Akim Demaille [Thu, 29 Nov 2018 04:44:58 +0000 (05:44 +0100)]
bitset: rename ebitset/expandable.* as tbitset/table.*

See
https://lists.gnu.org/archive/html/bug-gnulib/2018-11/msg00096.html.

* lib/bitset/expandable.h, lib/bitset/expandable.c: Rename as...
* lib/bitset/table.h, lib/bitset/table.c: these.
Rename all the ebitset* symbols as tbitset*.
Adjust dependencies.

6 years agobitset: check the operations
Akim Demaille [Wed, 28 Nov 2018 04:56:21 +0000 (05:56 +0100)]
bitset: check the operations

* tests/test-bitset.c (bitset_random): New.
Use it.
* lib/bitset/expandable.c (ebitset_not): Fix typo.

6 years agobitset: properly use false/true instead of 0/1 for Booleans
Akim Demaille [Wed, 28 Nov 2018 20:55:00 +0000 (21:55 +0100)]
bitset: properly use false/true instead of 0/1 for Booleans

* lib/bitset/expandable.c, lib/bitset/vector.c: Use false/true, not
0/1, as Booleans.

6 years agobitset: rename BITSET_VARRAY as BITSET_VECTOR
Akim Demaille [Wed, 28 Nov 2018 06:24:29 +0000 (07:24 +0100)]
bitset: rename BITSET_VARRAY as BITSET_VECTOR

For consistency with the name of the file.

* doc/bitset.texi, lib/bitset.c, lib/bitset/base.h,
* lib/bitset/stats.c, lib/bitset/vector.c
(BITSET_VARRAY): Rename as...
(BITSET_VECTOR): this.

6 years agostrerror_r-posix: memmove, not memcpy
Paul Eggert [Thu, 29 Nov 2018 00:10:03 +0000 (16:10 -0800)]
strerror_r-posix: memmove, not memcpy

* lib/strerror_r.c (safe_copy): Use memmove, not memcpy,
since the source and destination might overlap in the call
‘safe_copy (buf, buflen, strerror_r (errnum, buf, buflen))’.
Simplify.

6 years agoautoupdate
Karl Berry [Tue, 27 Nov 2018 16:25:10 +0000 (08:25 -0800)]
autoupdate

6 years agobitsetv: new module
Akim Demaille [Sun, 25 Nov 2018 17:55:32 +0000 (18:55 +0100)]
bitsetv: new module

* lib/bitsetv.c, lib/bitsetv.h, modules/bitsetv: New.

6 years agobitset: add tests and doc
Akim Demaille [Sun, 25 Nov 2018 08:49:09 +0000 (09:49 +0100)]
bitset: add tests and doc

First stabs at providing a documentation and test for the bitset
module.

* doc/bitset.texi, modules/test-bitset, tests/bitset-tests.c: New.

6 years agobitset: new module
Akim Demaille [Sun, 28 Oct 2018 16:32:15 +0000 (17:32 +0100)]
bitset: new module

* lib/bitset.c, lib/bitset.h, lib/bitset/array.c,
* lib/bitset/array.h, lib/bitset/base.h, lib/bitset/expandable.c,
* lib/bitset/expandable.h, lib/bitset/list.c, lib/bitset/list.h,
* lib/bitset/stats.c, lib/bitset/stats.h, lib/bitset/vector.c,
* lib/bitset/vector.h, modules/bitset:
New.

6 years agolocalename: Fix gettext test failures on mingw.
Bruno Haible [Sat, 24 Nov 2018 01:02:30 +0000 (02:02 +0100)]
localename: Fix gettext test failures on mingw.

* lib/localename.c (gl_locale_name_posix): Convert the result of
gl_locale_name_environ to XPG syntax.

6 years agono more sync of gettext source files
Karl Berry [Fri, 23 Nov 2018 17:23:27 +0000 (09:23 -0800)]
no more sync of gettext source files

6 years agoautoupdate
Karl Berry [Fri, 23 Nov 2018 16:46:40 +0000 (08:46 -0800)]
autoupdate