]> Savannah Git Hosting - gnulib.git/log
gnulib.git
5 years agoautoupdate
Karl Berry [Tue, 10 Dec 2019 16:44:42 +0000 (08:44 -0800)]
autoupdate

5 years agoautoupdate
Karl Berry [Mon, 9 Dec 2019 16:45:26 +0000 (08:45 -0800)]
autoupdate

5 years agoFix compilation errors in C++ mode on Haiku.
Bruno Haible [Mon, 9 Dec 2019 02:02:08 +0000 (03:02 +0100)]
Fix compilation errors in C++ mode on Haiku.

* lib/stdio.in.h (vdprintf): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
* lib/spawn.in.h (posix_spawnattr_getschedpolicy,
posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
posix_spawnattr_setschedparam): Likewise.
* lib/stdlib.in.h (random, initstate_r, setstate_r): Use
_GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
* lib/unistd.in.h (usleep): Likewise.

5 years agoFix compilation errors in 32-bit C++ mode on HP-UX 11/ia64.
Bruno Haible [Mon, 9 Dec 2019 01:12:53 +0000 (02:12 +0100)]
Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64.

* m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): New macro.
* modules/fseeko (configure.ac-early): Require it instead of
AC_FUNC_FSEEKO.
* modules/ftello (configure.ac-early): Likewise.
* modules/fflush (configure.ac-early): Likewise.

5 years agoFix compilation error in C++ mode on HP-UX 11.
Bruno Haible [Sun, 8 Dec 2019 20:49:32 +0000 (21:49 +0100)]
Fix compilation error in C++ mode on HP-UX 11.

* lib/unistd.in.h (getpagesize): Declare on HP-UX.
* doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.

5 years agoFix compilation errors on HP-UX 11/ia64.
Bruno Haible [Sun, 8 Dec 2019 16:35:49 +0000 (17:35 +0100)]
Fix compilation errors on HP-UX 11/ia64.

* lib/math.in.h (copysignf, fmaf, fma): Undefine before
_GL_FUNCDECL_SYS.

5 years agoFix compilation error in C++ mode on OpenBSD.
Bruno Haible [Sun, 8 Dec 2019 15:34:31 +0000 (16:34 +0100)]
Fix compilation error in C++ mode on OpenBSD.

* lib/signal.in.h (signal): Declare on OpenBSD.

5 years agomath tests: Don't fail if isfinite, isinf, isnan, signbit is a macro.
Bruno Haible [Sun, 8 Dec 2019 14:01:54 +0000 (15:01 +0100)]
math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro.

* tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning
instead of #error.

5 years agoFix compilation errors in C++ mode on FreeBSD.
Bruno Haible [Sun, 8 Dec 2019 12:10:23 +0000 (13:10 +0100)]
Fix compilation errors in C++ mode on FreeBSD.

* lib/pthread.in.h (pthread_exit): Remove _Noreturn from prototype.
* tests/test-pthread-c++.cc (GNULIB_NAMESPACE::pthread_exit): Likewise.
* lib/threads.in.h (thrd_exit): Likewise.
* tests/test-threads-c++.cc (GNULIB_NAMESPACE::thrd_exit): Likewise.

5 years agoFix compilation errors in C++ mode on macOS and FreeBSD.
Bruno Haible [Sun, 8 Dec 2019 11:58:13 +0000 (12:58 +0100)]
Fix compilation errors in C++ mode on macOS and FreeBSD.

* lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on macOS
or FreeBSD with clang, use the approach without C preprocessor macro.

5 years agoFix compilation errors in C++ mode on AIX with xlclang++.
Bruno Haible [Sat, 7 Dec 2019 17:49:45 +0000 (18:49 +0100)]
Fix compilation errors in C++ mode on AIX with xlclang++.

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

* lib/wchar.in.h (mbstate_t): Don't override on AIX.

5 years agoDocument compilation error in C++ mode on NetBSD 8.0.
Bruno Haible [Sat, 7 Dec 2019 14:45:32 +0000 (15:45 +0100)]
Document compilation error in C++ mode on NetBSD 8.0.

