]> Savannah Git Hosting - gnulib.git/log
gnulib.git
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

6 years agoautoupdate
Karl Berry [Wed, 21 Nov 2018 18:11:57 +0000 (10:11 -0800)]
autoupdate

6 years agomktime: add libc-config dependency
Paul Eggert [Wed, 21 Nov 2018 17:12:33 +0000 (09:12 -0800)]
mktime: add libc-config dependency

I missed this when we synced from glibc.
* modules/mktime (Depends-on): Add libc-config.

6 years agoautoupdate
Paul Eggert [Fri, 16 Nov 2018 16:13:39 +0000 (08:13 -0800)]
autoupdate

6 years agolonglong: fix comment typo
Paul Eggert [Tue, 13 Nov 2018 19:04:58 +0000 (11:04 -0800)]
longlong: fix comment typo

* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Fix typo.

6 years agohavelib: Remove the need to include asm-underscore.m4.
Bruno Haible [Sun, 11 Nov 2018 11:45:44 +0000 (12:45 +0100)]
havelib: Remove the need to include asm-underscore.m4.

* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): New macro.
* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use it instead of
gl_HOST_CPU_C_ABI.
* modules/havelib (Files): Add host-cpu-c-abi.m4.
(Depends-on): Remove host-cpu-c-abi.

6 years agoparse-datetime: simplify test for mktime failure
Paul Eggert [Sun, 4 Nov 2018 06:31:33 +0000 (23:31 -0700)]
parse-datetime: simplify test for mktime failure

* lib/parse-datetime.y (mktime_ok): Simplify.
Remove args TZ and T; no longer needed.  Callers changed.

6 years agoposixtm: simplify test for mktime failure
Paul Eggert [Sun, 4 Nov 2018 06:04:44 +0000 (23:04 -0700)]
posixtm: simplify test for mktime failure

* lib/posixtm.c (posixtime): Simplify.

6 years agonstrftime: simplify test for mktime failure
Paul Eggert [Sun, 4 Nov 2018 04:51:33 +0000 (21:51 -0700)]
nstrftime: simplify test for mktime failure

* lib/nstrftime.c (__strftime_internal): Simplify.

6 years agognulib-common.m4: port _Noreturn to C++
Paul Eggert [Fri, 2 Nov 2018 21:09:35 +0000 (14:09 -0700)]
gnulib-common.m4: port _Noreturn to C++

Problem reported by Akim Demaille in:
https://lists.gnu.org/r/bug-bison/2018-10/msg00067.html
* m4/gnulib-common.m4 (gl_COMMON_BODY): If C++, use [[noreturn]].
Merge adjustments from _Noreturn.h and from glibc into the non-C++
version.
* lib/_Noreturn.h: Match gnulib-common.

6 years agognu-make: Fix for NetBSD 8 'make'.
Bruno Haible [Tue, 30 Oct 2018 11:56:42 +0000 (12:56 +0100)]
gnu-make: Fix for NetBSD 8 'make'.

Reported by Reuben Thomas in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00135.html>.

* m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version
output, ignoring exit codes.

6 years agomaintainer-makefile: fix syntax-check rule for "same.h"
Bernhard Voelker [Sun, 28 Oct 2018 12:06:30 +0000 (13:06 +0100)]
maintainer-makefile: fix syntax-check rule for "same.h"

* top/maint.mk (sc_prohibit_same_without_use): Adjust regex to check
for 'same_nameat', too.

6 years agodfa: Simplify a building state
Norihiro Tanaka [Mon, 22 Oct 2018 15:02:16 +0000 (00:02 +0900)]
dfa: Simplify a building state

dfa.c (build_state): Simplify a building state.

6 years agodfa: reorder tokens before execution
Norihiro Tanaka [Mon, 22 Oct 2018 15:01:08 +0000 (00:01 +0900)]
dfa: reorder tokens before execution

Reorder tokens before execution.  It improves efficiency to access
memory in building states. For example, A(BCD|E(F|G)|HI) are reorderda
as following.

(Before reorder)
A:1 - B:2 - C:3 - D:4
    ` E:5 - F:6
          ` G:7
    ` H:8 - I:9

(After reorder)
A:1 - B:2 - C:5 - D:6
    ` E:3 - F:7
          ` G:8
    ` H:4 - I:9

dfa.c (compare, reorder_tokens): New function.
(reorder_tokens): Call them.

6 years agodfa: a state has a set of current positions.
Norihiro Tanaka [Mon, 22 Oct 2018 14:51:20 +0000 (23:51 +0900)]
dfa: a state has a set of current positions.

Up to now, a state had a set of follow-on positions.  It is replaced a
set of current positions.  This change will save memory space.

dfa.c (leaf_set): Remove it.
(struct dfa): Add new member constraints and separates.
(append): New function.
(state_index): Bring constraint from pre-calculated.
(state_separate_contexts): Bring separate contexts from pre-calculated.
Change argument, update callers.
(merge_nfa_state): Pre-calculate constraints for END. and remove END.
No longer END is not used after here.
(dfaoptimize): Initialize added member constraints.
(dfaanalyze): Pre-calculate seprate contexts.
(build_state): Change for this update.
(dfassbuild): Initialize new members .
(dfafree): Free memory for new members.

