]> Savannah Git Hosting - gnulib.git/log
gnulib.git
6 years agononblocking-socket-tests: Fix test failure on Android 4.3.
Bruno Haible [Sat, 26 Jan 2019 17:55:39 +0000 (18:55 +0100)]
nonblocking-socket-tests: Fix test failure on Android 4.3.

* tests/test-nonblocking-socket.h (SOCKET_HAS_LARGE_BUFFER): Define to 1
also on Android.

6 years agosh-filename: Add support for Android 4.3.
Bruno Haible [Sat, 26 Jan 2019 14:40:31 +0000 (15:40 +0100)]
sh-filename: Add support for Android 4.3.

* m4/sh-filename.m4 (gl_SH_FILENAME): Set to "sh" on Android.

6 years agoptsname_r: Work around bug on Android 4.3.
Bruno Haible [Sat, 26 Jan 2019 14:23:19 +0000 (15:23 +0100)]
ptsname_r: Work around bug on Android 4.3.

* m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Define
HAVE_ESSENTIALLY_WORKING_PTSNAME_R. Test whether the return value is
correct.
* lib/ptsname_r.c (__ptsname_r): If HAVE_ESSENTIALLY_WORKING_PTSNAME_R
is defined, just fix the return value.
* doc/glibc-functions/ptsname_r.texi: Mention the Android bug. Reword:
The behaviour of musl libc is nothing to be "fixed", since it is
compliant with the next POSIX standard.

6 years agottyname_r: Work around bug on Android 4.3.
Bruno Haible [Sat, 26 Jan 2019 10:56:31 +0000 (11:56 +0100)]
ttyname_r: Work around bug on Android 4.3.

* m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is a stub.
* lib/ttyname_r.c (ttyname_r): Implement for Android.
* doc/posix-functions/ttyname_r.texi: Mention the Android bug.
* doc/posix-functions/ttyname.texi: Likewise.

6 years agogetprogname: Port to Android 4.3.
Bruno Haible [Fri, 25 Jan 2019 23:03:51 +0000 (00:03 +0100)]
getprogname: Port to Android 4.3.

* lib/getprogname.c (getprogname): On Android, take only the last
component of __progname.

6 years agowcrtomb: Work around bug on Android 4.3.
Bruno Haible [Fri, 25 Jan 2019 22:39:28 +0000 (23:39 +0100)]
wcrtomb: Work around bug on Android 4.3.

* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test also whether wcrtomb works in
the C locale.
* lib/wcrtomb.c (wcrtomb): Provide alternate implementation for Android,
which does not have the 'wctomb' function.
* doc/posix-functions/wcrtomb.texi: Mention the Android bug.
* tests/test-wcrtomb.c (main): Accept argument '5'.
* tests/test-wcrtomb.sh: Add tests in the POSIX locale.

6 years agosetlocale: Work around bug on Android 4.3.
Bruno Haible [Fri, 25 Jan 2019 22:26:24 +0000 (23:26 +0100)]
setlocale: Work around bug on Android 4.3.

* m4/setlocale.m4 (gl_FUNC_SETLOCALE): Test whether setlocale supports
the "C" locale.
* lib/setlocale.c (setlocale_unixlike): New wrapper for Android.
* doc/posix-functions/setlocale.texi: Mention the Android bug.

6 years agomemchr: Work around bug on Android <= 5.0.
Bruno Haible [Fri, 25 Jan 2019 02:54:09 +0000 (03:54 +0100)]
memchr: Work around bug on Android <= 5.0.

* m4/memchr.m4 (gl_FUNC_MEMCHR): Add test against the Android bug.
* doc/posix-functions/memchr.texi: Mention the Android bug.

6 years agorandom: Fix compilation error on Android 4.3.
Bruno Haible [Fri, 25 Jan 2019 00:36:26 +0000 (01:36 +0100)]
random: Fix compilation error on Android 4.3.

* lib/stdlib.in.h (random, srandom): Test also REPLACE_RANDOM.
(initstate): Test REPLACE_INITSTATE and HAVE_INITSTATE, not HAVE_RANDOM.
(setstate): Test REPLACE_SETSTATE and HAVE_SETSTATE, not HAVE_RANDOM.
* m4/random.m4 (gl_FUNC_RANDOM): Set HAVE_INITSTATE, HAVE_SETSTATE,
REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_INITSTATE,
HAVE_SETSTATE, REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
* modules/stdlib (Makefile.am): Substitute HAVE_INITSTATE, HAVE_SETSTATE,
REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
* modules/random (Depends-on, configure.ac): Test also REPLACE_RANDOM,
REPLACE_INITSTATE, REPLACE_SETSTATE.
* doc/posix-functions/random.texi: Correct the description of the
situation on Android.
* doc/posix-functions/srandom.texi: Likewise.
* doc/posix-functions/rand.texi: Likewise.
* doc/posix-functions/srand.texi: Likewise.