* doc/posix-headers/monetary.texi: Mention the NetBSD bug.

5 years agoFix compilation errors in C++ mode on Solaris 10.
Bruno Haible [Sat, 7 Dec 2019 14:13:57 +0000 (15:13 +0100)]
Fix compilation errors in C++ mode on Solaris 10.

* m4/stdbool.m4 (AM_STDBOOL_H): Require AC_CANONICAL_HOST. Set STDBOOL_H
to non-empty on Solaris with a non-GCC compiler.
* doc/posix-headers/stdbool.texi: Mention the Solaris issue.

5 years agoReword NEWS entry.
Bruno Haible [Sat, 7 Dec 2019 09:47:36 +0000 (10:47 +0100)]
Reword NEWS entry.

* NEWS: Reword the latest NEWS entry.

5 years agoMove xstrtol_fatal to a new xstrtol-error module
Pino Toscano [Thu, 5 Dec 2019 15:18:35 +0000 (16:18 +0100)]
Move xstrtol_fatal to a new xstrtol-error module

The xstrtol module provides a xstrtol_fatal function which uses other
modules suitable mostly for command line handling (e.g. gettext,
getopt), and that are completely unused when using only xstrto*
functions. Furthermore, xstrtol_fatal is used only in the xstrtol-tests
(within gnulib itself).

As solution, move the xstrtol_fatal to a new xstrtol-error module,
making xstrtol-tests depend on it. Since the prototype of xstrtol_fatal
is automatically provided by xstrtol.h, it is very difficult to know
whether anyone is actually using it, so add a note about this in NEWS.

* lib/xstrtol.h: Stop including <getopt.h>.
(xstrtol_fatal): Move ...
* lib/xstrtol-error.h: ... here.  New file.
* lib/xstrtol-error.c: Include xstrtol-error.h instead of xstrtol.h.
* tests/test-xstrtol.c: Likewise.
* modules/xstrtol (Files): Remove lib/xstrtol-error.c.
(Depends-on): Remove exitfail, error, getopt-gnu, and gettext-h.
(Makefile.am): Remove xstrtol-error.c from lib_SOURCES.
* modules/xstrtol-error: New file.
* modules/xstrtol-tests (Depends-on): Add xstrtol-error.
* MODULES.html.sh: Add xstrtol-error.
* NEWS: Document the change.

5 years agonstrftime: better width support for %N, %z
Paul Eggert [Fri, 6 Dec 2019 22:48:04 +0000 (14:48 -0800)]
nstrftime: better width support for %N, %z

* lib/nstrftime.c (width_add, width_add1, width_cpy):
New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding
a new WIDTH parameter.
(add, add1, cpy): Use these macros.
(width_add): Do not treat digits == 0 as a special case,
do not pad if padding is ‘-’, and do not use a negative width.
(__strftime_internal): Redo formatting of nanoseconds and numeric
timezones to avoid buffer misuse in unusual cases, and so that
widths make more sense.  Add support for widths greater than 9 to
the %N format; they are zero filled on the right.
* tests/test-nstrftime.c (posixtm_test): Add a %12N test.

5 years agoFix compilation errors in C++ mode on Solaris 10 and Solaris 11.
Bruno Haible [Thu, 5 Dec 2019 21:25:04 +0000 (22:25 +0100)]
Fix compilation errors in C++ mode on Solaris 10 and Solaris 11.

* m4/isfinite.m4 (gl_ISFINITE): Require AC_CANONICAL_HOST. On Solaris,
set REPLACE_ISFINITE to 1.
* m4/isinf.m4 (gl_ISINF): Require AC_CANONICAL_HOST. On Solaris, set
REPLACE_ISINF to 1.
* m4/signbit.m4 (gl_SIGNBIT): On Solaris, set REPLACE_SIGNBIT to 1.
* lib/pthread.in.h (pthread_create, pthread_once, pthread_key_create):
Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
* lib/threads.in.h (call_once): Likewise.
* lib/iconv.in.h (iconv): Likewise.

