]> Savannah Git Hosting - gnulib.git/log
gnulib.git
5 years agohavelib: Remove redundant code.
Bruno Haible [Sun, 17 Nov 2019 22:56:47 +0000 (23:56 +0100)]
havelib: Remove redundant code.

* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Remove Solaris specific
test for 64-bit host. Use gl_HOST_CPU_C_ABI_32BIT result instead.

5 years agohavelib: Fix a bug in dependency processing.
Bruno Haible [Sun, 17 Nov 2019 22:56:43 +0000 (23:56 +0100)]
havelib: Fix a bug in dependency processing.

* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): During dependency processing
of .la files, don't overwrite the value of additional_libdir for the
next rounds.

5 years agowctype-h: When overriding wint_t, override also the related functions.
Bruno Haible [Sun, 17 Nov 2019 03:02:22 +0000 (04:02 +0100)]
wctype-h: When overriding wint_t, override also the related functions.

Reported by Christian Biesinger <cbiesinger@google.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00027.html>.

* m4/wctype_h.m4 (gl_WCTYPE_H): When GNULIB_OVERRIDES_WINT_T is 1, set
REPLACE_ISWCNTRL to 1.
* lib/wctype.in.h (rpl_iswalnum, rpl_iswalpha, rpl_iswblank,
rpl_iswcntrl, rpl_iswdigit, rpl_iswgraph, rpl_iswlower, rpl_iswprint,
rpl_iswpunct, rpl_iswspace, rpl_iswupper, rpl_iswxdigit, rpl_towlower,
rpl_towupper): New definitions when GNULIB_OVERRIDES_WINT_T is 1.
* doc/posix-headers/wchar.texi: Mention that wint_t is also overridden
on mingw.
* doc/posix-headers/wctype.texi: Likewise.

5 years agotime_r: Fix for mingw.
Bruno Haible [Sat, 16 Nov 2019 12:13:58 +0000 (13:13 +0100)]
time_r: Fix for mingw.

Reported by Christian Biesinger <cbiesinger@google.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00014.html>.

* lib/time.in.h: On mingw, include <unistd.h>.
* m4/time_r.m4 (gl_TIME_R): On mingw, include <unistd.h> before
<time.h>. Test for localtime_r in a way that works when it is defined
as an inline function.

5 years agohavelib: Revert last change.
Bruno Haible [Wed, 13 Nov 2019 23:09:54 +0000 (00:09 +0100)]
havelib: Revert last change.

* build-aux/config.rpath: Revert last change. We can add msys2 support
when it has been added to libtool.m4 upstream.

5 years agoautoupdate
Paul Eggert [Mon, 11 Nov 2019 21:04:02 +0000 (13:04 -0800)]
autoupdate

5 years agoautoupdate
Karl Berry [Mon, 11 Nov 2019 15:26:06 +0000 (07:26 -0800)]
autoupdate

5 years agoautoupdate
Karl Berry [Sun, 10 Nov 2019 16:01:09 +0000 (08:01 -0800)]
autoupdate

5 years agoconfig: add msys support
Paul Eggert [Sat, 9 Nov 2019 20:02:24 +0000 (12:02 -0800)]
config: add msys support

Requested by Arnold Robbins in:
https://lists.gnu.org/r/bug-gnulib/2019-11/msg00008.html
He also requested a change to config.guess, which I’ll forward
upstream.
* build-aux/ar-lib (func_file_conv):
* build-aux/compile (func_file_conv):
* build-aux/config.rpath (wl, with_gnu_ld)
(hardcode_libdir_flag_spec, libext, shrext, library_names_spec):
Treat msys like cygwin.

5 years agoregex: now back in sync with glibc
Paul Eggert [Wed, 6 Nov 2019 20:13:47 +0000 (12:13 -0800)]
regex: now back in sync with glibc

* config/srclist.txt: regcomp.c, regex_internal.c, regex_internal.h,
regexec.c got merged into glibc and are now copies again.

5 years agoautoupdate
Karl Berry [Fri, 1 Nov 2019 16:26:19 +0000 (09:26 -0700)]
autoupdate

5 years agolibtextstyle-optional: Sync with current not-yet-released libtextstyle.
Bruno Haible [Mon, 28 Oct 2019 00:23:33 +0000 (01:23 +0100)]
libtextstyle-optional: Sync with current not-yet-released libtextstyle.

* lib/textstyle.in.h: Include <stdarg.h>.
(ostream_printf, ostream_vprintf): New functions.
* modules/libtextstyle-optional (Depends-on): Add vasprintf-posix.

5 years agohost-cpu-c-abi: Recognize i386 and a couple of other CPUs as 32-bit.
Bruno Haible [Sun, 27 Oct 2019 14:34:25 +0000 (15:34 +0100)]
host-cpu-c-abi: Recognize i386 and a couple of other CPUs as 32-bit.

* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Include i386 in the case
statement.
(gl_HOST_CPU_C_ABI_32BIT): Likewise. Also recognize a couple of other
32-bit CPUs.

5 years agotimespec-add, timespec-sub: simplify
Paul Eggert [Fri, 25 Oct 2019 00:30:44 +0000 (17:30 -0700)]
timespec-add, timespec-sub: simplify

* lib/timespec-add.c (timespec_add):
* lib/timespec-sub.c (timespec_sub):
Simplify, now that INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
work on unsigned integers.

5 years agonstrftime: speed up integer overflow checking
Paul Eggert [Wed, 23 Oct 2019 20:33:37 +0000 (13:33 -0700)]
nstrftime: speed up integer overflow checking

* lib/nstrftime.c: Include intprops.h.
(INT_STRLEN_BOUND): Remove, as we can use intprops.h’s defn.
(__strftime_internal): Use INT_MULTIPLY_WRAPV and INT_ADD_WRAPV
instead of doing it by hand.
* modules/nstrftime (Depends-on): Add intprops.

5 years agoPort better to GCC under macOS
Paul Eggert [Wed, 23 Oct 2019 20:31:15 +0000 (13:31 -0700)]
Port better to GCC under macOS

