]> Savannah Git Hosting - gnulib.git/log
gnulib.git
6 years agostrtod, strtold tests: Simplify tests.
Bruno Haible [Fri, 1 Feb 2019 01:51:20 +0000 (02:51 +0100)]
strtod, strtold tests: Simplify tests.

* tests/test-strtod.c (main): Assume no rounding errors for 0.5.
* tests/test-strtold.c (main): Likewise.

6 years agostrtod, strtold: Avoid unnecessary rounding errors.
Bruno Haible [Fri, 1 Feb 2019 00:43:41 +0000 (01:43 +0100)]
strtod, strtold: Avoid unnecessary rounding errors.

* lib/strtod.c (parse_number): Drop trailing zeroes before doing the
decimal to DOUBLE conversion.

6 years agostrtod, strtold: Work around HP-UX 11.31/ia64 bug.
Bruno Haible [Thu, 31 Jan 2019 23:18:57 +0000 (00:18 +0100)]
strtod, strtold: Work around HP-UX 11.31/ia64 bug.

* lib/strtod.c (STRTOD): When there is an extra character after the
exponent marker 'p', reparse the number.
* doc/posix-functions/strtod.texi: Document the HP-UX 11.31 bug.
* doc/posix-functions/strtold.texi: Likewise.

6 years agoautoupdate
Paul Eggert [Thu, 31 Jan 2019 21:24:44 +0000 (13:24 -0800)]
autoupdate

6 years agostrtold: Add tests.
Bruno Haible [Wed, 30 Jan 2019 02:53:43 +0000 (03:53 +0100)]
strtold: Add tests.

* tests/test-strtold.c: New file, based on tests/test-strtod.c.
* modules/strtold-tests: New file.

6 years agostrtold: New module.
Bruno Haible [Wed, 30 Jan 2019 02:52:31 +0000 (03:52 +0100)]
strtold: New module.