5 years agowchar: Add more C++ tests.
Bruno Haible [Thu, 5 Dec 2019 08:18:13 +0000 (09:18 +0100)]
wchar: Add more C++ tests.

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

* tests/test-wchar-c++3.cc: New file.
* modules/wchar-c++-tests (Files): Add it.
(Makefile.am): Compile it.

5 years agoAdd more C++ tests.
Bruno Haible [Thu, 5 Dec 2019 08:11:45 +0000 (09:11 +0100)]
Add more C++ tests.

assert-h: Add C++ tests.
* tests/test-assert-h-c++.cc: New file.
* tests/test-assert-h-c++2.cc: New file.
* modules/assert-h-c++-tests: New file.
* modules/assert-h-tests: New file.

ctype: Add C++ tests.
* tests/test-ctype-c++.cc: New file.
* tests/test-ctype-c++2.cc: New file.
* modules/ctype-c++-tests: New file.
* modules/ctype-tests (Depends-on): Add ctype-c++-tests.

errno: Add C++ tests.
* tests/test-errno-c++.cc: New file.
* tests/test-errno-c++2.cc: New file.
* modules/errno-c++-tests: New file.
* modules/errno-tests (Depends-on): Add errno-c++-tests.

float: Add C++ tests.
* tests/test-float-c++.cc: New file.
* tests/test-float-c++2.cc: New file.
* modules/float-c++-tests: New file.
* modules/float-tests (Depends-on): Add float-c++-tests.

inttypes: Add more C++ tests.
* tests/test-inttypes-c++2.cc: New file.
* modules/inttypes-c++-tests (Files): Add it.
(Makefile.am): Compile it.

limits-h: Add C++ tests.
* tests/test-limits-h-c++.cc: New file.
* tests/test-limits-h-c++2.cc: New file.
* modules/limits-h-c++-tests: New file.
* modules/limits-h-tests (Depends-on): Add limits-h-c++-tests.

stdarg: Add C++ tests.
* tests/test-stdarg-c++.cc: New file.
* tests/test-stdarg-c++2.cc: New file.
* modules/stdarg-c++-tests: New file.
* modules/stdarg-tests: New file.

stdbool: Add C++ tests.
* tests/test-stdbool-c++.cc: New file.
* tests/test-stdbool-c++2.cc: New file.
* modules/stdbool-c++-tests: New file.
* modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.

stddef: Add C++ tests.
* tests/test-stddef-c++.cc: New file.
* tests/test-stddef-c++2.cc: New file.
* modules/stddef-c++-tests: New file.
* modules/stddef-tests (Depends-on): Add stddef-c++-tests.

stdint: Add C++ tests.
* tests/test-stdint-c++.cc: New file.
* tests/test-stdint-c++2.cc: New file.
* modules/stdint-c++-tests: New file.
* modules/stdint-tests (Depends-on): Add stdint-c++-tests.

wchar: Add more C++ tests.
* tests/test-wchar-c++2.cc: New file.
* modules/wchar-c++-tests (Files): Add it.
(Makefile.am): Compile it.

wctype-h: Add more C++ tests.
* tests/test-wctype-h-c++2.cc: New file.
* modules/wctype-h-c++-tests (Files): Add it.
(Makefile.am): Compile it.

5 years agoFix compilation errors in C++ mode with xlclang++ on AIX.
Bruno Haible [Thu, 5 Dec 2019 08:50:01 +0000 (09:50 +0100)]
Fix compilation errors in C++ mode with xlclang++ on AIX.

* lib/pthread.in.h (pthread_exit): Add comment.
* lib/threads.in.h (thrd_exit): Likewise.

5 years agoFix compilation errors in C++ mode with xlclang++ on AIX.
Bruno Haible [Thu, 5 Dec 2019 02:18:42 +0000 (03:18 +0100)]
Fix compilation errors in C++ mode with xlclang++ on AIX.

* lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in
C++ mode on AIX.
(isfinite, signbit): In C++ mode on AIX with clang, use the approach
without C preprocessor macro.
* lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.
* lib/threads.in.h (thrd_exit): Likewise.

5 years agoFix compilation error in C++ mode on Solaris 11 OpenIndiana.
Bruno Haible [Wed, 4 Dec 2019 11:20:44 +0000 (12:20 +0100)]
Fix compilation error in C++ mode on Solaris 11 OpenIndiana.

* lib/wchar.in.h (wcsnrtombs): Force declaration in C++ mode on Solaris.
* doc/posix-functions/wcsnrtombs.texi: Mention the issue.

5 years agoDisable more _GL_CXXALIASWARN on all platforms other than glibc systems.
Bruno Haible [Wed, 4 Dec 2019 03:49:58 +0000 (04:49 +0100)]
Disable more _GL_CXXALIASWARN on all platforms other than glibc systems.

* lib/wchar.in.h (wcsnrtombs, wcwidth, wcswidth): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* lib/wctype.in.h (iswalnum, iswalpha, iswcntrl, iswdigit, iswgraph,
iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit, wctype,
iswctype, towlower, towupper): Likewise.

5 years agoAvoid hassles caused by [[noreturn]] in C++.
Bruno Haible [Tue, 3 Dec 2019 08:19:17 +0000 (09:19 +0100)]
Avoid hassles caused by [[noreturn]] in C++.

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

* m4/gnulib-common.m4 (gl_COMMON_BODY): Disable the use of [[noreturn]].
* lib/_Noreturn.h: Likewise.

5 years agoFix mistakes in --enable-threads=isoc fixes from 2019-12-01.
Bruno Haible [Tue, 3 Dec 2019 03:54:53 +0000 (04:54 +0100)]
Fix mistakes in --enable-threads=isoc fixes from 2019-12-01.

* m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Use LIBPMULTITHREAD, not
LIBMULTITHREAD.
* m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise.
* m4/pthread-thread.m4 (gl_PTHREAD_THREAD): Likewise.
* m4/timer_time.m4 (gl_TIMER_TIME): Likewise. Require gl_PTHREADLIB, not
gl_THREADLIB.
* modules/timer-time (Depends-on): Add pthread-h. Remove threadlib.

5 years agoFix some more link errors with --enable-threads=isoc.
Bruno Haible [Tue, 3 Dec 2019 02:49:30 +0000 (03:49 +0100)]
Fix some more link errors with --enable-threads=isoc.

* modules/pthread-mutex (Depends-on): Test $gl_threads_api differently.
* modules/pthread-rwlock (Depends-on): Likewise.

5 years agoFix link errors with --enable-threads=posix on AIX.
Bruno Haible [Tue, 3 Dec 2019 01:04:23 +0000 (02:04 +0100)]
Fix link errors with --enable-threads=posix on AIX.

* modules/string-c++-tests (Makefile.am): Link the test-string-c++
program with $(LIBTHREAD).
* modules/wchar-c++-tests (Makefile.am): Link the test-wchar-c++
program with $(LIBTHREAD).

5 years agoFix link errors with --enable-threads=posix on AIX.
Bruno Haible [Mon, 2 Dec 2019 22:18:20 +0000 (23:18 +0100)]
Fix link errors with --enable-threads=posix on AIX.

