]> Savannah Git Hosting - gnulib.git/log
gnulib.git
5 years agoFix errors in C++ mode on mingw.
Bruno Haible [Sun, 24 Nov 2019 19:12:02 +0000 (20:12 +0100)]
Fix errors in C++ mode on mingw.

* lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST
instead of _GL_CXXALIAS_SYS.
* lib/signal.in.h (pthread_sigmask): Likewise.
* lib/spawn.in.h (posix_spawn_file_actions_addopen,
posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
Likewise.
* lib/wchar.in.h (btowc): Likewise.

5 years agosys_time: Fix errors in C++ mode on mingw.
Bruno Haible [Sun, 24 Nov 2019 19:11:28 +0000 (20:11 +0100)]
sys_time: Fix errors in C++ mode on mingw.

* lib/sys_time.in.h (timeval): Restore the redirection
'#define timeval rpl_timeval', for when the symbol timeval is being used
outside the 'gnulib' namespace.
* lib/sys_select.in.h (select): In C++, write 'timeval', not
'struct timeval'.

5 years agoiswctype: Fix errors in C++ mode on mingw.
Bruno Haible [Sun, 24 Nov 2019 19:10:56 +0000 (20:10 +0100)]
iswctype: Fix errors in C++ mode on mingw.

* lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T
is 1.
* lib/iswctype.c (iswctype): Add another implementation, for the
GNULIB_defined_wint_t case.
* modules/iswctype (configure.ac): Compile iswctype.c also if
GNULIB_OVERRIDES_WINT_T is 1.

5 years agowindows-timedmutex: Fix errors in C++ mode on mingw.
Bruno Haible [Sun, 24 Nov 2019 19:10:02 +0000 (20:10 +0100)]
windows-timedmutex: Fix errors in C++ mode on mingw.

* lib/windows-timedmutex.h: Add closing brace.

5 years agoFix errors in C++ mode on Cygwin.
Bruno Haible [Sun, 24 Nov 2019 12:28:03 +0000 (13:28 +0100)]
Fix errors in C++ mode on Cygwin.

* lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.

5 years agotime_r: Fix for mingw (regression from 2019-11-16).
Bruno Haible [Sun, 24 Nov 2019 13:32:23 +0000 (14:32 +0100)]
time_r: Fix for mingw (regression from 2019-11-16).

* m4/time_r.m4 (gl_TIME_R): Revert to using AC_CHECK_FUNCS_ONCE. Use the
AC_LINK_IFELSE test only if the function does not appear to exist.

5 years agowcstok: Correct documentation.
Bruno Haible [Sun, 24 Nov 2019 12:15:58 +0000 (13:15 +0100)]
wcstok: Correct documentation.

5 years agowcstok: Add tests.
Bruno Haible [Sun, 24 Nov 2019 12:12:53 +0000 (13:12 +0100)]
wcstok: Add tests.

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

5 years agowcstok: Work around wrong signature on native Windows.
Bruno Haible [Sun, 24 Nov 2019 12:11:12 +0000 (13:11 +0100)]
wcstok: Work around wrong signature on native Windows.

* lib/wchar.in.h (wcstok): Override when REPLACE_WCSTOK is 1.
* m4/wcstok.m4 (gl_FUNC_WCSTOK): Check for signature of wcstok. Set
REPLACE_WCSTOK.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSTOK.
* modules/wchar (Makefile.am): Substitute REPLACE_WCSTOK.
* modules/wcstok (Depends-on, configure.ac): Consider REPLACE_WCSTOK.
* doc/posix-functions/wcstok.texi: Mention the problem.

5 years agointprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
Paul Eggert [Sat, 23 Nov 2019 01:32:57 +0000 (17:32 -0800)]
intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+

* lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 8.x where 4 <= x,
remove workaround for GCC bug 91450 as the bug should be fixed
there too.

5 years agoDisable many _GL_CXXALIASWARN on all platforms other than glibc systems.
Bruno Haible [Thu, 21 Nov 2019 10:44:12 +0000 (11:44 +0100)]
Disable many _GL_CXXALIASWARN on all platforms other than glibc systems.

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

* lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
* lib/locale.in.h (localeconv, setlocale): Likewise.
* lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder,
rint, round, trunc): Likewise.
* lib/monetary.in.h (strfmon_l): Likewise.
* lib/pthread.in.h (pthread_mutexattr_getrobust,
pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init,
pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock,
pthread_spin_destroy): Likewise.
* lib/signal.in.h (raise, signal): Likewise.
* lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc,
fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar,
perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf,
tmpfile, vfprintf, vprintf, vsprintf): Likewise.
* lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb):
Likewise.
* lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror):
Likewise.
* lib/time.in.h (mktime, localtime, ctime, strftime): Likewise.
* lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs,
wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset,
wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll,
wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok,
wcsftime): Likewise.
* lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.