* lib/stdlib.in.h (strtold): New declaration.
* lib/strtold.c: New file.
* lib/strtod.c: Consider USE_LONG_DOUBLE.
(STRTOD, LDEXP, HAVE_UNDERLYING_STRTOD, DOUBLE, MIN, MAX, L_,
USE_LDEXP): New macros.
(LDEXP, scale_radix_exp, parse_number, STRTOD): Adapt for
USE_LONG_DOUBLE.
(underlying_strtod): Remove function. Replace with some macros.
Re-add the code for a missing underlying function that was removed on
2013-02-19.
* m4/strtold.m4: New file.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtold is declared.
(gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLD, HAVE_STRTOLD,
REPLACE_STRTOLD.
* modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLD, HAVE_STRTOLD,
REPLACE_STRTOLD.
* modules/strtold: New file.
* doc/posix-functions/strtold.texi: Document the new module.

6 years agostrtod: Fix compilation error on IRIX 6.5.
Bruno Haible [Tue, 29 Jan 2019 21:09:58 +0000 (22:09 +0100)]
strtod: Fix compilation error on IRIX 6.5.

* modules/strtod (Depends-on): Add 'math'.

6 years agoFix build error when building a shared libunistring on Android.
Bruno Haible [Mon, 28 Jan 2019 20:14:08 +0000 (21:14 +0100)]
Fix build error when building a shared libunistring on Android.

* tests/uninorm/test-nfc.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfd.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfkc.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfkd.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.

6 years agoAvoid build errors due to wrong references between modules.
Bruno Haible [Mon, 28 Jan 2019 00:20:11 +0000 (01:20 +0100)]
Avoid build errors due to wrong references between modules.

* lib/uninorm/canonical-decomposition.c: Include
"uninorm/decomposition-table.h", not "decomposition-table.h".
* lib/uninorm/decomposition.c: Likewise.
* lib/uninorm/u8-normalize.c: Include "uninorm/decompose-internal.h",
not "decompose-internal.h".
* lib/uninorm/u16-normalize.c: Likewise.
* lib/uninorm/u32-normalize.c: Likewise.
* lib/uninorm/uninorm-filter.c: Likewise.
* lib/uninorm/nfkc.c: Likewise.
* lib/uninorm/nfkd.c: Likewise.
* lib/unicase/u8-casemap.c: Include "unicase/caseprop.h", not
"caseprop.h".
* lib/unicase/u8-ct-totitle.c: Likewise.
* lib/unicase/u8-prefix-context.c: Likewise.
* lib/unicase/u8-suffix-context.c: Likewise.
* lib/unicase/u16-casemap.c: Likewise.
* lib/unicase/u16-ct-totitle.c: Likewise.
* lib/unicase/u16-prefix-context.c: Likewise.
* lib/unicase/u16-suffix-context.c: Likewise.
* lib/unicase/u32-casemap.c: Likewise.
* lib/unicase/u32-ct-totitle.c: Likewise.
* lib/unicase/u32-prefix-context.c: Likewise.
* lib/unicase/u32-suffix-context.c: Likewise.
* lib/unicase/u8-tolower.c: Include "unicase/unicasemap.h", not
"unicasemap.h".
* lib/unicase/u8-toupper.c: Likewise.
* lib/unicase/u8-ct-tolower.c: Likewise.
* lib/unicase/u8-ct-toupper.c: Likewise.
* lib/unicase/u16-tolower.c: Likewise.
* lib/unicase/u16-toupper.c: Likewise.
* lib/unicase/u16-ct-tolower.c: Likewise.
* lib/unicase/u16-ct-toupper.c: Likewise.
* lib/unicase/u32-tolower.c: Likewise.
* lib/unicase/u32-toupper.c: Likewise.
* lib/unicase/u32-ct-tolower.c: Likewise.
* lib/unicase/u32-ct-toupper.c: Likewise.
* lib/unicase/u8-ct-casefold.c: Include "unicase/unicasemap.h", not
"unicasemap.h", and "unicase/casefold.h", not "casefold.h".
* lib/unicase/u16-ct-casefold.c: Likewise.
* lib/unicase/u32-ct-casefold.c: Likewise.

6 years agotmpfile: Add support for Android, part 2.
Bruno Haible [Sun, 27 Jan 2019 23:10:21 +0000 (00:10 +0100)]
tmpfile: Add support for Android, part 2.

6 years agogperf: Fix error when this module is required by some test module.
Bruno Haible [Sun, 27 Jan 2019 22:57:16 +0000 (23:57 +0100)]
gperf: Fix error when this module is required by some test module.

* modules/gperf (Applicability): Set to 'all'.

6 years agotmpfile: Add support for Android.
Bruno Haible [Sun, 27 Jan 2019 21:03:14 +0000 (22:03 +0100)]
tmpfile: Add support for Android.

* m4/tmpfile.m4 (gl_FUNC_TMPFILE): Add a runtime test whether tmpfile()
works.
* lib/tmpfile.c (tmpfile): Add an alternative implementation for
Android.
* modules/tmpfile (Depends-on): Add 'stdbool'.
* doc/posix-functions/tmpfile.texi: Mention the Android bug.
* modules/argv-iter-tests (Depends-on): Add 'tmpfile'.

6 years agobitsetv: allow free on NULL.
Akim Demaille [Sun, 27 Jan 2019 17:49:36 +0000 (18:49 +0100)]
bitsetv: allow free on NULL.

* lib/bitsetv.c (bitsetv_free): Do nothing when the bitsetv is NULL.

6 years agotest-framework-sh: Improve maintainability.
Bruno Haible [Sun, 27 Jan 2019 15:55:27 +0000 (16:55 +0100)]
test-framework-sh: Improve maintainability.

* tests/init.sh: Clarify what belongs together. Reorder definitions.

6 years agotests: Don't assume that /tmp exists.
Bruno Haible [Sun, 27 Jan 2019 15:15:39 +0000 (16:15 +0100)]
tests: Don't assume that /tmp exists.

* tests/test-set-mode-acl-1.sh: Skip the test if /tmp does not exist.
* tests/test-copy-acl-1.sh: Likewise.
* tests/test-file-has-acl-1.sh: Likewise.
* tests/test-copy-file-1.sh: Likewise.

6 years agotests: Accommodate a shell that is not in /bin/sh.
Bruno Haible [Sun, 27 Jan 2019 15:01:23 +0000 (16:01 +0100)]
tests: Accommodate a shell that is not in /bin/sh.

* tests/init.sh (setup_): Set srcdir and builddir.
(BOURNE_SHELL): New variable.
* modules/acl-tests (Depends-on): Add 'test-framework-sh'.
* modules/file-has-acl-tests (Depends-on): Likewise.
* modules/copy-file-tests (Depends-on): Likewise.
* tests/test-set-mode-acl-1.sh: Use the test framework. Invoke shell
scripts through $BOURNE_SHELL.
* tests/test-set-mode-acl-2.sh: Likewise.
* tests/test-copy-acl-1.sh: Likewise.
* tests/test-copy-acl-2.sh: Likewise.
* tests/test-file-has-acl-1.sh: Likewise.
* tests/test-file-has-acl-2.sh: Likewise.
* tests/test-copy-file-1.sh: Likewise.
* tests/test-copy-file-2.sh: Likewise.
* tests/test-set-mode-acl.sh (builddir): Consider value set by the
invoker.
* tests/test-copy-acl.sh (builddir): Likewise.
* tests/test-file-has-acl.sh (builddir): Likewise.
* tests/test-copy-file.sh (builddir): Likewise.
* tests/test-vc-list-files-cvs.sh: Don't create shims for executables in
build-aux/. Instead, invoke shell scripts through $BOURNE_SHELL.
* tests/test-vc-list-files-git.sh: Likewise.

6 years agotests: Fix some "unused variable" warnings.
Bruno Haible [Sun, 27 Jan 2019 11:24:47 +0000 (12:24 +0100)]
tests: Fix some "unused variable" warnings.

* tests/test-fts.c (fts_dealloc): Remove unused variable.
* tests/unigbrk/test-uc-grapheme-breaks.c (main): Likewise.
* tests/test-striconveh.c (main): Move some variable into the
'#if HAVE_ICONV'.
* tests/test-striconveha.c (main): Likewise.
* tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u8-conv-to-enc.c (main): Likewise.
* tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
* tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u8-strconv-to-enc.c (main): Likewise.
* tests/uniconv/test-u16-strconv-to-enc.c (main): Likewise.
* tests/uniconv/test-u32-strconv-to-enc.c (main): Likewise.
* tests/test-tsearch.c (main): Move some variable into the
'#if HAVE_INITSTATE'.

6 years agounigbrk/uc-grapheme-breaks: Fix build failure.
Bruno Haible [Sun, 27 Jan 2019 11:49:12 +0000 (12:49 +0100)]
unigbrk/uc-grapheme-breaks: Fix build failure.

* lib/unigbrk/uc-grapheme-breaks.c: Don't include unistr.h.
* modules/unigbrk/uc-grapheme-breaks (Makefile.am): Fix typo.

6 years agomountlist: Merge two .m4 files.
Bruno Haible [Sun, 27 Jan 2019 10:45:28 +0000 (11:45 +0100)]
mountlist: Merge two .m4 files.

* m4/mountlist.m4 (gl_MOUNTLIST): Inline gl_LIST_MOUNTED_FILE_SYSTEMS.
(AC_FUNC_GETMNTENT): Move to here, from m4/ls-mntd-fs.m4.
* m4/ls-mntd-fs.m4: Remove file.
* modules/mountlist (Files): Remove m4/ls-mntd-fs.m4.

6 years agotests: Enable Linux specific tests on Android.
Bruno Haible [Sun, 27 Jan 2019 10:39:56 +0000 (11:39 +0100)]
tests: Enable Linux specific tests on Android.

* tests/test-flock.c (main): Treat Android like Linux.
* tests/test-openat-safer.c (main): Likewise.

6 years agorelocatable-prog: Use Linux code on Android.
Bruno Haible [Sun, 27 Jan 2019 10:37:46 +0000 (11:37 +0100)]
relocatable-prog: Use Linux code on Android.

* lib/progreloc.c: Treat Android like Linux.

6 years agogetloadavg: Add support for Android.
Bruno Haible [Sun, 27 Jan 2019 03:57:32 +0000 (04:57 +0100)]
getloadavg: Add support for Android.

* lib/getloadavg.c: Treat Android like Linux.

6 years agovma-iter: Add support for Android.
Bruno Haible [Sun, 27 Jan 2019 03:57:29 +0000 (04:57 +0100)]
vma-iter: Add support for Android.

* lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Android as well.
* lib/vma-iter.c: Treat Android like Linux.
* lib/get-rusage-data.c (get_rusage_data): Likewise.

6 years agofts: Optimize on Android.
Bruno Haible [Sun, 27 Jan 2019 03:57:27 +0000 (04:57 +0100)]
fts: Optimize on Android.

* lib/fts.c: Treat Android like Linux.

6 years agofts: Add support for Android.
Bruno Haible [Sun, 27 Jan 2019 03:57:24 +0000 (04:57 +0100)]
fts: Add support for Android.

* m4/fts.m4 (gl_FUNC_FTS_CORE): Avoid conflicts between the symbols
defined by this module and the ones in libc.
* tests/test-fts.c (main): Treat mkdir error EMLINK like EMFILE.

6 years agomountlist: Use Linux code on Android.
Bruno Haible [Sat, 26 Jan 2019 23:21:17 +0000 (00:21 +0100)]
mountlist: Use Linux code on Android.

* lib/mountlist.c (setmntent, endmntent): Define fallbacks.
(unescape_tab, read_file_system_list): Enable Linux code on Android
as well.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Test for setmntent
and endmntent.
* modules/mountlist (Depends-on): Add 'getline'.

6 years agolocalename tests: Fix test failure on Android.
Bruno Haible [Sat, 26 Jan 2019 22:40:44 +0000 (23:40 +0100)]
localename tests: Fix test failure on Android.

* modules/localename-tests (Depends-on): Add 'setlocale'.

6 years agomountlist: Port better to Android.
Bruno Haible [Sat, 26 Jan 2019 21:49:57 +0000 (22:49 +0100)]
mountlist: Port better to Android.

* lib/mountlist.c (MOUNTED): Redefine on Android.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
Android.

6 years agostriconveh: Fix use of uninitialized iconv_t.
Bruno Haible [Sat, 26 Jan 2019 20:46:40 +0000 (21:46 +0100)]
striconveh: Fix use of uninitialized iconv_t.

Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-libunistring/2019-01/msg00000.html>.

* lib/striconveh.c (iconveh_open): Correct the iconv_close argument.

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.