* modules/mbrtowc (Link): New section.
* modules/acl (Link): Likewise.
* modules/argmatch (Link): Likewise.
* modules/backup-rename (Link): Likewise.
* modules/backupfile (Link): Likewise.
* modules/closein (Link): Likewise.
* modules/closeout (Link): Likewise.
* modules/copy-file (Link): Likewise.
* modules/csharpcomp (Link): Likewise.
* modules/csharpexec (Link): Likewise.
* modules/dfa (Link): Likewise.
* modules/exclude (Link): Likewise.
* modules/fnmatch (Link): Likewise.
* modules/fnmatch-gnu (Link): Likewise.
* modules/fnmatch-posix (Link): Likewise.
* modules/glob (Link): Likewise.
* modules/human (Link): Likewise.
* modules/javacomp (Link): Likewise.
* modules/javaexec (Link): Likewise.
* modules/javaversion (Link): Likewise.
* modules/mbfile (Link): Likewise.
* modules/mbiter (Link): Likewise.
* modules/mbmemcasecmp (Link): Likewise.
* modules/mbmemcasecoll (Link): Likewise.
* modules/mbrlen (Link): Likewise.
* modules/mbscasecmp (Link): Likewise.
* modules/mbscasestr (Link): Likewise.
* modules/mbschr (Link): Likewise.
* modules/mbscspn (Link): Likewise.
* modules/mbsinit (Link): Likewise.
* modules/mbslen (Link): Likewise.
* modules/mbsncasecmp (Link): Likewise.
* modules/mbsnlen (Link): Likewise.
* modules/mbsnrtowcs (Link): Likewise.
* modules/mbspbrk (Link): Likewise.
* modules/mbspcasecmp (Link): Likewise.
* modules/mbsrchr (Link): Likewise.
* modules/mbsrtowcs (Link): Likewise.
* modules/mbssep (Link): Likewise.
* modules/mbsspn (Link): Likewise.
* modules/mbsstr (Link): Likewise.
* modules/mbstok_r (Link): Likewise.
* modules/mbswidth (Link): Likewise.
* modules/mbuiter (Link): Likewise.
* modules/mkdir-p (Link): Likewise.
* modules/propername (Link): Likewise.
* modules/quote (Link): Likewise.
* modules/quotearg (Link): Likewise.
* modules/quotearg-simple (Link): Likewise.
* modules/regex-quote (Link): Likewise.
* modules/rpmatch (Link): Likewise.
* modules/sh-quote (Link): Likewise.
* modules/system-quote (Link): Likewise.
* modules/trim (Link): Likewise.
* modules/unistdio/ulc-asnprintf (Link): Likewise.
* modules/unistdio/ulc-fprintf (Link): Likewise.
* modules/unistdio/ulc-vasnprintf (Link): Likewise.
* modules/unistdio/ulc-vasprintf (Link): Likewise.
* modules/unistdio/ulc-vfprintf (Link): Likewise.
* modules/unistdio/ulc-vsnprintf (Link): Likewise.
* modules/unistdio/ulc-vsprintf (Link): Likewise.
* modules/xfreopen (Link): Likewise.
* modules/xmemcoll (Link): Likewise.
* modules/yesno (Link): Likewise.
* modules/acl-tests (Makefile.am): Link the programs with $(LIBTHREAD).
* modules/argmatch-tests (Makefile.am): Likewise.
* modules/closein-tests (Makefile.am): Likewise.
* modules/copy-file-tests (Makefile.am): Likewise.
* modules/dfa-tests (Makefile.am): Likewise.
* modules/fnmatch-tests (Makefile.am): Likewise.
* modules/glob-tests (Makefile.am): Likewise.
* modules/mbmemcasecmp-tests (Makefile.am): Likewise.
* modules/mbmemcasecoll-tests (Makefile.am): Likewise.
* modules/mbrtowc-tests (Makefile.am): Likewise.
* modules/mbscasecmp-tests (Makefile.am): Likewise.
* modules/mbscasestr-tests (Makefile.am): Likewise.
* modules/mbschr-tests (Makefile.am): Likewise.
* modules/mbscspn-tests (Makefile.am): Likewise.
* modules/mbsinit-tests (Makefile.am): Likewise.
* modules/mbsncasecmp-tests (Makefile.am): Likewise.
* modules/mbsnrtowcs-tests (Makefile.am): Likewise.
* modules/mbspbrk-tests (Makefile.am): Likewise.
* modules/mbspcasecmp-tests (Makefile.am): Likewise.
* modules/mbsrchr-tests (Makefile.am): Likewise.
* modules/mbsrtowcs-tests (Makefile.am): Likewise.
* modules/mbsspn-tests (Makefile.am): Likewise.
* modules/mbsstr-tests (Makefile.am): Likewise.
* modules/quotearg-tests (Makefile.am): Likewise.
* modules/quotearg-simple-tests (Makefile.am): Likewise.
* modules/readtokens-tests (Makefile.am): Likewise.
* modules/regex-quote-tests (Makefile.am): Likewise.
* modules/sh-quote-tests (Makefile.am): Likewise.
* modules/system-quote-tests (Makefile.am): Likewise.
* modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
* modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
* modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
* modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
* modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
* modules/yesno-tests (Makefile.am): Likewise.