5 years agoFix various errors in _GL_CXXALIAS_SYS invocations.
Bruno Haible [Thu, 21 Nov 2019 10:44:10 +0000 (11:44 +0100)]
Fix various errors in _GL_CXXALIAS_SYS invocations.

* lib/locale.in.h (freelocale): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.
* lib/pthread.in.h (pthread_mutexattr_gettype,
pthread_mutexattr_getrobust): Likewise.
* lib/stdlib.in.h (srandom, initstate, setstate): Likewise.
* lib/sys_socket.in.h (recv, send): Likewise.
* lib/unistd.in.h (getdtablesize): Likewise.
* lib/sys_select.in.h (select): In C++, write 'timeval' instead of
'struct timeval'.

5 years agomath tests: Update after 2019-08-28 change.
Bruno Haible [Thu, 21 Nov 2019 10:44:07 +0000 (11:44 +0100)]
math tests: Update after 2019-08-28 change.

* tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Expect a
return type of 'bool', not 'int'.

5 years agopthread-spin: Fix errors in C++ mode.
Bruno Haible [Thu, 21 Nov 2019 10:44:05 +0000 (11:44 +0100)]
pthread-spin: Fix errors in C++ mode.

* m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Mark the pthread_spin_*
functions as nonexistent when <pthread.h> exists but does not define
the pthread_spinlock_t type.

5 years agopthread-mutex: Fix errors in C++ mode.
Bruno Haible [Thu, 21 Nov 2019 10:44:01 +0000 (11:44 +0100)]
pthread-mutex: Fix errors in C++ mode.

* m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Test whether
pthread_mutexattr_getrobust exists. If not, define
PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
* lib/pthread-mutex.c (pthread_mutexattr_getrobust,
pthread_mutexattr_setrobust): Define also if <pthread.h> exists but
PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
* modules/pthread-mutex (configure.ac): Compile pthread-mutex.c also
when <pthread.h> exists but pthread_mutexattr_getrobust needs a gnulib
definition.

5 years agothreads-h tests: Fix typo.
Bruno Haible [Wed, 20 Nov 2019 02:45:01 +0000 (03:45 +0100)]
threads-h tests: Fix typo.

* tests/test-threads-c++.cc: Fix references to undefined type 'mtx'.

5 years agopthread-thread: Fix prototype of pthread_attr_getdetachstate.
Bruno Haible [Wed, 20 Nov 2019 01:31:42 +0000 (02:31 +0100)]
pthread-thread: Fix prototype of pthread_attr_getdetachstate.

* lib/pthread.in.h (pthread_attr_getdetachstate): Change first parameter
to 'const pthread_attr_t *'.
* lib/pthread-thread.c (pthread_attr_getdetachstate): Likewise.
* tests/test-pthread-c++.cc (pthread_attr_getdetachstate): Likewise.

5 years ago* lib/intprops.h (INT_MULTIPLY_WRAPV): Simplify gcc -E output.
Paul Eggert [Tue, 19 Nov 2019 17:44:02 +0000 (09:44 -0800)]
* lib/intprops.h (INT_MULTIPLY_WRAPV): Simplify gcc -E output.

5 years agointprops: speed up INT_MULTIPLY_WRAPV in GCC 9.3
Paul Eggert [Tue, 19 Nov 2019 17:02:03 +0000 (09:02 -0800)]
intprops: speed up INT_MULTIPLY_WRAPV in GCC 9.3

* lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 9.3 or later, do not
work around GCC bug 91450 as the bug should be fixed there.

5 years agoglob: get closer to glibc glob.c
Paul Eggert [Tue, 19 Nov 2019 01:57:53 +0000 (17:57 -0800)]
glob: get closer to glibc glob.c

Omit differences from glibc when the differences don’t matter.
* lib/glob.c [_LIBC]: Include shlib-compat.h.
(__glob) [!_LIBC]: New macro.  All uses of glob changed to __glob.
(glob_lstat): New function.
(glob_in_dir): Use it.
(GLOB_ATTRIBUTE): Define to empty if not already defined.
Use changed.

5 years agostdint: Define [u]intptr_t correctly on 64-bit native Windows.
Bruno Haible [Mon, 18 Nov 2019 21:41:09 +0000 (22:41 +0100)]
stdint: Define [u]intptr_t correctly on 64-bit native Windows.

* lib/stdint.in.h (gl_intptr_t, gl_uintptr_t, INTPTR_MIN, INTPTR_MAX,
UINTPTR_MAX): Consider _WIN64.
* tests/test-stdint.c: Verify that [u]intptr_t is large enough to hold
a pointer.