6 years agombtowc: Fix compilation error on Android 4.3.
Bruno Haible [Thu, 24 Jan 2019 23:42:40 +0000 (00:42 +0100)]
mbtowc: Fix compilation error on Android 4.3.

* lib/stdlib.in.h (mbtowc): Test also HAVE_MBTOWC.
* m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test whether mbtowc exists. Set
HAVE_MBTOWC.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbtowc is declared.
(gl_STDLIB_H_DEFAULTS): Initialize HAVE_MBTOWC.
* modules/stdlib (Makefile.am): Substitute HAVE_MBTOWC.
* modules/mbtowc (Depends-on, configure.ac): Test also HAVE_MBTOWC.
* doc/posix-functions/mbtowc.texi: Mention the change.

6 years agofdatasync: Fix compilation error on Android 4.3.
Bruno Haible [Thu, 24 Jan 2019 23:15:50 +0000 (00:15 +0100)]
fdatasync: Fix compilation error on Android 4.3.

* m4/fdatasync.m4 (gl_FUNC_FDATASYNC): On platforms other than Solaris,
test whether fdatasync() exists.

6 years agounlinkat: Fix compilation error on Android 4.3.
Bruno Haible [Thu, 24 Jan 2019 23:08:52 +0000 (00:08 +0100)]
unlinkat: Fix compilation error on Android 4.3.

* lib/unistd.in.h: Include <fcntl.h> when module 'unlinkat' is in use
also on Android.
* doc/posix-functions/unlinkat.texi: Mention the issue.

6 years agorenameat: Fix compilation error on Android 4.3.
Bruno Haible [Thu, 24 Jan 2019 23:03:12 +0000 (00:03 +0100)]
renameat: Fix compilation error on Android 4.3.

* lib/stdio.in.h: Include <sys/stat.h> when module 'renameat' is in use.
* doc/posix-functions/renameat.texi: Mention the issue.

6 years agofchownat: Fix compilation error on Android 4.3.
Bruno Haible [Thu, 24 Jan 2019 22:51:11 +0000 (23:51 +0100)]
fchownat: Fix compilation error on Android 4.3.

* lib/unistd.in.h: Include <sys/stat.h> when module 'fchownat' is in
use.
* m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Include also <sys/stat.h>.
* doc/posix-functions/fchownat.texi: Mention the issue.

6 years agognulib-tool: Support running testdirs on Android.
Bruno Haible [Wed, 23 Jan 2019 04:11:54 +0000 (05:11 +0100)]
gnulib-tool: Support running testdirs on Android.

* build-aux/test-driver.diff: New file.
* gnulib-tool (func_create_testdir, func_create_megatestdir): Patch
build-aux/test-driver after running automake.

6 years agorelocatable-prog: add a comment
Akim Demaille [Thu, 24 Jan 2019 06:37:10 +0000 (07:37 +0100)]
relocatable-prog: add a comment

* modules/relocatable-prog: Explain the previous commit.
Suggested by Bruno Haible.

6 years agorelocatable-prog: avoid warnings from Automake
Akim Demaille [Wed, 23 Jan 2019 21:42:04 +0000 (22:42 +0100)]
relocatable-prog: avoid warnings from Automake

* modules/relocatable-prog: Don't declare PHONY dependencies in
Automake conditionals.

6 years agoarray-list: Pacify warnings about unused arguments (-Wunused-parameter)
Akim Demaille [Wed, 23 Jan 2019 21:36:54 +0000 (22:36 +0100)]
array-list: Pacify warnings about unused arguments (-Wunused-parameter)

* lib/gl_array_list.c (gl_array_iterator_free): "Use" the argument.

6 years agothreadlib: Revert commit from 2018-06-25. We now have a better fix.
Bruno Haible [Thu, 24 Jan 2019 03:47:08 +0000 (04:47 +0100)]
threadlib: Revert commit from 2018-06-25. We now have a better fix.

* m4/threadlib.m4 (gl_THREADLIB_BODY): Don't attempt to defeat a
preceding -Wl,--as-needed option. Don't check whether the linker
supports --as-needed/--no-as-needed and --push-state/--pop-state.

6 years agothread: Force linking with -lpthread, even when --as-needed is in use.
Bruno Haible [Thu, 24 Jan 2019 03:10:48 +0000 (04:10 +0100)]
thread: Force linking with -lpthread, even when --as-needed is in use.

Reported by Richard W.M. Jones <rjones@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00123.html>.

* lib/glthread/thread.h (pthread_create): Don't declare weak.

6 years agorelocatable: avoid compiler warnings (-Wshadow)
Akim Demaille [Thu, 24 Jan 2019 00:54:22 +0000 (01:54 +0100)]
relocatable: avoid compiler warnings (-Wshadow)