5 years agoSimplify link sections.
Bruno Haible [Mon, 2 Dec 2019 10:07:36 +0000 (11:07 +0100)]
Simplify link sections.

* modules/threadlib (Link): Stop mentioning LTLIBTHREAD.
* modules/lock (Link): Likewise.
* modules/cond (Link): Likewise.
* modules/tls (Link): Likewise.
* modules/yield (Link): Likewise.
* modules/regex (Link): Likewise.
* modules/localename (Link): Likewise.
* modules/unicase/locale-language (Link): Likewise.
* modules/thread (Link): Stop mentioning LTLIBMULTITHREAD.

5 years agothread tests: Avoid link error with --enable-threads=isoc+posix on AIX.
Bruno Haible [Mon, 2 Dec 2019 09:59:21 +0000 (10:59 +0100)]
thread tests: Avoid link error with --enable-threads=isoc+posix on AIX.

* tests/test-thread_self.c (main): Disable test on AIX.

5 years agopthread-h: Fix link errors with --enable-threads=isoc on AIX.
Bruno Haible [Mon, 2 Dec 2019 01:39:38 +0000 (02:39 +0100)]
pthread-h: Fix link errors with --enable-threads=isoc on AIX.

* m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from
gl_THREADLIB_EARLY_BODY.
(gl_THREADLIB_EARLY_BODY): Invoke it.
(gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY.
(gl_THREADLIB_BODY): Invoke it.
(gl_PTHREADLIB): New macro.
* m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require
gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is
present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD.
* modules/pthread-h (Files): Add threadlib.m4.
(Depends-on): Remove threadlib.
(configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT
and _THREAD_SAFE here.
(Link): Use LIBPTHREAD, not LIBTHREAD.
* modules/pthread-thread (Link): Use LIBPMULTITHREAD, not
LIBMULTITHREAD.
* modules/pthread-once (Link): Likewise.
* modules/pthread-mutex (Link): Likewise.
* modules/pthread-rwlock (Link): Likewise.
* modules/pthread-cond (Link): Likewise.
* modules/pthread-tss (Link): Likewise.
* modules/pthread-spin (Link): Likewise.
* modules/pthread (Link): Likewise.
* modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise.
* modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise.
* modules/pthread-once-tests (test_pthread_once1_LDADD,
test_pthread_once2_LDADD): Likewise.
* modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise.
* modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise.
* modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise.
* modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise.

5 years agocond: State linking requirements.
Bruno Haible [Sun, 1 Dec 2019 16:23:12 +0000 (17:23 +0100)]
cond: State linking requirements.

* modules/cond (Link): New section.

5 years agothreadlib: Remove unnecessary file (left over from 2019-07-06).
Bruno Haible [Sun, 1 Dec 2019 16:10:11 +0000 (17:10 +0100)]
threadlib: Remove unnecessary file (left over from 2019-07-06).

* modules/threadlib (Files): Remove config.rpath.

5 years agoEdit gnulib-tool.py.TODO.
Bruno Haible [Sat, 30 Nov 2019 14:03:46 +0000 (15:03 +0100)]
Edit gnulib-tool.py.TODO.

* gnulib-tool.py.TODO: Group related commits.

5 years agoTODO list for gnulib-tool.py.TODO, compared to gnulib-tool.
Bruno Haible [Sat, 30 Nov 2019 12:11:55 +0000 (13:11 +0100)]
TODO list for gnulib-tool.py.TODO, compared to gnulib-tool.

5 years agognulib-tool.py: Fix libgnu_la_LDFLAGS section in generated Makefile.am.
Tim Rühsen [Sat, 30 Nov 2019 12:04:28 +0000 (13:04 +0100)]
gnulib-tool.py: Fix libgnu_la_LDFLAGS section in generated Makefile.am.

Reported by Dagobert Michelsen <dam@opencsw.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00086.html>.

* pygnulib/GLModuleSystem.py (getLink): Don't join the parts. Return a
list of strings instead of one string.
* pygnulib/GLEmiter.py (lib_Makefile_am): Adapt accordingly.
* pygnulib/GLImport.py (execute): Likewise.

5 years agoopenpty, forkpty: Fix build error on Solaris 11.4.
Bruno Haible [Wed, 27 Nov 2019 23:34:34 +0000 (00:34 +0100)]
openpty, forkpty: Fix build error on Solaris 11.4.

* m4/pty_h.m4 (gl_PTY_H): Test for termios.h. Look for the declarations
also in <termios.h>.
* m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Look for the declaration
of the function also in <termios.h>.
* doc/glibc-functions/openpty.texi: Mention the Solaris 11.4 problems.
* doc/glibc-functions/forkpty.texi: Likewise.

5 years agoNew options --enable-threads=isoc and --enable-threads=isoc+posix.
Bruno Haible [Wed, 27 Nov 2019 05:03:21 +0000 (06:03 +0100)]
New options --enable-threads=isoc and --enable-threads=isoc+posix.

* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Accept the options
--enable-threads=isoc and --enable-threads=isoc+posix.
(gl_THREADLIB_BODY): Test whether the ISO C threads API is available.
When both the ISO C and the POSIX threads API are available, choose
USE_ISOC_AND_POSIX_THREADS instead of USE_POSIX_THREADS if
--enable-threads=isoc+posix was specified. When only the ISO C threads
API is available and --enable-threads=iso was specified, choose
USE_ISOC_THREADS.
* lib/glthread/lock.h: Add new code for USE_ISOC_THREADS ||
USE_ISOC_AND_POSIX_THREADS.
* lib/glthread/lock.c: Likewise.
* lib/glthread/cond.h: Likewise.
* lib/glthread/cond.c: Likewise.
* lib/glthread/tls.h: Likewise.
* lib/glthread/tls.c: Likewise.
* lib/glthread/yield.h: Likewise.
* lib/glthread/thread.h: Add new code for USE_ISOC_THREADS. Treat
USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS.
* lib/glthread/thread.c: Likewise.
* lib/glthread/threadlib.c: Likewise.
* tests/test-lock.c: Save and restore the values of USE_ISOC_THREADS and
USE_ISOC_AND_POSIX_THREADS.
* tests/test-cond.c: Consider USE_ISOC_THREADS and
USE_ISOC_AND_POSIX_THREADS.
* tests/test-tls.c: Likewise.
* tests/test-thread_create.c (main): Likewise.
* tests/test-pthread-cond.c: Likewise.
* tests/test-pthread-mutex.c: Likewise.
* tests/test-pthread-once2.c: Likewise.
* tests/test-pthread-rwlock.c: Likewise.
* tests/test-pthread-tss.c: Likewise.
* tests/test-pthread_sigmask2.c: Treat USE_ISOC_AND_POSIX_THREADS like
USE_POSIX_THREADS.

5 years agombrtowc: Modernize autoconf test.
Bruno Haible [Sun, 24 Nov 2019 19:31:50 +0000 (20:31 +0100)]
mbrtowc: Modernize autoconf test.

* m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Require
gt_LOCALE_FR_UTF8. If a traditional Japanese locale is not available,
try a UTF-8 locale.
* doc/posix-functions/mbrtowc.texi: Update info about AIX.

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.