Work around macOS header that has ‘#define __has_builtin(x) 0’
when compiled by GCC.  Apple really, really doesn’t want you to
use GCC, apparently.  Rroblem reported by Akim Demaille in:
https://lists.gnu.org/r/bug-bison/2019-10/msg00071.html
The fix is to not trust __has_builtin when being compiled by
recent-enough GCC.
* lib/intprops.h (__has_builtin)
(_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
* lib/verify.h (__has_builtin, _GL_HAS___builtin_unreachable)
(_GL_HAS___builtin_trap, _GL_TEMPDEF___has_builtin):
Remove.  All uses removed.
* lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Use __has_builtin
directly, if defined and if not newer GCC.
* lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
New macro, that use __has_builtin directly, if defined and if
not newer GCC.
(assume): Use them.

5 years agomaintainer-makefile: update rule for argmatch
Akim Demaille [Tue, 22 Oct 2019 08:28:50 +0000 (10:28 +0200)]
maintainer-makefile: update rule for argmatch

* top/maint.mk (sc_prohibit_argmatch_without_use): Add ARGMATCH_DEFINE_GROUP.

5 years agobitset: let freeing functions accept NULL
Akim Demaille [Mon, 21 Oct 2019 14:47:00 +0000 (16:47 +0200)]
bitset: let freeing functions accept NULL

* lib/bitset.c (bitset_free, bitset_obstack_free): Do nothing if
given NULL.
* lib/bitset.h: Document that.
* doc/bitset.texi: Fix the example, and demonstrate bitset_free.

5 years agointtypes: use more-robust test for int range
Paul Eggert [Tue, 15 Oct 2019 19:48:54 +0000 (12:48 -0700)]
inttypes: use more-robust test for int range

This fixes Bison 3.4.2 when built with Oracle Solaris Studio 12.3.
Problem reported by Dagobert Michelsen in:
https://lists.gnu.org/r/bug-gnulib/2019-10/msg00042.html
* lib/inttypes.in.h: Rely only on limits.h when checking
int range.

5 years agoautoupdate
Karl Berry [Tue, 15 Oct 2019 15:25:51 +0000 (08:25 -0700)]
autoupdate

5 years agolibtextstyle-optional: Sync with current not-yet-released libtextstyle.
Bruno Haible [Tue, 15 Oct 2019 08:48:25 +0000 (10:48 +0200)]
libtextstyle-optional: Sync with current not-yet-released libtextstyle.

* libtextstyle-optional (styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
term_ostream_set_hyperlink): New functions.
(term_styled_ostream_get_hyperlink_ref,
term_styled_ostream_get_hyperlink_id,
term_styled_ostream_set_hyperlink): New function aliases.

5 years agoupdate-copyright: use en dashes in .texi ranges * build-aux/update-copyright: Update...
Paul Eggert [Mon, 14 Oct 2019 20:36:44 +0000 (13:36 -0700)]
update-copyright: use en dashes in .texi ranges * build-aux/update-copyright: Update ranges in .tex, .texi, and .texinfo files to use en dashes instead of hyphens.

5 years agoupdate-copyright: allow en dashes in year ranges
Paul Eggert [Mon, 14 Oct 2019 20:07:19 +0000 (13:07 -0700)]
update-copyright: allow en dashes in year ranges

* build-aux/update-copyright: Match year ranges like "1998--2019",
which are used in the Autoconf manual.

5 years ago* config/srclist.txt: Remove posix/regex_internal.c for now.
Paul Eggert [Sun, 13 Oct 2019 20:17:05 +0000 (13:17 -0700)]
* config/srclist.txt: Remove posix/regex_internal.c for now.

5 years agogit-version-gen: Allow 'snapshot' as .tarball-version contents.
Bruno Haible [Sun, 13 Oct 2019 15:33:17 +0000 (17:33 +0200)]
git-version-gen: Allow 'snapshot' as .tarball-version contents.

* build-aux/git-version-gen: Don't map non-numeric .tarball-version
contents to the empty string.

5 years agoautoupdate
Karl Berry [Sat, 12 Oct 2019 15:11:18 +0000 (08:11 -0700)]
autoupdate

5 years agointprops tests: Fix compilation errors on HP-UX/ia64 with cc.
Bruno Haible [Sat, 12 Oct 2019 10:56:53 +0000 (12:56 +0200)]
intprops tests: Fix compilation errors on HP-UX/ia64 with cc.

* tests/test-intprops.c (main): Disable two more tests when using
HP-UX cc.

5 years agoSimplify and regularize regex use of ‘assert’
Paul Eggert [Fri, 11 Oct 2019 19:43:21 +0000 (12:43 -0700)]
Simplify and regularize regex use of ‘assert’

Also, tell GCC about the asserts even when compiling without
debugging, to give it further optimization opportunities.
* lib/regex_internal.h (DEBUG_ASSERT): New macro.
* lib/regcomp.c (link_nfa_nodes, calc_eclosure)
(parse_expression, parse_bracket_exp):
* lib/regex_internal.c (build_wcs_buffer)
(build_wcs_upper_buffer, re_string_reconstruct)
(re_string_context_at):
* lib/regexec.c (re_search_stub, re_copy_regs)
(re_search_internal, prune_impossible_nodes, check_matching)
(check_halt_state_context, set_regs, sift_states_backward)
(build_sifted_states, transit_state_mb, transit_state_bkref)
(check_arrival_add_next_nodes, check_arrival_expand_ecl)
(match_ctx_add_subtop):
Use it instead of plain ‘assert’.

5 years agoregex: omit debug assignment when not debugging
Paul Eggert [Thu, 10 Oct 2019 00:51:03 +0000 (17:51 -0700)]
regex: omit debug assignment when not debugging

* lib/regexec.c (re_search_internal) [!DEBUG]:
Remove unnecessary assignment to pacify Coverity.

5 years agoregex: tell compiler there’s at most 256 arcs out
Paul Eggert [Thu, 10 Oct 2019 00:37:37 +0000 (17:37 -0700)]
regex: tell compiler there’s at most 256 arcs out

Partly this is to help the reader (and maybe help GCC);
partly this is to pacify Coverity.
* lib/regex_internal.h: Include verify.h.
* lib/regexec.c (group_nodes_into_DFAstates):
Tell the compiler that ndests cannot exceed SBC_MAX.
* modules/regex (Depends-on): Add ‘verify’.

5 years agoregex: simplify by assuming C99
Paul Eggert [Thu, 10 Oct 2019 00:33:58 +0000 (17:33 -0700)]
regex: simplify by assuming C99

* config/srclist.txt: Comment out regex_internal.h and regexec.c
temporarily.
* lib/regex_internal.h (lock_define, re_match_context_t):
Simplify by assuming C99 macros and const.
* lib/regexec.c (re_search_internal): Simplify by assuming C99
initializers.  Remove unnecessary assignment, as mctx is now
safely initialized earlier.

5 years agoregex: avoid copying of uninitialized storage
Paul Eggert [Thu, 10 Oct 2019 00:30:11 +0000 (17:30 -0700)]
regex: avoid copying of uninitialized storage

* config/srclist.txt: Comment out regcomp.c temporarily.
* lib/regcomp.c (build_charclass_op, create_tree) [! (GCC_LINT||lint)]:
Initialize even when not checking for lint, as the behavior is
arguably undefined otherwise and Coverity warns about it.

5 years agoaccess tests: Fix test failure when run as root.
Bruno Haible [Sun, 6 Oct 2019 23:42:11 +0000 (01:42 +0200)]
access tests: Fix test failure when run as root.

* tests/test-access.c: Include root-uid.h.
(geteuid): Define fallback.
(main): Don't expect that writing to a read-only file would fail when
running as root. Also, remove the created files at the end.
* modules/access-tests (Depends-on): Add root-uid.
(configure.ac): Test whether geteuid exists.

5 years agousers.txt: Fix URL for libidn2
Tim Rühsen [Sun, 6 Oct 2019 14:52:23 +0000 (16:52 +0200)]
users.txt: Fix URL for libidn2

5 years agousers.txt: add GNU nano
Benno Schulenberg [Sun, 6 Oct 2019 09:22:17 +0000 (11:22 +0200)]
users.txt: add GNU nano

Nano has been making use of gnulib since March 2017, version 2.8.0.

5 years agobootstrap: simplify debugging of wget failures
Paul Eggert [Sun, 6 Oct 2019 04:36:15 +0000 (21:36 -0700)]
bootstrap: simplify debugging of wget failures

Problem reported by Tim Rühsen in:
https://lists.gnu.org/r/bug-gnulib/2019-10/msg00000.html
* build-aux/bootstrap (po_download_command_format):
Invoke wget with -nv instead of -q, to make debugging easier.

5 years agoavltree-list: Fix compilation warning (introduced on 2014-09-16).
Bruno Haible [Sun, 29 Sep 2019 14:36:40 +0000 (16:36 +0200)]
avltree-list: Fix compilation warning (introduced on 2014-09-16).

* lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Remove
'const' attribute.

5 years agofbufmode: Fix compilation error on glibc >= 2.28 systems.
Bruno Haible [Sun, 29 Sep 2019 08:37:51 +0000 (10:37 +0200)]
fbufmode: Fix compilation error on glibc >= 2.28 systems.

* lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.

5 years agoUpdate comments that refer to POSIX.
Bruno Haible [Sat, 28 Sep 2019 15:46:43 +0000 (17:46 +0200)]
Update comments that refer to POSIX.

* lib/creat.c, lib/fopen.c, lib/open.c, lib/openat.c: Cite the relevant
sentence about trailing slashes.
* lib/fflush.c: Clarify the reasoning.
* tests/test-fflush2.c: Cite the relevant sentence.

5 years agoaccess: Document limitations on Windows.
Bruno Haible [Sat, 28 Sep 2019 13:29:05 +0000 (15:29 +0200)]
access: Document limitations on Windows.

Suggested by Zaretskii <eliz@gnu.org>.

* doc/posix-functions/access.texi: Mention two limitations on Windows.

5 years agofindprog-in: Fix comment.
Bruno Haible [Sat, 28 Sep 2019 11:45:22 +0000 (13:45 +0200)]
findprog-in: Fix comment.

Reported by Eli Zaretskii <eliz@gnu.org>.

* lib/findprog.h (find_in_given_path): Extend description of EACCES
condition.
* lib/stat.c (rpl_stat): Fix typo in comment.
* lib/utime.c (_gl_utimens_windows): Likewise.

5 years agoautoupdate
Karl Berry [Wed, 25 Sep 2019 15:36:54 +0000 (08:36 -0700)]
autoupdate

5 years agoautoupdate
Karl Berry [Tue, 24 Sep 2019 15:15:12 +0000 (08:15 -0700)]
autoupdate

5 years agoUpdate URLs and associated text
Paul Eggert [Mon, 23 Sep 2019 19:41:22 +0000 (12:41 -0700)]
Update URLs and associated text

(Thanks to Bruno Haible for proofreading the earlier patch.)

5 years agoUpdate some URLs
Paul Eggert [Mon, 23 Sep 2019 06:23:20 +0000 (23:23 -0700)]
Update some URLs

This is a clerical change that mostly changes http: to https: in URLs
where either will work.  It also updates some URLs that have moved,
removes some URLs that no longer work, and fixes related text.

5 years agoautoupdate
Karl Berry [Sun, 22 Sep 2019 16:17:57 +0000 (09:17 -0700)]
autoupdate

5 years agoautoupdate
Karl Berry [Thu, 19 Sep 2019 01:23:36 +0000 (18:23 -0700)]
autoupdate

5 years agofindprog-in: Set errno when the search fails.
Paul Smith [Sun, 15 Sep 2019 17:47:43 +0000 (19:47 +0200)]
findprog-in: Set errno when the search fails.

* lib/findprog-in.c: Include <errno.h>.
(find_in_given_path): Set errno before returning NULL.
* lib/findprog.h (find_in_given_path): Update comment accordingly.
Define the term "slash".

5 years agofindprog, findprog-lgpl, findprog-in: Fix crash on MSVC.
Bruno Haible [Sun, 15 Sep 2019 17:00:51 +0000 (19:00 +0200)]
findprog, findprog-lgpl, findprog-in: Fix crash on MSVC.

* modules/findprog (Depends-on): Add access.
* modules/findprog-lgpl (Depends-on): Likewise.
* modules/findprog-in (Depends-on): Likewise.

5 years agoaccess: Add tests.
Bruno Haible [Sun, 15 Sep 2019 16:58:42 +0000 (18:58 +0200)]
access: Add tests.

* tests/test-access.c: New file.
* modules/access-tests: New file.

5 years agoaccess: New module.
Bruno Haible [Sun, 15 Sep 2019 16:56:46 +0000 (18:56 +0200)]
access: New module.

* lib/unistd.in.h (access): New declaration.
* lib/access.c: New file.
* m4/access.m4: New file.
* m4/unistd_h.m4 (gl_UNISTD_H): Test whether access is declared.
(gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ACCESS, REPLACE_ACCESS.
* modules/unistd (Makefile.am): Substitute GNULIB_ACCESS,
REPLACE_ACCESS.
* modules/access: New file.
* tests/test-unistd-c++.cc (access): Check signature.
* doc/posix-functions/access.texi: Mention the new module.

5 years agofcntl-h: Fix compilation error of creat.c on MSVC.
Bruno Haible [Sun, 15 Sep 2019 16:32:54 +0000 (18:32 +0200)]
fcntl-h: Fix compilation error of creat.c on MSVC.

* lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
defined.

5 years agocreat: Add tests.
Bruno Haible [Sun, 15 Sep 2019 15:42:47 +0000 (17:42 +0200)]
creat: Add tests.

* tests/test-creat.c: New file, based on tests/test-open.h.
* modules/creat-tests: New file.

5 years agocreat: New module.
Bruno Haible [Sun, 15 Sep 2019 15:41:29 +0000 (17:41 +0200)]
creat: New module.

* lib/fcntl.in.h (creat): New declaration.
* lib/creat.c: New file, based on lib/open.c.
* m4/creat.m4: New file.
* m4/open-slash.m4: New file, extracted from m4/open.m4.
* m4/open.m4 (gl_FUNC_OPEN): Move trailing-slash test to open-slash.m4.
Invoke gl_OPEN_TRAILING_SLASH_BUG.
* modules/open (Files): Add m4/open-slash.m4.
* m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_CREAT,
REPLACE_CREAT.
* modules/fcntl-h (Makefile.am): Substitute GNULIB_CREAT, REPLACE_CREAT.
* modules/creat: New file.
* tests/test-fcntl-h-c++.cc (creat): Check signature.
* doc/posix-functions/creat.texi: Mention the new module.

5 years agoopen tests: Enhance test.
Bruno Haible [Sun, 15 Sep 2019 12:41:57 +0000 (14:41 +0200)]
open tests: Enhance test.

* tests/test-open.h (test_open): Test the creation of an executable
regular file. Also improve initial cleanup.

5 years agointprops tests: Avoid build failure with HP-UX cc.
Bruno Haible [Sun, 15 Sep 2019 15:26:49 +0000 (17:26 +0200)]
intprops tests: Avoid build failure with HP-UX cc.

* tests/test-intprops.c: Disable a check that makes HP cc choke with
"error 4018: Macro param too large after substitution - use -H option.".

5 years agoautoupdate
Karl Berry [Sat, 14 Sep 2019 21:03:49 +0000 (14:03 -0700)]
autoupdate

5 years agoMake autoconf tests work with -Werror=implicit-function-declaration.
Bruno Haible [Sat, 14 Sep 2019 17:41:46 +0000 (19:41 +0200)]
Make autoconf tests work with -Werror=implicit-function-declaration.

* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Include <wctype.h>, for
towupper() declaration.
* m4/ptsname.m4 (gl_FUNC_PTSNAME): Include <stdlib.h>, for ptsname()
declaration.

5 years agofindprog-in: Better mimic the system on native Windows.
Bruno Haible [Sat, 14 Sep 2019 11:10:22 +0000 (13:10 +0200)]
findprog-in: Better mimic the system on native Windows.

Reported by Paul Smith <psmith@gnu.org>.

* lib/findprog-in.c (find_in_given_path): On native Windows, don't try
non-empty suffixes when the file name already contains a '.'.

5 years agoautoupdate
Karl Berry [Thu, 12 Sep 2019 16:34:50 +0000 (09:34 -0700)]
autoupdate

5 years agowctob: Fix autoconf test.
Bruno Haible [Tue, 10 Sep 2019 12:53:37 +0000 (14:53 +0200)]
wctob: Fix autoconf test.

Based on patch by Florian Weimer <fweimer@redhat.com>.

* m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.

5 years agoxhash: provide hash_xinitialize
Akim Demaille [Mon, 9 Sep 2019 06:31:33 +0000 (08:31 +0200)]
xhash: provide hash_xinitialize

Suggested by Egor Pugin <egor.pugin@gmail.com>
https://lists.gnu.org/archive/html/bison-patches/2019-09/msg00026.html

* modules/xhash, lib/xhash.c: New.
* lib/hash.h (hash_xinitialize): New.

5 years agofindprog-in: Make exec optimization optional.
Bruno Haible [Mon, 9 Sep 2019 18:46:44 +0000 (20:46 +0200)]
findprog-in: Make exec optimization optional.

* lib/findprog.h: Add double-inclusion guard. Include <stdbool.h>.
(find_in_given_path): Add optimize_for_exec parameter.
* lib/findprog-in.c (find_in_given_path): Likewise.

5 years agoAdd option to assume the best, not the worst, when cross-compiling.
Bruno Haible [Mon, 9 Sep 2019 00:43:58 +0000 (02:43 +0200)]
Add option to assume the best, not the worst, when cross-compiling.

Suggested by Jonas Termansen <sortie@maxsi.org>.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Add --enable-cross-guesses=...
option. Set gl_cross_guess_normal and gl_cross_guess_inverted.
* m4/argz.m4 (gl_FUNC_ARGZ): Obey --enable-cross-guesses for
lt_cv_sys_argz_works.
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Obey --enable-cross-guesses for
ac_cv_func_calloc_0_nonnull.
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Obey
--enable-cross-guesses for gl_cv_func_realpath_works.
* m4/cbrtl.m4 (gl_FUNC_CBRTL): Obey --enable-cross-guesses for
gl_cv_func_cbrtl_ieee.
* m4/ceil.m4 (gl_FUNC_CEIL): Obey --enable-cross-guesses for
gl_cv_func_ceil_ieee.
* m4/ceilf.m4 (gl_FUNC_CEILF): Obey --enable-cross-guesses for
gl_cv_func_ceilf_ieee.
* m4/ceill.m4 (gl_FUNC_CEILL): Obey --enable-cross-guesses for
gl_cv_func_ceill_ieee.
* m4/chown.m4 (AC_FUNC_CHOWN): Obey --enable-cross-guesses for
ac_cv_func_chown_works.
(gl_FUNC_CHOWN): Obey --enable-cross-guesses for
gl_cv_func_chown_slash_works, gl_cv_func_chown_ctime_works.
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Obey
--enable-cross-guesses for gl_cv_struct_dirent_d_ino.
* m4/exp2l.m4 (gl_FUNC_EXP2L): Obey --enable-cross-guesses for
gl_cv_func_exp2l_works, gl_cv_func_exp2l_ieee.
* m4/expl.m4 (gl_FUNC_EXPL): Obey --enable-cross-guesses for
gl_cv_func_expl_works.
* m4/expm1.m4 (gl_FUNC_EXPM1): Obey --enable-cross-guesses for
gl_cv_func_expm1_ieee.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Obey --enable-cross-guesses for
gl_cv_func_expm1l_works.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Obey --enable-cross-guesses for
gl_cv_func_open_directory_works.
* m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Obey
--enable-cross-guesses for gl_cv_func_fchownat_nofollow_works.
(gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Obey --enable-cross-guesses for
gl_cv_func_fchownat_empty_filename_works.
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Obey --enable-cross-guesses for
gl_cv_func_fdopendir_works.
* m4/floor.m4 (gl_FUNC_FLOOR): Obey --enable-cross-guesses for
gl_cv_func_floor_ieee.
* m4/floorf.m4 (gl_FUNC_FLOORF): Obey --enable-cross-guesses for
gl_cv_func_floorf_ieee.
* m4/fma.m4 (gl_FUNC_FMA_WORKS): Obey --enable-cross-guesses for
gl_cv_func_fma_works.
* m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Obey --enable-cross-guesses for
gl_cv_func_fmaf_works.
* m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Obey --enable-cross-guesses for
gl_cv_func_fmal_works.
* m4/fmod.m4 (gl_FUNC_FMOD): Obey --enable-cross-guesses for
gl_cv_func_fmod_ieee.
* m4/fmodf.m4 (gl_FUNC_FMODF): Obey --enable-cross-guesses for
gl_cv_func_fmodf_ieee.
* m4/fmodl.m4 (gl_FUNC_FMODL): Obey --enable-cross-guesses for
gl_cv_func_fmodl_ieee.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Obey --enable-cross-guesses for
gl_cv_func_fpurge_works.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Obey
--enable-cross-guesses for gl_cv_func_getcwd_path_max.
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Obey --enable-cross-guesses for
gl_cv_func_getcwd_null.
(gl_FUNC_GETCWD): Update for getcwd-path-max.m4 change.
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Obey --enable-cross-guesses for
gl_cv_func_working_getdelim.
* m4/getgroups.m4 (AC_FUNC_GETGROUPS): Obey --enable-cross-guesses for
ac_cv_func_getgroups_works. Keep this macro also in Autoconf >= 2.70.
(gl_FUNC_GETGROUPS): Obey --enable-cross-guesses for
gl_cv_func_getgroups_works.
* m4/getline.m4 (gl_FUNC_GETLINE): Obey --enable-cross-guesses for
am_cv_func_working_getline.
* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Obey --enable-cross-guesses
for gl_cv_func_getopt_gnu.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Obey
--enable-cross-guesses for gl_cv_func_gettimeofday_clobber.
* m4/hypot.m4 (gl_FUNC_HYPOT): Obey --enable-cross-guesses for
gl_cv_func_hypot_ieee.
* m4/hypotf.m4 (gl_FUNC_HYPOTF): Obey --enable-cross-guesses for
gl_cv_func_hypotf_ieee.
* m4/hypotl.m4 (gl_FUNC_HYPOTL): Obey --enable-cross-guesses for
gl_cv_func_hypotl_ieee.
* m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Obey
--enable-cross-guesses for gl_cv_func_iconv_supports_utf.
* m4/link.m4 (gl_FUNC_LINK): Obey --enable-cross-guesses for
gl_cv_func_link_works.
* m4/linkat.m4 (gl_FUNC_LINKAT): Obey --enable-cross-guesses for
gl_cv_func_linkat_slash.
* m4/log.m4 (gl_FUNC_LOG): Obey --enable-cross-guesses for
gl_cv_func_log_ieee.
* m4/logf.m4 (gl_FUNC_LOGF): Obey --enable-cross-guesses for
gl_cv_func_logf_ieee.
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Obey --enable-cross-guesses for
gl_cv_func_logl_works.
* m4/log10.m4 (gl_FUNC_LOG10): Obey --enable-cross-guesses for
gl_cv_func_log10_ieee.
* m4/log10f.m4 (gl_FUNC_LOG10F): Obey --enable-cross-guesses for
gl_cv_func_log10f_ieee.
* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Obey --enable-cross-guesses for
gl_cv_func_log10l_works.
* m4/log1p.m4 (gl_FUNC_LOG1P): Obey --enable-cross-guesses for
gl_cv_func_log1p_ieee.
* m4/log1pf.m4 (gl_FUNC_LOG1PF): Obey --enable-cross-guesses for
gl_cv_func_log1pf_ieee.
* m4/log1pl.m4 (gl_FUNC_LOG1PL): Obey --enable-cross-guesses for
gl_cv_func_log1pl_ieee.
* m4/log2.m4 (gl_FUNC_LOG2): Obey --enable-cross-guesses for
gl_cv_func_log2_ieee.
* m4/log2f.m4 (gl_FUNC_LOG2F): Obey --enable-cross-guesses for
gl_cv_func_log2f_ieee.
* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Obey
--enable-cross-guesses for
gl_cv_func_lstat_dereferences_slashed_symlink.
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Obey --enable-cross-guesses for
ac_cv_func_malloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
* m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Obey --enable-cross-guesses for
gl_cv_C_locale_sans_EILSEQ.
* m4/memchr.m4 (gl_FUNC_MEMCHR): Obey --enable-cross-guesses for
gl_cv_func_memchr_works.
* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Obey --enable-cross-guesses for
gl_cv_func_memmem_works_always.
(gl_FUNC_MEMMEM): Obey --enable-cross-guesses for
gl_cv_func_memmem_works_fast.
* m4/mkdir.m4 (gl_FUNC_MKDIR): Obey --enable-cross-guesses for
gl_cv_func_mkdir_trailing_slash_works,
gl_cv_func_mkdir_trailing_dot_works.
* m4/mkfifo.m4 (gl_FUNC_MKFIFO): Obey --enable-cross-guesses for
gl_cv_func_mkfifo_works.
* m4/mknod.m4 (gl_FUNC_MKNOD): Obey --enable-cross-guesses for
gl_cv_func_mknod_works.
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Obey --enable-cross-guesses for
gl_cv_func_working_mkstemp.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Obey --enable-cross-guesses for
gl_cv_func_working_mktime.
* m4/modf.m4 (gl_FUNC_MODF): Obey --enable-cross-guesses for
gl_cv_func_modf_ieee.
* m4/modff.m4 (gl_FUNC_MODFF): Obey --enable-cross-guesses for
gl_cv_func_modff_ieee.
* m4/modfl.m4 (gl_FUNC_MODFL): Obey --enable-cross-guesses for
gl_cv_func_modfl_ieee.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Obey --enable-cross-guesses for
gl_cv_func_nanosleep.
* m4/perror.m4 (gl_FUNC_PERROR): Obey --enable-cross-guesses for
gl_cv_func_perror_works.
* m4/printf.m4 (gl_PRINTF_SIZES_C99): Obey --enable-cross-guesses for
gl_cv_func_printf_sizes_c99.
(gl_PRINTF_INFINITE): Obey --enable-cross-guesses for
gl_cv_func_printf_infinite.
(gl_PRINTF_INFINITE_LONG_DOUBLE): Obey --enable-cross-guesses for
gl_cv_func_printf_infinite_long_double.
(gl_PRINTF_DIRECTIVE_A): Obey --enable-cross-guesses for
gl_cv_func_printf_directive_a.
(gl_PRINTF_DIRECTIVE_F): Obey --enable-cross-guesses for
gl_cv_func_printf_directive_f.
(gl_PRINTF_FLAG_ZERO): Obey --enable-cross-guesses for
gl_cv_func_printf_flag_zero.
(gl_PRINTF_ENOMEM): Obey --enable-cross-guesses for
gl_cv_func_printf_enomem.
(gl_SNPRINTF_TRUNCATION_C99): Obey --enable-cross-guesses for
gl_cv_func_snprintf_truncation_c99.
(gl_SNPRINTF_RETVAL_C99): Obey --enable-cross-guesses for
gl_cv_func_snprintf_retval_c99.
(gl_SNPRINTF_DIRECTIVE_N): Obey --enable-cross-guesses for
gl_cv_func_snprintf_directive_n.
(gl_VSNPRINTF_ZEROSIZE_C99): Obey --enable-cross-guesses for
gl_cv_func_vsnprintf_zerosize_c99.
* m4/pselect.m4 (gl_FUNC_PSELECT): Obey --enable-cross-guesses for
gl_cv_func_pselect_detects_ebadf.
* m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
Obey --enable-cross-guesses for
gl_cv_pthread_rwlock_rdlock_prefer_writer.
* m4/ptsname.m4 (gl_FUNC_PTSNAME): Obey --enable-cross-guesses for
gl_cv_func_ptsname_sets_errno.
* m4/putenv.m4 (gl_FUNC_PUTENV): Obey --enable-cross-guesses for
gl_cv_func_svid_putenv.
* m4/readlink.m4 (gl_FUNC_READLINK): Obey --enable-cross-guesses for
gl_cv_func_readlink_works.
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Obey --enable-cross-guesses for
ac_cv_func_realloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
* m4/regex.m4 (gl_REGEX): Obey --enable-cross-guesses for
gl_cv_func_re_compile_pattern_working.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Obey --enable-cross-guesses for
gl_cv_func_remainder_ieee.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Obey --enable-cross-guesses for
gl_cv_func_remainderf_ieee.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Obey --enable-cross-guesses for
gl_cv_func_remainderl_ieee.
* m4/rintl.m4 (gl_FUNC_RINTL): Obey --enable-cross-guesses for
gl_cv_func_rintl_works.
* m4/rmdir.m4 (gl_FUNC_RMDIR): Obey --enable-cross-guesses for
gl_cv_func_rmdir_works.
* m4/round.m4 (gl_FUNC_ROUND): Obey --enable-cross-guesses for
gl_cv_func_round_ieee.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Obey --enable-cross-guesses for
gl_cv_func_roundf_ieee.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Obey --enable-cross-guesses for
gl_cv_func_roundl_ieee.
* m4/select.m4 (gl_FUNC_SELECT): Obey --enable-cross-guesses for
gl_cv_func_select_detects_ebadf.
* m4/setenv.m4 (gl_FUNC_SETENV): Obey --enable-cross-guesses for
gl_cv_func_setenv_works.
(gl_FUNC_UNSETENV): Obey --enable-cross-guesses for
gl_cv_func_unsetenv_works.
* m4/signbit.m4 (gl_SIGNBIT): Obey --enable-cross-guesses for
gl_cv_func_signbit, gl_cv_func_signbit_gcc.
* m4/sleep.m4 (gl_FUNC_SLEEP): Obey --enable-cross-guesses for
gl_cv_func_sleep_works.
* m4/stat.m4 (gl_FUNC_STAT): Obey --enable-cross-guesses for
gl_cv_func_stat_file_slash.
* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Obey --enable-cross-guesses for
gl_cv_func_stpncpy.
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Obey
--enable-cross-guesses for gl_cv_func_strcasestr_works_always.
(gl_FUNC_STRCASESTR): Obey --enable-cross-guesses for
gl_cv_func_strcasestr_linear.
* m4/strerror.m4 (gl_FUNC_STRERROR): Obey --enable-cross-guesses for
gl_cv_func_working_strerror.
(gl_FUNC_STRERROR_0): Obey --enable-cross-guesses for
gl_cv_func_strerror_0_works.
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Obey
--enable-cross-guesses for gl_cv_func_strerror_r_works.
* m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Obey --enable-cross-guesses for
gl_cv_func_strstr_works_always.
(gl_FUNC_STRSTR): Obey --enable-cross-guesses for
gl_cv_func_strstr_linear.
* m4/strtod.m4 (gl_FUNC_STRTOD): Obey --enable-cross-guesses for
gl_cv_func_strtod_works.
* m4/strtold.m4 (gl_FUNC_STRTOLD): Obey --enable-cross-guesses for
gl_cv_func_strtold_works.
* m4/symlink.m4 (gl_FUNC_SYMLINK): Obey --enable-cross-guesses for
gl_cv_func_symlink_works.
* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Obey --enable-cross-guesses for
gl_cv_func_symlinkat_works.
* m4/trunc.m4 (gl_FUNC_TRUNC): Obey --enable-cross-guesses for
gl_cv_func_trunc_ieee.
* m4/truncf.m4 (gl_FUNC_TRUNCF): Obey --enable-cross-guesses for
gl_cv_func_truncf_ieee.
* m4/truncl.m4 (gl_FUNC_TRUNCL): Obey --enable-cross-guesses for
gl_cv_func_truncl_ieee.
* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Obey --enable-cross-guesses for
gl_cv_func_tzset_clobber.
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Obey --enable-cross-guesses for
gl_cv_func_ungetc_works.
* m4/unlink.m4 (gl_FUNC_UNLINK): Obey --enable-cross-guesses for
gl_cv_func_unlink_honors_slashes, gl_cv_func_unlink_parent_fails.
* m4/usleep.m4 (gl_FUNC_USLEEP): Obey --enable-cross-guesses for
gl_cv_func_usleep_works.
* m4/utimens.m4 (gl_UTIMENS): Obey --enable-cross-guesses for
gl_cv_func_futimesat_works.
* m4/utimes.m4 (gl_FUNC_UTIMES): Obey --enable-cross-guesses for
gl_cv_func_working_utimes.
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Obey --enable-cross-guesses for
gl_cv_func_wcwidth_works.
* m4/glob.m4 (gl_GLOB): When cross-compiling, don't create symlinks for
testing. Obey --enable-cross-guesses for gl_cv_glob_lists_symlinks.
* m4/rename.m4 (gl_FUNC_RENAME): When cross-compiling, don't create
links for testing. Obey --enable-cross-guesses for
gl_cv_func_rename_slash_dst_works, gl_cv_func_rename_slash_src_works,
gl_cv_func_rename_link_works, gl_cv_func_rename_dest_works.

5 years agoClarify that cross-compilation guesses are guesses.
Bruno Haible [Sun, 8 Sep 2019 22:46:35 +0000 (00:46 +0200)]
Clarify that cross-compilation guesses are guesses.

* m4/threads.m4 (gl_THREADS_H): Say "guessing yes" or "guessing no" when
cross-compiling.

5 years agochown: Fix configure output (regression from 2019-03-23).
Bruno Haible [Sun, 8 Sep 2019 21:05:22 +0000 (23:05 +0200)]
chown: Fix configure output (regression from 2019-03-23).

* m4/chown.m4 (gl_FUNC_CHOWN): Fix reference to
gl_cv_func_chown_follows_symlink variable.

5 years agofindprog-in: New module.
Bruno Haible [Sun, 8 Sep 2019 16:21:21 +0000 (18:21 +0200)]
findprog-in: New module.

Suggested by Paul Smith <psmith@gnu.org>.

* lib/findprog.h (find_in_given_path): New declaration.
* lib/findprog-in.c: New file, based on lib/findprog.c.
* m4/findprog-in.m4: New file, based on m4/findprog.m4.
* modules/findprog-in: New file.

5 years agofindprog: Remove unused dependency.
Bruno Haible [Sun, 8 Sep 2019 16:21:01 +0000 (18:21 +0200)]
findprog: Remove unused dependency.

* modules/findprog (Depends-on): Remove strdup.

5 years agofindprog: Remove test that is obsolete since 2006-04-24.
Bruno Haible [Sun, 8 Sep 2019 16:16:12 +0000 (18:16 +0200)]
findprog: Remove test that is obsolete since 2006-04-24.

* m4/findprog.m4 (gl_FINDPROG): Don't test for unistd.h.

5 years agobitset: style changes
Akim Demaille [Fri, 6 Sep 2019 09:38:48 +0000 (11:38 +0200)]
bitset: style changes

* lib/bitset/vector.c (vbitset_resize): Factor computation.
* lib/bitset.c, lib/bitset/stats.c, lib/bitsetv.c: Prefer
xzalloc to xcalloc.
Suggested by Paul Eggert.

5 years agobitset: check memory allocation
Akim Demaille [Thu, 5 Sep 2019 09:36:39 +0000 (11:36 +0200)]
bitset: check memory allocation

Reported by 江 祖铭 (Zu-Ming Jiang).
With help from Paul Eggert.
https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html

* lib/bitset/table.c (tbitset_resize): When growing, use xrealloc
instead of realloc.
When shrinking, accept failures.
* lib/bitset/vector.c (vbitset_resize): Likewise.

5 years agoscratch_buffer: sync from glibc
Paul Eggert [Sun, 8 Sep 2019 05:13:08 +0000 (22:13 -0700)]
scratch_buffer: sync from glibc

* config/srclist.txt: Add the scratch_buffer source
code from glibc, since these should be in sync.
Autoupdate.

5 years agodoc: Update for glibc 2.30.
Bruno Haible [Sat, 7 Sep 2019 14:56:52 +0000 (16:56 +0200)]
doc: Update for glibc 2.30.

* doc/glibc-functions/gettid.texi: New file.
* doc/glibc-functions/pthread_cond_clockwait.texi: New file.
* doc/glibc-functions/pthread_mutex_clocklock.texi: New file.
* doc/glibc-functions/pthread_rwlock_clockrdlock.texi: New file.
* doc/glibc-functions/pthread_rwlock_clockwrlock.texi: New file.
* doc/glibc-functions/sem_clockwait.texi: New file.
* doc/glibc-functions/tgkill.texi: New file.
* doc/glibc-functions/twalk_r.texi: New file.
* doc/gnulib.texi: Include them.
(Glibc semaphore.h): New section.
* doc/pastposix-functions/h_errno.texi: Update.
* doc/posix-functions/*.texi: Likewise.

5 years agosymlink tests: Avoid test failure on Linux with Lustre file system.
Bruno Haible [Fri, 6 Sep 2019 22:17:51 +0000 (00:17 +0200)]
symlink tests: Avoid test failure on Linux with Lustre file system.

Reported by Thomas C Oppe <Thomas.C.Oppe@erdc.dren.mil>
at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37312>.

* tests/test-symlink.h (test_symlink): Accept errno value ENOENT.

5 years agogitsub.sh: Add support for shallow-cloning of subdirectories.
Bruno Haible [Sun, 1 Sep 2019 15:34:03 +0000 (17:34 +0200)]
gitsub.sh: Add support for shallow-cloning of subdirectories.

* top/gitsub.sh (func_usage): Document allowed git options with
'git pull'.
(func_pull): Accept GIT_OPTIONS argument.
(pull): Parse git options before complaining about too many arguments.
Pass the git options to func_pull.

5 years agolock: Fix cross-compilation guesses.
Bruno Haible [Thu, 29 Aug 2019 22:06:52 +0000 (00:06 +0200)]
lock: Fix cross-compilation guesses.

* m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
Require AC_CANONICAL_HOST. When cross-compiling, guess no on most
platforms.

5 years agoisfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.
Bruno Haible [Wed, 28 Aug 2019 16:03:43 +0000 (18:03 +0200)]
isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.

Reported by Martin Storsjö <martin@martin.st> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.

* lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
(isfinite, isinf, isnan, signbit): On platforms that use C++ include
files from GCC 6 or newer, use an override through '#define', because
the inline definitions in the platform's <cmath> cannot be overridden
in another way.

5 years agoisfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.
Bruno Haible [Wed, 28 Aug 2019 08:34:40 +0000 (10:34 +0200)]
isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.

Reported by Martin Storsjö <martin@martin.st> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.

* lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
(isfinite, isinf, isnan, signbit): On mingw, use an override through
'#define', because the inline definitions in the platform's <cmath>
cannot be overridden in another way.

5 years agoRevert macOS INT_MULTIPLY_WRAPV patch
Paul Eggert [Wed, 28 Aug 2019 01:04:03 +0000 (18:04 -0700)]
Revert macOS INT_MULTIPLY_WRAPV patch

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html
* lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove.
(_GL_HAS_BUILTIN_MUL_OVERFLOW):
Go back to working around the Clang bug on macOS.

5 years agolibtool-next-version: Fix error output.
Bruno Haible [Sun, 25 Aug 2019 00:53:02 +0000 (02:53 +0200)]
libtool-next-version: Fix error output.

* build-aux/libtool-next-version (func_fatal_error): Fix the program
name.

5 years agoautoupdate
Karl Berry [Tue, 27 Aug 2019 13:28:41 +0000 (06:28 -0700)]
autoupdate

5 years agoSpeed up INT_MULTIPLY_WRAPV on macOS
Paul Eggert [Tue, 27 Aug 2019 11:23:44 +0000 (04:23 -0700)]
Speed up INT_MULTIPLY_WRAPV on macOS

Assume that __builtin_mul_overflow works OK with Clang on macOS.
Mattias Engdegård says it’s safe to assume the relevant library
is always available there.
* lib/intprops.h (_GL_HAS___builtin_mul_overflow):
New temporary internal macro.
(_GL_HAS_BUILTIN_MUL_OVERFLOW):
No need to work around the Clang bug on macOS.

5 years agointprops.h, verify.h: port better to clang
Paul Eggert [Mon, 26 Aug 2019 02:29:15 +0000 (19:29 -0700)]
intprops.h, verify.h: port better to clang

Improve code generated by INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
with Clang.  Problem reported privately by Mattias Engdegård.
Also, insulate intprops.h and verify.h better against each other’s
definitions of __has_builtin on non-Clang hosts.
* lib/intprops.h (__has_builtin): Define a temporary substitute
if __has_builtin is not already defined.
(_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
New temporary internal macros.
(_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW):
Now two separate macros, replacing the old
_GL_HAS_BUILTIN_OVERFLOW, since we no longer assume that
__builtin_mul_overflow is like the rest.  All uses changed.
(INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV):
Adjust to above changes.
(_GL_INT_OP_WRAPV): Remove ‘builtin’ arg, since it’s no
longer relevant.  All uses changed.
* lib/verify.h (__has_builtin): Treat like intprops.h,
so that the two .h files do not collide with each other.
(_GL_HAS___builtin_unreachable, _GL_HAS___builtin_trap)
(_GL_TEMPDEF___has_builtin): New temporary internal macros.

5 years agointprops: say why not Clang __builtin_add_overflow
Paul Eggert [Sun, 25 Aug 2019 00:17:39 +0000 (17:17 -0700)]
intprops: say why not Clang __builtin_add_overflow

* lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW):
Mention Clang in comment, responding to a query from
Mattias Engdegård.

5 years agodoc: Document most of the files outside of modules.
Bruno Haible [Sat, 24 Aug 2019 20:05:28 +0000 (22:05 +0200)]
doc: Document most of the files outside of modules.

* doc/gnulib.texi (Build Infrastructure Files,
Release Management Files): New chapters.

5 years agobootstrap: Keep in sync with the 'gettext' module.
Bruno Haible [Sat, 24 Aug 2019 16:29:14 +0000 (18:29 +0200)]
bootstrap: Keep in sync with the 'gettext' module.

Reported by Assaf Gordon in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html>.

* build-aux/po/Makefile.in.in: Update to gettext 0.20.
* build-aux/po/remove-potcdate.sin: Likewise.

5 years agocrypto/gc-sha512: Add tests.
Bruno Haible [Sat, 24 Aug 2019 15:37:10 +0000 (17:37 +0200)]
crypto/gc-sha512: Add tests.

* tests/test-gc-sha512.c: New file, based on tests/test-gc-sha1.c.
* modules/crypto/gc-sha512-tests: New file.

5 years agocrypto/gc-sha256: Add tests.
Bruno Haible [Sat, 24 Aug 2019 15:36:28 +0000 (17:36 +0200)]
crypto/gc-sha256: Add tests.

* tests/test-gc-sha256.c: New file, based on tests/test-gc-sha1.c.
* modules/crypto/gc-sha256-tests: New file.

5 years agocrypto/gc-sha256, crypto/gc-sha512: New modules.
Bruno Haible [Sat, 24 Aug 2019 15:34:29 +0000 (17:34 +0200)]
crypto/gc-sha256, crypto/gc-sha512: New modules.

* lib/gc.h (gc_sha256, gc_sha512): New declarations.
* lib/gc-gnulib.c: Include sha256.h, sha512.h.
(MAX_DIGEST_SIZE): Set to 64.
(_gc_hash_ctx, gc_hash_open, gc_hash_digest_length, gc_hash_write,
gc_hash_read, gc_hash_buffer): Add support for sha256 and sha512.
(gc_sha256, gc_sha512): New functions.
* lib/gc-libgcrypt.c (gc_sha256, gc_sha512): New functions.
* modules/crypto/gc-sha256: New file, based on modules/crypto/gc-sha1.
* modules/crypto/gc-sha512: New file, based on modules/crypto/gc-sha1.

5 years agocrypto/gc-sha1 tests: Improve output when the test fails.
Bruno Haible [Sat, 24 Aug 2019 15:28:48 +0000 (17:28 +0200)]
crypto/gc-sha1 tests: Improve output when the test fails.

* tests/test-gc-sha1.c (main): In case of mismatch, print the entire
output.

5 years agocrypto/gc-sm3: Fix compilation error with --with-libgcrypt.
Bruno Haible [Sat, 24 Aug 2019 14:16:33 +0000 (16:16 +0200)]
crypto/gc-sm3: Fix compilation error with --with-libgcrypt.

* m4/gc-sm3.m4 (gl_GC_SM3): Test whether libgcrypt supports SM3. Define
LIBGCRYPT_HAS_MD_SM3.
* lib/gc-libgcrypt.c: Include sm3.h.
(_gc_hash_ctx, gc_hash_open, gc_hash_hmac_setkey, gc_hash_write,
gc_hash_read, gc_hash_close, gc_hash_buffer, gc_sm3): Use the gnulib
implementation if libgcrypt does not support SM3.

5 years agocrypto/gc-md2: Optimize and clarify code.
Bruno Haible [Sat, 24 Aug 2019 14:15:02 +0000 (16:15 +0200)]
crypto/gc-md2: Optimize and clarify code.

* lib/gc-gnulib.c (gc_hash_open): Comment out md2_init_ctx invocation.
* lib/gc-libgcrypt.c (gc_hash_open): Clarify why md2_init_ctx invocation
is not needed.

5 years agocrypto/gc-md2: Add comment.
Bruno Haible [Sat, 24 Aug 2019 13:01:44 +0000 (15:01 +0200)]
crypto/gc-md2: Add comment.

* lib/gc-libgcrypt.c: Add comment.

5 years agocrypto/gc-{md[24],rijndael} tests: Fix link error with --with-libgcrypt.
Bruno Haible [Sat, 24 Aug 2019 12:28:15 +0000 (14:28 +0200)]
crypto/gc-{md[24],rijndael} tests: Fix link error with --with-libgcrypt.

* modules/crypto/gc-md2-tests (test_gc_md2_LDADD): New variable.
* modules/crypto/gc-md4-tests (test_gc_md4_LDADD): New variable.
* modules/crypto/gc-rijndael-tests (test_gc_rijndael_LDADD): New
variable.

5 years agocrypto/gc: Fix link error with --with-libgcrypt.
Bruno Haible [Sat, 24 Aug 2019 12:00:57 +0000 (14:00 +0200)]
crypto/gc: Fix link error with --with-libgcrypt.

* m4/gc.m4 (gl_GC): Set LIB_CRYPTO to the value found by the
AC_LIB_HAVE_LINKFLAGS invocation.

5 years agocrypto/gc: Access the module indicators correctly.
Bruno Haible [Sat, 24 Aug 2019 11:32:44 +0000 (13:32 +0200)]
crypto/gc: Access the module indicators correctly.

* lib/gc-gnulib.c: Use '#if GNULIB_GC_*', not '#ifdef GNULIB_GC_*'.
* lib/gc-libgcrypt.c: Likewise.

5 years agogc: Fix configuration with --with-libgcrypt.
Bruno Haible [Sat, 24 Aug 2019 09:07:23 +0000 (11:07 +0200)]
gc: Fix configuration with --with-libgcrypt.

* m4/libgcrypt.m4: New file, copied from libgcrypt/src/libgcrypt.m4.
* modules/crypto/gc (Files): Add it.
* m4/gc.m4 (gl_GC): Assume AM_PATH_LIBGCRYPT is defined.

5 years agoRemove unused file.
Bruno Haible [Sat, 24 Aug 2019 07:24:17 +0000 (09:24 +0200)]
Remove unused file.

* m4/stat-macros.m4: Remove file.

5 years agoautoupdate
Paul Eggert [Wed, 21 Aug 2019 18:37:09 +0000 (11:37 -0700)]
autoupdate

5 years agoNew strip-trailing-space option for srclist-update
Paul Eggert [Wed, 21 Aug 2019 18:30:10 +0000 (11:30 -0700)]
New strip-trailing-space option for srclist-update

* config/srclist-update (fixfile): Support new option.
* config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
Use it.