6 years agodfa: simplify dfa optimization
Norihiro Tanaka [Mon, 22 Oct 2018 14:35:50 +0000 (23:35 +0900)]
dfa: simplify dfa optimization

dfa.c (merge_nfa_state, dfaoptimize): Simplify dfa optimization.

6 years agodfa: position set sorts increasing order
Norihiro Tanaka [Mon, 22 Oct 2018 14:31:26 +0000 (23:31 +0900)]
dfa: position set sorts increasing order

Change the order of position set from decreasing to increaing, then even
after dfa is optimized, it is guaranteed that the number of a position
is smaller than the subsequent one's number.

dfa.c (insert, merged_constrained, delete): Reverse the direction of an
inequality sign.
(dfaanalyze): Position set sorts increasing order.

6 years agodfa: remove unneeded code
Norihiro Tanaka [Mon, 22 Oct 2018 14:22:40 +0000 (23:22 +0900)]
dfa: remove unneeded code

By the addition of beg, a code for the initial state is unnecessary, so
remove it.

dfa.c (epsclosure): Remove a code for the initial state.
(dfaanalyze): Print follows for BEG in debug mode.

6 years agoautoupdate
Karl Berry [Fri, 26 Oct 2018 16:46:25 +0000 (09:46 -0700)]
autoupdate

6 years agohavelib: fix nested ‘configure’ chatter
Paul Eggert [Thu, 25 Oct 2018 15:33:59 +0000 (08:33 -0700)]
havelib: fix nested ‘configure’ chatter

* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest
AC_CACHE_CHECK calls, which resulted in confusing output like
“checking for the common suffixes of directories in the library
search path... checking for 64-bit host... no lib,lib”.

6 years agobackupfile: tweak for better code
Paul Eggert [Thu, 25 Oct 2018 15:25:41 +0000 (08:25 -0700)]
backupfile: tweak for better code

* lib/backupfile.c: Sort include directives, and remove
unnecessary <limits.h> include.
(FALLTHROUGH): New macro, copied from other modules.
(backupfile_internal): Use it to avoid code duplication.
This lets GCC 8.2.1 generate better code by inlining the
call to check_extension.

6 years agoautoupdate
Karl Berry [Wed, 24 Oct 2018 14:26:20 +0000 (07:26 -0700)]
autoupdate

6 years agobackupfile: new dir_fd args
Paul Eggert [Wed, 24 Oct 2018 02:10:21 +0000 (19:10 -0700)]
backupfile: new dir_fd args

New module opendirat with code taken from fts.
Use this module to let backupfile use a directory file descriptor.
* NEWS: Document the incompatible change.
* lib/backup-find.c (find_backup_file_name):
* lib/backup-rename.c (backup_file_rename):
New arg DIR_FD.
* lib/backupfile.c: Include stdint.h, for SIZE_MAX.
(SIZE_MAX): Remove.
Include opendirat.h rather than dirent--.h.
(check_extension): New args DIR_FD and BASE_MAX.  All callers changed.
(numbered_backup): New args DIR_FD and PNEW_FD.  All callers changed.
(backupfile_internal): New arg DIR_FD.  All callers changed.
* lib/fts.c: Include opendirat.h.
(opendirat): Move to opendirat.c.
* lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files.
* modules/backupfile (Depends-on): Remove dirfd, opendir.
Add opendirat.
* modules/fts (Depends-on): Remove fdopendir, openat-safer.
Add opendirat.

6 years agolocalename: Simplify support for per-thread locales on Solaris 11.4.
Bruno Haible [Tue, 23 Oct 2018 20:18:24 +0000 (22:18 +0200)]
localename: Simplify support for per-thread locales on Solaris 11.4.

* m4/intl-thread-locale.m4: Renamed from m4/intlsolaris.m4.
(gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
* lib/localename.c: Handle HAVE_SOLARIS114_LOCALES through Solaris
specific code.
* lib/localename-table.h: Update comments.
* lib/localename-table.c: Update comments.
* m4/localename.m4 (gl_LOCALENAME): Require gt_INTL_THREAD_LOCALE_NAME.
Test for 'uselocale'. Don't invoke gt_INTL_SOLARIS.
* m4/intl.m4 (AM_INTL_SUBDIR): Require gt_INTL_THREAD_LOCALE_NAME. Test
for 'uselocale'. Set HAVE_NAMELESS_LOCALES.
(gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
HAVE_NAMELESS_LOCALES here.
* modules/localename (Files): Add m4/intl-thread-locale.m4. Remove
m4/intlsolaris.m4.
* modules/gettext (Files): Likewise.

6 years agoMention changed minimum requirements for Automake and Autoconf.
Bruno Haible [Mon, 22 Oct 2018 23:08:10 +0000 (01:08 +0200)]
Mention changed minimum requirements for Automake and Autoconf.

* NEWS: Mention the new minimum requirements.

6 years agostd-gnu11: Support Autoconf versions < 2.64.
Bruno Haible [Mon, 22 Oct 2018 22:12:11 +0000 (00:12 +0200)]
std-gnu11: Support Autoconf versions < 2.64.

* m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO as fallback
when _AC_DO_LIMIT does not exist.