5 years agostdint: Fix value of WINT_MAX when we override wint_t.
Bruno Haible [Mon, 18 Nov 2019 21:40:36 +0000 (22:40 +0100)]
stdint: Fix value of WINT_MAX when we override wint_t.

* lib/stdint.in.h (WINT_MIN, WINT_MAX): Don't override a second time
when GNULIB_OVERRIDES_WINT_T is 1.

5 years agovcs-to-changelog: New module.
Bruno Haible [Mon, 18 Nov 2019 20:45:44 +0000 (21:45 +0100)]
vcs-to-changelog: New module.

* modules/vcs-to-changelog: New file.
* MODULES.html.sh (func_all_modules): Add it.

5 years agovcs-to-changelog: New script to generate ChangeLog-like output.
Siddhesh Poyarekar [Fri, 1 Nov 2019 01:28:49 +0000 (21:28 -0400)]
vcs-to-changelog: New script to generate ChangeLog-like output.

Discussion:
<https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00062.html>

* build-aux/vcs_to_changelog.py: New file.
* build-aux/vcstocl/frontend_c.py: New file.
* build-aux/vcstocl/misc_util.py: New file.
* build-aux/vcstocl/vcs_git.py: New file.

5 years agostdint: Avoid triggering a "conflicting types" error on mingw 5.22.
Bruno Haible [Mon, 18 Nov 2019 12:57:46 +0000 (13:57 +0100)]
stdint: Avoid triggering a "conflicting types" error on mingw 5.22.

Reported by Keith Marshall <keith@users.osdn.me> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00044.html>
and <https://osdn.net/projects/mingw/ticket/39677>.

* lib/stdint.in.h (intptr_t, uintptr_t): Don't define if the types have
already been defined by mingw's <crtdefs.h>.

5 years agognulib-tool: Fix build error on macOS with --conditional-dependencies.
Bruno Haible [Mon, 18 Nov 2019 12:32:46 +0000 (13:32 +0100)]
gnulib-tool: Fix build error on macOS with --conditional-dependencies.

* gnulib-tool (func_modules_add_dummy): Ignore modules that are
conditionally enabled.

5 years agogc: Mirror libgcrypt.m4 from libgcrypt.
Bruno Haible [Mon, 18 Nov 2019 12:07:05 +0000 (13:07 +0100)]
gc: Mirror libgcrypt.m4 from libgcrypt.

* config/srclistvars.sh (LIBGCRYPT): New variable.
* config/srclist.txt: Use it to fetch m4/libgcrypt.m4.

5 years agolocale, localename: Improve z/OS support.
Bruno Haible [Mon, 18 Nov 2019 03:57:15 +0000 (04:57 +0100)]
locale, localename: Improve z/OS support.

* m4/localename.m4 (gl_LOCALENAME): Make last change more reliable.

5 years agolocale, localename: Improve z/OS support.
Bruno Haible [Mon, 18 Nov 2019 00:17:49 +0000 (01:17 +0100)]
locale, localename: Improve z/OS support.

Reported by Daniel Richard G. in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>.

* m4/locale_h.m4 (gl_LOCALE_T): New macro, partially extracted from
gl_LOCALE_H.
(gl_LOCALE_H): Require it.
* m4/localename.m4 (gl_LOCALENAME): Likewise. If locale_t is not
defined, don't even check for newlocale, duplocale, freelocale.
* m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Make the test fail when
locale_t is not defined.

5 years agohavelib: Make libdirstems processing more flexible.
Bruno Haible [Sun, 17 Nov 2019 22:57:00 +0000 (23:57 +0100)]
havelib: Make libdirstems processing more flexible.

* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Set 3 libdirstem
variables: Consider 'lib' always, also on Solaris. Look for lib32 in
addition to lib64. Don't invoke /usr/bin/gcc (reverting the second
patch from 2017-02-19).
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Consider up to 3 additional
libdirs, even when the first one exists as a directory.

5 years agohavelib: Match the bitness when searching for libraries.
Bruno Haible [Sun, 17 Nov 2019 22:56:55 +0000 (23:56 +0100)]
havelib: Match the bitness when searching for libraries.

* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Define a function
acl_is_expected_elfclass.
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When testing whether a library
file exists, in ELF, also test whether it has the ELF class that
corresponds to the host's bitness.

5 years agohost-cpu-c-abi: Add support for unknown CPUs.
Bruno Haible [Sun, 17 Nov 2019 22:56:51 +0000 (23:56 +0100)]
host-cpu-c-abi: Add support for unknown CPUs.

* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Set
gl_cv_host_cpu_c_abi_32bit to 'unknown' if we don't know whether it's
32-bit or 64-bit.

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.