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

5 years agoaccept4: Fix typo in previous commit
Eric Blake [Tue, 20 Aug 2019 19:33:40 +0000 (14:33 -0500)]
accept4: Fix typo in previous commit

* lib/accept4.c (accept4): Use correct preprocessor condition.

Signed-off-by: Eric Blake <eblake@redhat.com>
5 years agoaccept4: Support SOCK_NONBLOCK, if defined
Eric Blake [Tue, 20 Aug 2019 16:34:34 +0000 (11:34 -0500)]
accept4: Support SOCK_NONBLOCK, if defined

Ideally, we would improve our replacement <sys/socket.h> to define a
replacement SOCK_NONBLOCK on all platforms, and teach socket() to
honor it as well; but that's a bigger task.  In the meantime, if the
platform already has SOCK_NONBLOCK, we should honor it when doing a
fallback.

* lib/accept4.c (accept4): If SOCK_NONBLOCK is defined, honor it.

5 years agoaccept4: Fix compilation when native accept4() exists.
Eric Blake [Tue, 20 Aug 2019 16:26:17 +0000 (11:26 -0500)]
accept4: Fix compilation when native accept4() exists.

Reported by Richard W.M. Jones <rjones@redhat.com> in
https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00029.html
* lib/accept4.c (accept4): Match witness symbol to m4 file update.

5 years agoautoupdate
Karl Berry [Mon, 19 Aug 2019 15:33:08 +0000 (08:33 -0700)]
autoupdate

5 years agoDefeat -flto GCC optimization in math autoconf tests.
Bruno Haible [Sun, 18 Aug 2019 14:12:29 +0000 (16:12 +0200)]
Defeat -flto GCC optimization in math autoconf tests.

Reported by Tomasz Kłoczko <kloczko.tomasz@gmail.com>
at <https://savannah.gnu.org/bugs/?56109>.

* m4/mathfunc.m4 (gl_MATHFUNC): Mark function pointer as 'volatile'.
* m4/acosl.m4 (gl_FUNC_ACOSL): Likewise.
* m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
* m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
* m4/cosl.m4 (gl_FUNC_COSL): Likewise.
* m4/exp2.m4 (gl_FUNC_EXP2): Likewise.
* m4/expl.m4 (gl_FUNC_EXPL): Likewise.
* m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
* m4/sinl.m4 (gl_FUNC_SINL): Likewise.
* m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
* m4/tanl.m4 (gl_FUNC_TANL): Likewise.

5 years agowindows-spin: Implement declared functions.
Bruno Haible [Fri, 16 Aug 2019 21:36:59 +0000 (23:36 +0200)]
windows-spin: Implement declared functions.

Reported by Gisle Vanem <gisle.vanem@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00024.html>.

* lib/windows-spin.c (glwthread_spin_trylock): Fix typo in function
name.

5 years agointprops: port to Oracle Developer Studio 12.6
Paul Eggert [Sat, 17 Aug 2019 10:13:42 +0000 (03:13 -0700)]
intprops: port to Oracle Developer Studio 12.6

* lib/intprops.h (_GL_INT_OP_WRAPV): Fix recently-introduced
typos that were in a section not compiled by GCC.

5 years agointprops: support uchar, ushort _WRAPV dests
Paul Eggert [Thu, 15 Aug 2019 05:24:49 +0000 (22:24 -0700)]
intprops: support uchar, ushort _WRAPV dests

* lib/intprops.h (_GL_INT_OP_WRAPV_SMALLISH): New macro, defined
when __builtin_add_overflow etc. and _Generic are not used.
(_GL_INT_OP_WRAPV): Use it to support destinations that
are unsigned char or unsigned short, even in compilers
that lack __typeof__ and are not C11-compatible.

5 years agointprops: pacify picky GCC
Paul Eggert [Thu, 15 Aug 2019 01:05:57 +0000 (18:05 -0700)]
intprops: pacify picky GCC