* lib/relocatable.c (compute_curr_prefix): Rename local variables
to avoid name collisions with global variables.

6 years agovasnprintf: Don't use %n on Android.
Bruno Haible [Wed, 23 Jan 2019 00:17:07 +0000 (01:17 +0100)]
vasnprintf: Don't use %n on Android.

Reported and fix suggested by Hugo Beauzée-Luyssen <hugo@beauzee.fr> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-12/msg00123.html>.

* lib/vasnprintf.c (VASNPRINTF): Don’t use %n on Android.

6 years ago*printf: Support cross-compilation to Android.
Bruno Haible [Tue, 22 Jan 2019 21:44:49 +0000 (22:44 +0100)]
*printf: Support cross-compilation to Android.

* m4/printf.m4: Add cross-compilation guesses for Android.

6 years agoautoupdate
Karl Berry [Mon, 21 Jan 2019 17:29:02 +0000 (09:29 -0800)]
autoupdate

6 years agodiacrit: Mark deprecated.
Bruno Haible [Mon, 21 Jan 2019 09:42:13 +0000 (10:42 +0100)]
diacrit: Mark deprecated.

6 years agodiacrit: Mark deprecated.
Bruno Haible [Mon, 21 Jan 2019 09:34:22 +0000 (10:34 +0100)]
diacrit: Mark deprecated.

* modules/diacrit (Status, Notice): Mark as deprecated.
* NEWS: Mention it.

6 years agorintl: Override broken implementation on NetBSD.
Bruno Haible [Sun, 20 Jan 2019 23:33:28 +0000 (00:33 +0100)]
rintl: Override broken implementation on NetBSD.

* lib/math.in.h (rintl): Test also REPLACE_RINTL.
* m4/rintl.m4 (gl_FUNC_RINTL): Add test for negative arguments. Set
REPLACE_RINTL.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_RINTL.
* modules/math (Makefile.in): Substitute REPLACE_RINTL.
* modules/rintl (Depends-on, configure.ac): Test REPLACE_RINTL.
* doc/posix-functions/rintl.texi: Mention the NetBSD bug.

6 years agolog10l: Work around inaccurate implementation on NetBSD.
Bruno Haible [Sun, 20 Jan 2019 22:48:18 +0000 (23:48 +0100)]
log10l: Work around inaccurate implementation on NetBSD.

* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Add test for a certain accuracy.
* lib/log10l.c: Comment out too simplistic override.
* doc/posix-functions/log10l.texi: Mention the NetBSD bug.

6 years agologl: Work around inaccurate implementation on NetBSD.
Bruno Haible [Sun, 20 Jan 2019 21:57:41 +0000 (22:57 +0100)]
logl: Work around inaccurate implementation on NetBSD.

* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Add test for a certain accuracy.
* lib/logl.c: Comment out unused code.
* doc/posix-functions/logl.texi: Mention the NetBSD bug.

6 years agoexpm1l: Work around inaccurate implementation on NetBSD.
Bruno Haible [Sun, 20 Jan 2019 21:28:37 +0000 (22:28 +0100)]
expm1l: Work around inaccurate implementation on NetBSD.

* lib/math.in.h (expm1l): Test also REPLACE_EXPM1L.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Add test for a certain accuracy. Set
REPLACE_EXPM1L.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1L.
* modules/math (Makefile.in): Substitute REPLACE_EXPM1L.
* modules/expm1l (Depends-on, configure.ac): Test REPLACE_EXPM1L.
* doc/posix-functions/expm1l.texi: Mention the NetBSD bug.

6 years agoexpl: Work around inaccurate implementation on NetBSD.
Bruno Haible [Sun, 20 Jan 2019 21:04:01 +0000 (22:04 +0100)]
expl: Work around inaccurate implementation on NetBSD.

* lib/math.in.h (expl): Test also REPLACE_EXPL.
* m4/expl.m4 (gl_FUNC_EXPL): Add test for a certain accuracy. Set
REPLACE_EXPL.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPL.
* modules/math (Makefile.in): Substitute REPLACE_EXPL.
* modules/expl (Depends-on, configure.ac): Test REPLACE_EXPL.
* doc/posix-functions/expl.texi: Mention the NetBSD bug.

6 years agoexp2l: Work around inaccurate implementation on NetBSD.
Bruno Haible [Sun, 20 Jan 2019 20:45:29 +0000 (21:45 +0100)]
exp2l: Work around inaccurate implementation on NetBSD.

* m4/exp2l.m4 (gl_FUNC_EXP2L): Add test for a certain accuracy.
* doc/posix-functions/exp2l.texi: Mention the NetBSD bug.

