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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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().
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.
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.
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.
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>.
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>
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>
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
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.
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.
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.
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.
Bruno Haible [Sun, 16 Dec 2018 20:31:15 +0000 (21:31 +0100)]
localename: Avoid test failure on some glibc systems.
* tests/test-localename.c (test_locale_name, test_locale_name_posix):
Unset environment variables that might disturb the first setlocale call,
and verify that this setlocale call succeeds.
Bruno Haible [Sun, 16 Dec 2018 09:46:13 +0000 (10:46 +0100)]
obstack, libc-config: Support HP-UX cc in C99 mode.
* lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER): Treat HP-UX cc as a pre-C99
compiler, even when in C99 mode.
* lib/cdefs.h (__flexarr): Likewise.
* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update comment.
Bruno Haible [Sun, 16 Dec 2018 06:11:44 +0000 (07:11 +0100)]
localename: Fix test failure on OpenBSD >= 6.2.
* m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Test for fake
locale system. Define HAVE_FAKE_LOCALES in this case.
* lib/localename.c (HAVE_GOOD_USELOCALE): New macro. Use it instead of
HAVE_USELOCALE.
* tests/test-localename.c (HAVE_GOOD_USELOCALE): New macro. Use it
instead of HAVE_NEWLOCALE && HAVE_USELOCALE.
* doc/posix-functions/uselocale.texi: Mention OpenBSD problem. Update
platforms list.
* doc/posix-functions/newlocale.texi: Likewise.
* doc/posix-functions/duplocale.texi: Update platforms list.
* doc/posix-functions/freelocale.texi: Likewise.