* lib/intprops.h (_GL_BUILTIN_MUL_OVERFLOW):
Pacify GCC’s complaints about ignoring __builtin_mul_overflow’s
possibly-incorrect result.
(_GL_INT_MULTIPLY_RANGE_OVERFLOW): Pacify GCC’s complaints
about (A) used as a boolean, when A is an expression like 3 * 4.

5 years agointprops: support unsigned *_WRAPV results
Paul Eggert [Thu, 15 Aug 2019 00:43:46 +0000 (17:43 -0700)]
intprops: support unsigned *_WRAPV results

Add support for unsigned, unsigned long, and unsigned long long
results to INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, and
INT_MULTIPLY_WRAPV.  Also, work around GCC bug 91450, and fix a
bug with unsigned inputs reported by Eli Zaretskii in:
https://lists.gnu.org/r/bug-gnulib/2019-08/msg00012.html
* config/srclist.txt: Break the glibc connection for intprops.h
temporarily, while more testing is done in Gnulib-using apps.
* lib/intprops.h (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
(INT_MULTIPLY_WRAPV, _GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH):
Support unsigned results no narrower than unsigned int.  Report
overflow correctly if some arguments are unsigned.
(_GL_BUILTIN_MUL_OVERFLOW): New macro, to work around GCC bug 91450.
(_GL_INT_OP_CALC): Simplify now that the OVERFLOW argument does
the right thing with narrow args.
(_GL_INT_OP_CALC1): Remove.  All callers removed.
(_GL_INT_ADD_RANGE_OVERFLOW, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
(_GL_INT_MULTIPLY_RANGE_OVERFLOW): New macros.
* tests/test-intprops.c: Check for bugs and test new behavior.

5 years agoget_progname_of: New module.
Bruno Haible [Wed, 14 Aug 2019 09:21:55 +0000 (11:21 +0200)]
get_progname_of: New module.

* lib/get_progname_of.h: New file.
* lib/get_progname_of.c: New file, based on lib/getprogname.c.
* lib/getprogname.c (getprogname): Tweak coding style.
* lib/vma-iter.c (vma_iterate_bsd): Update comment.
* modules/get_progname_of: New file.

5 years agoget_ppid_of: New module.
Bruno Haible [Wed, 14 Aug 2019 09:21:37 +0000 (11:21 +0200)]
get_ppid_of: New module.

* lib/get_ppid_of.h: New file.
* lib/get_ppid_of.c: New file.
* modules/get_ppid_of: New file.

5 years agolibtextstyle-optional tests: Support the NO_COLOR environment variable.
Bruno Haible [Wed, 14 Aug 2019 00:48:59 +0000 (02:48 +0200)]
libtextstyle-optional tests: Support the NO_COLOR environment variable.

* tests/test-libtextstyle.c (main): Do not emit styling when the
environment variable NO_COLOR is set.

5 years agoverify: improve diagnostic quality in recent GCC
Paul Eggert [Mon, 12 Aug 2019 21:57:08 +0000 (14:57 -0700)]
verify: improve diagnostic quality in recent GCC

If ‘verify’ fails in a deeply-nested macro, GCC does not output a
useful line number containing the top-level caller of the macro.
So, bring back the older way of issuing a diagnostic containing
the top-level call’s arg, so that it is easier to diagnose
‘verify’ failures with recent GCC.
* lib/verify.h (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE):
Bring back DIAGNOSTIC arg.  All callers changed.
(verify): Just use _GL_VERIFY.

5 years agolocalcharset: Add more aliases for OS/2.
Bruno Haible [Sun, 11 Aug 2019 16:52:28 +0000 (18:52 +0200)]
localcharset: Add more aliases for OS/2.

Based on patch by KO Myung-Hun <komh78@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnu-libiconv/2019-08/msg00004.html>.

* lib/localcharset.c (alias_table) [OS2]: Add more aliases.

5 years agoconfigmake: Update advice on usage.
Eric Blake [Sat, 10 Aug 2019 21:20:47 +0000 (16:20 -0500)]
configmake: Update advice on usage.

* modules/configmake (Include): No longer necessary to include
last, since configmake.h itself worries about collision avoidance.

5 years agoparse-datetime: fix 'T' military timezone handling
Assaf Gordon [Sat, 10 Aug 2019 19:17:49 +0000 (13:17 -0600)]
parse-datetime: fix 'T' military timezone handling

* lib/parse-datetime.y (zone):
follow-up to the previous commit: the 'T' case is handled outside the
conversion table (used as either military timezone UTC-7 or ISO8601
separator). Change it from "HOUR(7)" to "-HOUR(7)" to match other
timezone letters.

5 years agoparse-datetime: fix military timezone letters
Paul Eggert [Fri, 9 Aug 2019 20:47:41 +0000 (13:47 -0700)]
parse-datetime: fix military timezone letters

Problem and trivial fix reported by Neil Hoggarth in:
https://lists.gnu.org/r/bug-gnulib/2019-08/msg00005.html
* lib/parse-datetime.y (military_table):
Do it the right way, not the RFC 822 way.

5 years agoconfigmake: Avoid namespace pollution issue on mingw.
Eric Blake [Thu, 8 Aug 2019 03:03:31 +0000 (22:03 -0500)]
configmake: Avoid namespace pollution issue on mingw.

Mingw includes a header that declares an enum typedef named DATADIR,
pulled in when including <winsock2.h>; compilation fails if DATADIR
has already been defined as a macro expanding to a string prior to
that inclusion.  Although the configmake module documents that it
should generally be included only after system headers, it is just as
easy to make configmake.h robust to this particular issue by including
the system header first if it exists.

* modules/configmake (Makefile.am): If the project uses
<winsock2.h>, include that header before defining DATADIR.
Reported by libvirt: https://lists.gnu.org/archive/html/bug-gnulib/2019-07/msg00089.html

5 years agombrtowc tests: Fix regression on mingw (regression from 2018-02-24).
Bruno Haible [Mon, 29 Jul 2019 01:03:17 +0000 (03:03 +0200)]
mbrtowc tests: Fix regression on mingw (regression from 2018-02-24).

* tests/test-mbrtowc.c (main): Fix expected value of wc.

5 years agopthread-h: Fix definitions of types and macros on mingw.
Bruno Haible [Thu, 25 Jul 2019 01:19:53 +0000 (03:19 +0200)]
pthread-h: Fix definitions of types and macros on mingw.

* lib/pthread.in.h (pthread_t, pthread_attr_t, PTHREAD_CREATE_JOINABLE,
PTHREAD_CREATE_DETACHED): Define also when module 'pthread-thread' is
not in use.
(pthread_once_t, PTHREAD_ONCE_INIT): Define also when module
'pthread-once' is not in use.
(pthread_mutex_t, pthread_mutexattr_t, PTHREAD_MUTEX_INITIALIZER,
PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_RECURSIVE): Define also when module 'pthread-mutex' is not
in use.
(pthread_rwlock_t, pthread_rwlockattr_t, PTHREAD_RWLOCK_INITIALIZER):
Define also when module 'pthread-rwlock' is not in use.
(pthread_cond_t, pthread_condattr_t, PTHREAD_COND_INITIALIZER): Define
also when module 'pthread-cond' is not in use.
(pthread_key_t, PTHREAD_DESTRUCTOR_ITERATIONS): Define also when module
'pthread-tss' is not in use.
(pthread_spinlock_t): Define also when module 'pthread-spin' is not in
use.

5 years agoautoupdate
Karl Berry [Wed, 24 Jul 2019 14:27:58 +0000 (07:27 -0700)]
autoupdate

5 years agocrypto/gc: Cope with libgcrypt without SM3.
Simon Josefsson [Wed, 24 Jul 2019 08:01:50 +0000 (10:01 +0200)]
crypto/gc: Cope with libgcrypt without SM3.

* lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.

5 years agobackupfile: fix resource leak on memory failure
Paul Eggert [Tue, 23 Jul 2019 19:25:01 +0000 (12:25 -0700)]
backupfile: fix resource leak on memory failure

Problem found by Coverity (CID 1484214).
* lib/backupfile.c (backupfile_internal): Don’t leak dirp.

5 years agoAvoid missing-declarations warning in various tests.
Bruno Haible [Mon, 22 Jul 2019 10:32:39 +0000 (12:32 +0200)]
Avoid missing-declarations warning in various tests.

* tests/test-argp.c (fail, test1, test2, test_file, test3, test4, test5,
test6, test_optional, test7, test8, test9, test10, test11, test12,
test13, test14, test15, test_fun): Declare static.
* tests/test-cnd.c (test_cnd_wait): Likewise.
* tests/test-cond.c (test_cond): Likewise.

5 years agopthread tests: Avoid missing-declarations warning.
Bernhard Voelker [Mon, 22 Jul 2019 10:28:26 +0000 (12:28 +0200)]
pthread tests: Avoid missing-declarations warning.

* tests/test-pthread-cond.c (test_pthread_cond_wait): Declare static.

5 years agoparse-datetime: Avoid warnings from bison versions >= 3.3.
Bruno Haible [Fri, 19 Jul 2019 22:51:26 +0000 (00:51 +0200)]
parse-datetime: Avoid warnings from bison versions >= 3.3.

Reported by Bernhard Voelker <mail@bernhard-voelker.de>.

* modules/parse-datetime (Makefile.am): Don't pass option '-y' to bison.

5 years agoparse-datetime: Require Bison 2.4 or newer.
Bruno Haible [Fri, 19 Jul 2019 03:00:10 +0000 (05:00 +0200)]
parse-datetime: Require Bison 2.4 or newer.

* m4/parse-datetime.m4 (gl_PARSE_DATETIME): Set PARSE_DATETIME_BISON.
Code taken from gettext's intl.m4.
* modules/parse-datetime (Makefile.am): Use PARSE_DATETIME_BISON instead
of YACC.

5 years agoareadlink-with-size, xgethostname, xgetdomainname: Fix GCC warning.
Bruno Haible [Fri, 19 Jul 2019 03:21:11 +0000 (05:21 +0200)]
areadlink-with-size, xgethostname, xgetdomainname: Fix GCC warning.

* lib/areadlink-with-size.c: Include <string.h>.
* lib/areadlinkat-with-size.c: Likewise.
* lib/xgethostname.c: Likewise.
* lib/xgetdomainname.c: Likewise.

5 years agoparse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4
Bernhard Voelker [Thu, 18 Jul 2019 23:17:25 +0000 (01:17 +0200)]
parse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4

* lib/parse-datetime.y: Use "%define api.pure" rather than obsolescent
"%pure-parser".  The former is available since Bison 2.3b (2008, [1]),
while the latter is marked as obsolete since version 3.4 (May 2019, [2]):

  ./lib/parse-datetime.y:568.1-12: warning: deprecated directive, \
    use '%define api.pure' [-Wdeprecated]
  568 | %pure-parser
      | ^~~~~~~~~~~~

[1] https://git.sv.gnu.org/cgit/bison.git/commit/?id=d9df47b656fd
[2] https://git.sv.gnu.org/cgit/bison.git/commit/?id=de5207244b5c

5 years agoupdate-copyright: Make it work again (regression from 2019-06-15).
Bruno Haible [Tue, 16 Jul 2019 08:02:30 +0000 (10:02 +0200)]
update-copyright: Make it work again (regression from 2019-06-15).

Reported by Brian C. Lane <bcl@redhat.com>.

* build-aux/update-copyright: Add back the -0777, -p, -i options.