6 years agofloor, floorl: Avoid autoconf warnings.
Bruno Haible [Sun, 20 Jan 2019 20:33:15 +0000 (21:33 +0100)]
floor, floorl: Avoid autoconf warnings.

* modules/floor (configure.ac): Use AC_REQUIRE.
* modules/floorl (configure.ac): Likewise.

6 years agoDefeat current GCC optimizations in math autoconf tests.
Bruno Haible [Sun, 20 Jan 2019 20:19:41 +0000 (21:19 +0100)]
Defeat current GCC optimizations in math autoconf tests.

* m4/cbrtl.m4 (gl_FUNC_CBRTL): Mark function pointer as 'volatile'.
* m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
* m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
* m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
* m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
* m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
* m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
* m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
* m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
* m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
* m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
* m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
* m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Likewise.
* m4/log.m4 (gl_FUNC_LOG): Likewise.
* m4/logf.m4 (gl_FUNC_LOGF): Likewise.
* m4/log10.m4 (gl_FUNC_LOG10): Likewise.
* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
* m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
* m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
* m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
* m4/log2.m4 (gl_FUNC_LOG2): Likewise.
* m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
* m4/modf.m4 (gl_FUNC_MODF): Likewise.
* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
* m4/round.m4 (gl_FUNC_ROUND): Likewise.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
* m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
* m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
* m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.

6 years agogettext: support disabling use of VLAs
Pádraig Brady [Mon, 14 Jan 2019 06:05:10 +0000 (22:05 -0800)]
gettext: support disabling use of VLAs

* lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined

6 years agoautoupdate
Karl Berry [Sat, 19 Jan 2019 16:42:53 +0000 (08:42 -0800)]
autoupdate

6 years agosys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.
KO Myung-Hun [Thu, 17 Jan 2019 18:40:26 +0000 (19:40 +0100)]
sys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.

* lib/sys_stat.in.h [kLIBC]: Include <unistd.h>.

6 years agofcntl: Fix syntax error (regression from 2018-10-05).
KO Myung-Hun [Thu, 17 Jan 2019 18:32:20 +0000 (19:32 +0100)]
fcntl: Fix syntax error (regression from 2018-10-05).

* lib/fcntl.c (klibc_fcntl): Remove mis-placed ';'.

6 years agoautoupdate
Karl Berry [Tue, 15 Jan 2019 18:00:28 +0000 (10:00 -0800)]
autoupdate

6 years agorelocatable: improve documentation
Akim Demaille [Sun, 13 Jan 2019 18:48:35 +0000 (19:48 +0100)]
relocatable: improve documentation

* doc/relocatable-maint.texi (Supporting Relocation): For
substitutions performed by config.status, we need more variables
(for instance datarootdir defaults to '${prefix}/share' so we need
prefix).

6 years agobackup: update dependencies
Akim Demaille [Sun, 13 Jan 2019 10:16:20 +0000 (11:16 +0100)]
backup: update dependencies

* modules/backup-rename (Depends-on): It now depends on opendirat
instead of opendir.  It also uses stdint, and xalloc-oversized.
But no longer dirfd.
* modules/backupfile (Depends-on): Add xalloc-oversized.

6 years agogetcwd: Fix test failure when building on a Linux 9p file system.
Bruno Haible [Sun, 13 Jan 2019 18:14:10 +0000 (19:14 +0100)]
getcwd: Fix test failure when building on a Linux 9p file system.

* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): On Linux, treat error
EINVAL from mkdir like ENAMETOOLONG.
* tests/test-getcwd.c (test_long_name): Likewise.

6 years agoFix typos found by codespell.
Tim Rühsen [Sat, 12 Jan 2019 14:17:09 +0000 (15:17 +0100)]
Fix typos found by codespell.

* lib/*.[hc]: Fix typos in comments.
* pygnulib/*.py: Fix typos in error messages and comments.

6 years agodoc: Fix documentation about container data types.
Bruno Haible [Sat, 12 Jan 2019 08:50:10 +0000 (09:50 +0100)]
doc: Fix documentation about container data types.

Reported by Werner Lemberg <wl@gnu.org>.

* doc/containers.texi (Container data types): Fix typo.

6 years agoverify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.
Bruno Haible [Thu, 10 Jan 2019 20:06:52 +0000 (21:06 +0100)]
verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.

Reported by Reuben Thomas <rrt@sc3d.org>.

* lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6.

6 years agogetpass: Fix include filename
Tim Rühsen [Tue, 8 Jan 2019 14:50:28 +0000 (15:50 +0100)]
getpass: Fix include filename

* modules/getpass: Fix unistd,h -> unistd.h

6 years agomaintainer-makefile: Make the configure.ac section optional.
Bruno Haible [Sun, 6 Jan 2019 21:30:13 +0000 (22:30 +0100)]
maintainer-makefile: Make the configure.ac section optional.

* top/maint.mk (GREP, SED): Define if not defined.

6 years agolocalename: Assume setlocale function.
Bruno Haible [Sun, 6 Jan 2019 20:22:38 +0000 (21:22 +0100)]
localename: Assume setlocale function.

* lib/localename.c (gl_locale_name_posix): Assume setlocale exists.
* m4/localename.m4 (gl_LOCALENAME): Don't test whether setlocale exists.

6 years agodoc: Add documentation about container data types.
Bruno Haible [Sun, 6 Jan 2019 19:53:44 +0000 (20:53 +0100)]
doc: Add documentation about container data types.

* doc/containers.texi: New file.
* doc/gnulib.texi (Particular Modules): Include it.

6 years agodoc: Update documentation about 'progname' module.
Bruno Haible [Sun, 6 Jan 2019 15:57:56 +0000 (16:57 +0100)]
doc: Update documentation about 'progname' module.

* doc/progname.texi: Rename from doc/error.texi. Change node name and
title. Rewrite.
* doc/gnulib.texi (Particular Modules): Update.

6 years agodoc: Document the xstdopen and *-safer modules.
Bruno Haible [Sun, 6 Jan 2019 14:58:46 +0000 (15:58 +0100)]
doc: Document the xstdopen and *-safer modules.

* doc/xstdopen.texi: New file.
* doc/gnulib.texi (Particular Modules): Include it.

6 years agoxstdopen: Add tests.
Bruno Haible [Sun, 6 Jan 2019 08:27:42 +0000 (09:27 +0100)]
xstdopen: Add tests.

* tests/test-xstdopen.c: New file.
* tests/test-xstdopen.sh: New file.
* modules/xstdopen-tests: New file.

6 years agoxstdopen: New module.
Bruno Haible [Sun, 6 Jan 2019 08:25:59 +0000 (09:25 +0100)]
xstdopen: New module.

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

6 years agostdopen: Fix compilation error with IRIX cc.
Bruno Haible [Sun, 6 Jan 2019 08:24:04 +0000 (09:24 +0100)]
stdopen: Fix compilation error with IRIX cc.

* lib/stdopen.c (stdopen): Do not use C99-style decl in loop.

6 years agoxfreopen need not include stdio--.h
Paul Eggert [Sun, 6 Jan 2019 02:55:19 +0000 (18:55 -0800)]
xfreopen need not include stdio--.h

* lib/xfreopen.c: Do not include stdio--.h.

6 years agoxfreopen need not depend on freopen-safer
Paul Eggert [Sun, 6 Jan 2019 02:03:10 +0000 (18:03 -0800)]
xfreopen need not depend on freopen-safer

* modules/xfreopen (Depends-on):
Depend on freopen, not freopen-safer.

6 years agostdopen: modernize and simplify
Paul Eggert [Sun, 6 Jan 2019 02:02:32 +0000 (18:02 -0800)]
stdopen: modernize and simplify

* lib/stdopen.c: Update copyright date
Do not include sys/types.h; no longer needed these days.
(stdopen): Use C99-style decl in loop.  Return int errno
value, rather than just a bool.  Do not worry about fd mismatches,
since the caller cares only if 0, 1, 2 are occupied.
* lib/stdopen.h: No need to include <stdbool.h>.
* m4/stdopen.m4: Remove.
* modules/stdopen: New file.

6 years agostdopen: copy from last use in coreutils
Paul Eggert [Sat, 5 Jan 2019 19:02:51 +0000 (11:02 -0800)]
stdopen: copy from last use in coreutils

* lib/stdopen.c, lib/stdopen.h, m4/stdopen.m4:
New files, taken from their last commit in coreutils
2007-07-23T12:35:58Z!jim@meyering.net
71aa3ea88084d17bcb4fc1031ad7b66f8647115e.

6 years agoautoupdate
Karl Berry [Sat, 5 Jan 2019 16:19:47 +0000 (08:19 -0800)]
autoupdate

6 years agoargp: Don't pass an invalid argument to dgettext().
Bruno Haible [Sat, 5 Jan 2019 16:15:29 +0000 (17:15 +0100)]
argp: Don't pass an invalid argument to dgettext().

Reported by He X <xw897002528@gmail.com>.

* lib/argp-help.c (print_header, argp_doc): Don't pass a NULL doc to
dgettext().

6 years agoargp: Don't pass an invalid argument to dgettext().
Bruno Haible [Sat, 5 Jan 2019 16:00:53 +0000 (17:00 +0100)]
argp: Don't pass an invalid argument to dgettext().

Reported by He X <xw897002528@gmail.com>.

* lib/argp.h (struct argp): Clarify that the args_doc field may be NULL.
* lib/argp-help.c (argp_args_usage): Don't pass a NULL args_doc to
dgettext().

6 years agostdioext: port to newer 32-bit Android
Paul Eggert [Sun, 23 Dec 2018 02:00:10 +0000 (18:00 -0800)]
stdioext: port to newer 32-bit Android

Problem reported by Tom Yan in:
https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html
* lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro.
(fp_) [__ANDROID__]: Use it.

6 years agolock: Fix link error with --enable-threads=pth.
Bruno Haible [Sat, 5 Jan 2019 01:37:39 +0000 (02:37 +0100)]
lock: Fix link error with --enable-threads=pth.

* lib/glthread/lock.h (pth_cond_init, pth_cond_await, pth_cond_notify):
Mark as weak.

6 years agoFix link errors in unit tests.
Bruno Haible [Fri, 4 Jan 2019 19:31:18 +0000 (20:31 +0100)]
Fix link errors in unit tests.

Reported by Tom G. Christensen <tgc@jupiterrise.com>.

* modules/bitset-tests (Makefile.am): Link test-bitset against libintl.
* modules/array-map-tests (Makefile.am): Link test-array_map against
libintl.
* modules/array-set-tests (Makefile.am): Link test-array_set against
libintl.
* modules/hash-map-tests (Makefile.am): Link test-hash_map against
libintl.
* modules/hash-set-tests (Makefile.am): Link test-hash_set against
libintl.
* modules/linkedhash-map-tests (Makefile.am): Link test-linkedhash_map
against libintl.
* modules/linkedhash-set-tests (Makefile.am): Link test-linkedhash_set
against libintl.

6 years agoFix incorrect 'Link' sections.
Bruno Haible [Fri, 4 Jan 2019 19:20:24 +0000 (20:20 +0100)]
Fix incorrect 'Link' sections.

* modules/regex (Link): Mention the link requirement of module 'lock'.
* modules/regex-tests (Makefile.am): Don't use LIB_PTHREAD.

6 years agoFix some 'Link' sections.
Bruno Haible [Fri, 4 Jan 2019 19:04:57 +0000 (20:04 +0100)]
Fix some 'Link' sections.

* modules/c-stack (Link): Add link directive from the 'gettext-h'
dependency.
* modules/getaddrinfo (Link): Likewise.

6 years agoRemove redundant 'Link' sections.
Bruno Haible [Fri, 4 Jan 2019 18:59:03 +0000 (19:59 +0100)]
Remove redundant 'Link' sections.

* modules/canon-host (Link): Remove section.
* modules/timevar (Link): Likewise.

6 years agoRemove incorrect 'Link' sections.
Bruno Haible [Fri, 4 Jan 2019 18:44:39 +0000 (19:44 +0100)]
Remove incorrect 'Link' sections.

* modules/acl (Link): Remove section. Use combined 'Link' sections from
the dependencies instead.
* modules/crypto/md5 (Link): Likewise.
* modules/crypto/sha1 (Link): Likewise.
* modules/crypto/sha256 (Link): Likewise.
* modules/crypto/sha512 (Link): Likewise.
* modules/faccessat (Link): Likewise.
* modules/fdutimensat (Link): Likewise.
* modules/iconv_open-utf (Link): Likewise.
* modules/propername (Link): Likewise.
* modules/qacl (Link): Likewise.
* modules/unicodeio (Link): Likewise.
* modules/utimecmp (Link): Likewise.
* modules/utimensat (Link): Likewise.
* modules/xstriconv (Link): Likewise.
* modules/xstriconveh (Link): Likewise.

6 years agognulib-tool: New option --extract-recursive-link-directive.
Bruno Haible [Fri, 4 Jan 2019 18:34:19 +0000 (19:34 +0100)]
gnulib-tool: New option --extract-recursive-link-directive.

* gnulib-tool (func_usage): Document the new options
--extract-recursive-dependencies, --extract-recursive-link-directive.
(func_verify_module): Document output variables.
(func_get_dependencies_recursively): New function.
(func_get_link_directive_recursively): New function.
Use them to implement the new options
--extract-recursive-dependencies, --extract-recursive-link-directive.
* doc/gnulib-tool.texi (Link-time requirements): New section.

6 years agoClarify meaning of 'Link' section in module description.
Bruno Haible [Fri, 4 Jan 2019 18:17:11 +0000 (19:17 +0100)]
Clarify meaning of 'Link' section in module description.

* doc/gnulib.texi (Module description): Clarify the meaning of the
'Link' section versus the one of the dependencies.
* NEWS: Mention the change.

6 years agopselect: Fix module description.
Bruno Haible [Fri, 4 Jan 2019 18:15:26 +0000 (19:15 +0100)]
pselect: Fix module description.

* modules/pselect (Link): Put one link option per line.

6 years agocosl: Fix module description.
Bruno Haible [Fri, 4 Jan 2019 18:10:19 +0000 (19:10 +0100)]
cosl: Fix module description.

* modules/cosl (Link): Fix typo.
* modules/mathl (configure.ac): Likewise.

6 years agoc-xvasprintf: Fix module dependencies.
Bruno Haible [Fri, 4 Jan 2019 18:06:42 +0000 (19:06 +0100)]
c-xvasprintf: Fix module dependencies.

* modules/c-xvasprintf (Depends-on): Add 'xalloc-die'.

6 years agobootstrap: die when some submodules are not initialized
Akim Demaille [Mon, 31 Dec 2018 18:20:46 +0000 (19:20 +0100)]
bootstrap: die when some submodules are not initialized

* build-aux/bootstrap: Make sure all submodules are initialized.

6 years agoautoupdate
Karl Berry [Fri, 4 Jan 2019 16:09:17 +0000 (08:09 -0800)]
autoupdate

6 years agobitsetv: Fix module dependencies.
Bruno Haible [Fri, 4 Jan 2019 11:56:22 +0000 (12:56 +0100)]
bitsetv: Fix module dependencies.

* lib/bitsetv.c: Include xalloc.h.
* modules/bitsetv (Depends-on): Add 'xalloc'.

6 years agoxmemdup0: Remove redundant code.
Bruno Haible [Fri, 4 Jan 2019 11:32:14 +0000 (12:32 +0100)]
xmemdup0: Remove redundant code.

* lib/xmemdup0.h (xalloc_die): Remove declaration.

6 years agobackupfile: Fix module dependencies.
Bruno Haible [Fri, 4 Jan 2019 11:26:44 +0000 (12:26 +0100)]
backupfile: Fix module dependencies.

* modules/backupfile (Depends-on): Add 'xalloc'.

6 years agobitset, crypto/gc: fix conflicts with Solaris 11
Paul Eggert [Fri, 4 Jan 2019 06:36:21 +0000 (22:36 -0800)]
bitset, crypto/gc: fix conflicts with Solaris 11

* lib/bitset.h (_GL_BITSET_H): Rename from _BITSET_H, to
avoid clash with Solaris 11 <sys/bitset.h>.
* lib/gc.h (_GL_GC_H): Rename from GC_H, to avoid clash
with Solaris 11 <xorg/gc.h>.

6 years agosafe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.
Bruno Haible [Fri, 4 Jan 2019 05:22:00 +0000 (06:22 +0100)]
safe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.

Reported by Andy Fiddaman <andy@omniosce.org>.

* lib/sys-limits.h: Add a '_GL' prefix to the guard symbol.

6 years agoautoupdate
Karl Berry [Thu, 3 Jan 2019 17:47:26 +0000 (09:47 -0800)]
autoupdate

6 years agomaintainer-makefile: fix typo in previous patch
Eric Blake [Thu, 3 Jan 2019 15:19:27 +0000 (09:19 -0600)]
maintainer-makefile: fix typo in previous patch

* top/maint.mk (_sc_search_regexp): Fix my accidental corruption
of Roman's work.

Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agomaint.mk: Replace grep with $(GREP)
Roman Bolshakov [Wed, 2 Jan 2019 20:08:00 +0000 (14:08 -0600)]
maint.mk: Replace grep with $(GREP)

A project that uses maint.mk can specify regular expressions that are
not supported in system grep. Autoconf can discover an alias for GNU
grep and set it in GREP but it takes no effect for maint.mk

The patch provides an ability to use GNU grep if it was discovered by
autoconf and by calling GNU grep we don't get the messages in syntax-check:
  prohibit_diagnostic_without_format
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression
  grep: empty (sub)expression

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20181213153453.38123-3-r.bolshakov@yadro.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agomaint.mk: Split long argument lists
Roman Bolshakov [Thu, 13 Dec 2018 15:34:52 +0000 (18:34 +0300)]
maint.mk: Split long argument lists

$(VC_LIST_EXCEPT) is usually expanded into arguments for a command.
When a project contains too many, some operating systems can't pass all
the arguments because they hit the limit of arguments. FreeBSD and macOS
are known to have the exec limit of 256k memory used by arguments.

More on the issue:
http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg00019.html
https://www.redhat.com/archives/libvir-list/2015-August/msg00758.html

xargs without flags can be used to limit number of arguments, coupled
with use of the shell's built-in echo which is not subject to the exec
limits.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20181213153453.38123-2-r.bolshakov@yadro.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
6 years agoautoupdate
Paul Eggert [Tue, 1 Jan 2019 02:07:08 +0000 (18:07 -0800)]
autoupdate

6 years agomaint: Run 'make update-copyright'
Paul Eggert [Mon, 31 Dec 2018 23:25:11 +0000 (00:25 +0100)]
maint: Run 'make update-copyright'

6 years agoautoupdate
Paul Eggert [Mon, 31 Dec 2018 23:19:26 +0000 (15:19 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Mon, 31 Dec 2018 17:12:05 +0000 (09:12 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Sat, 29 Dec 2018 17:21:41 +0000 (09:21 -0800)]
autoupdate

6 years ago* lib/mknodat.c: Remove incorrect comments.
Paul Eggert [Fri, 28 Dec 2018 06:24:14 +0000 (22:24 -0800)]
* lib/mknodat.c: Remove incorrect comments.

6 years agomkfifo: bring back HAVE_MKFIFO macro
Paul Eggert [Fri, 28 Dec 2018 06:22:41 +0000 (22:22 -0800)]
mkfifo: bring back HAVE_MKFIFO macro

* m4/mkfifo.m4 (gl_FUNC_MKFIFO): #define HAVE_MKFIFO as needed.
Problem reported by Andrew Janke in:
https://lists.gnu.org/r/bug-gnulib/2018-12/msg00147.html

6 years agoautoupdate
Paul Eggert [Thu, 27 Dec 2018 19:20:42 +0000 (11:20 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Fri, 21 Dec 2018 16:37:23 +0000 (08:37 -0800)]
autoupdate

6 years agoAssume Autoconf >= 2.63.
Bruno Haible [Fri, 21 Dec 2018 08:34:05 +0000 (09:34 +0100)]
Assume Autoconf >= 2.63.

* modules/stdarg (configure.ac-early): Remove comment about Autoconf
versions < 2.60.

6 years agomemcmp: Mention the clang bug.
Bruno Haible [Fri, 21 Dec 2018 08:25:57 +0000 (09:25 +0100)]
memcmp: Mention the clang bug.

* tests/test-memcmp.c: Add comment about a known test failure.
* doc/posix-functions/memcmp.texi: Mention the clang bug.

6 years agorevert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7
Jim Meyering [Fri, 21 Dec 2018 03:51:48 +0000 (19:51 -0800)]
revert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7

v0.1-2213-gae4b73e28 caused a regression in grep-3.2 (no match):
  echo '123-x'|LC_ALL=C grep -E '.\bx'
The goal is to revert the first, but reverting it requires to restore
the function deleted in the second. I ran this to restore the deleted
function:
  git show v0.1-2281-g95cd86dd7 lib/dfa.c \
    | perl -0777 -pe 's/^@@[^\n]*dfaan.*//ms' \
    | patch -R -p1
* lib/dfa.c (charclass_context): Restore deleted function.
Reverting the primary commit removes this change:
dfa: Simplify a building state
* lib/dfa.c (build_state): Simplify a building state.

6 years agoversion-etc: allow zero authors
Paul Eggert [Fri, 21 Dec 2018 00:10:29 +0000 (16:10 -0800)]
version-etc: allow zero authors

* lib/version-etc.c (version_etc_arn): If no authors are given,
omit authorship info instead of dumping core.
No need to include stdlib.h now.

6 years agolchown tests: Be more permissive regarding errno values.
Bruno Haible [Thu, 20 Dec 2018 02:11:34 +0000 (03:11 +0100)]
lchown tests: Be more permissive regarding errno values.

Reported by Ivan Zakharyaschev <imz@altlinux.org>.

* tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
alternative to ENOSYS.
* modules/lchown-tests (Depends-on): Add 'errno'.
* modules/fchownat-tests (Depends-on): Likewise.

6 years agoduplocale: Avoid test failure on AIX 7.
Bruno Haible [Tue, 18 Dec 2018 08:59:41 +0000 (09:59 +0100)]
duplocale: Avoid test failure on AIX 7.

* modules/duplocale-tests (Files): Add m4/intl-thread-locale.m4.
(configure.ac): Invoke gt_FUNC_USELOCALE.
* tests/test-duplocale.c: Test HAVE_WORKING_USELOCALE instead of
HAVE_USELOCALE. Assume that nl_langinfo_l only works when uselocale
works.

6 years agolocalename: Fix test failure on AIX 7.
Bruno Haible [Tue, 18 Dec 2018 08:49:42 +0000 (09:49 +0100)]
localename: Fix test failure on AIX 7.

Reported by Assaf Gordon in
<https://lists.gnu.org/archive/html/sed-devel/2018-12/msg00019.html>.

* m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): New macro.
(gt_INTL_THREAD_LOCALE_NAME): Invoke it. Test gt_cv_func_uselocale_works
instead of ac_cv_func_uselocale.
* lib/localename.c: Test HAVE_WORKING_USELOCALE instead of
HAVE_USELOCALE.
* lib/localename-table.h: Likewise.
* lib/localename-table.c: Likewise.
* tests/test-localename.c: Likewise.
* doc/posix-functions/uselocale.texi: Mention the AIX problem.