]> Savannah Git Hosting - gnulib.git/log
gnulib.git
6 years agoautoupdate
Karl Berry [Sun, 24 Mar 2019 17:48:35 +0000 (10:48 -0700)]
autoupdate

6 years ago_Noreturn: beware of C's _Noreturn in C++ pre C++11
Akim Demaille [Fri, 22 Mar 2019 07:25:53 +0000 (08:25 +0100)]
_Noreturn: beware of C's _Noreturn in C++ pre C++11

* lib/_Noreturn.h, m4/gnulib-common.m4: Using C's _Noreturn in
C++98 appears to be supported by Clang, but not by GCC nor ICC.

6 years agoSupport cross-compilation to musl libc.
Bruno Haible [Sat, 23 Mar 2019 22:00:52 +0000 (23:00 +0100)]
Support cross-compilation to musl libc.

Reported by Necktwi Ozfguah <necktwi@ferryfair.com>.

* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for
musl libc.
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
* m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
* m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
* m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
* m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
* m4/chown.m4 (gl_FUNC_CHOWN): Likewise.
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
* m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
* m4/expl.m4 (gl_FUNC_EXPL): Likewise.
* m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): 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/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
* m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise.
* m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
* m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
* m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
* m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
* m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
* m4/log.m4 (gl_FUNC_LOG): Likewise.
* m4/logf.m4 (gl_FUNC_LOGF): Likewise.
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
* m4/log10.m4 (gl_FUNC_LOG10): Likewise.
* m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
* m4/log10l.m4 (gl_FUNC_LOG10L): 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/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
* m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
* m4/modf.m4 (gl_FUNC_MODF): Likewise.
* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
* m4/perror.m4 (gl_FUNC_PERROR): Likewise.
* m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
* m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
* m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
* m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
* m4/round.m4 (gl_FUNC_ROUND): Likewise.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
* m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
* m4/signbit.m4 (gl_SIGNBIT): Likewise.
* m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
* m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
* m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
* m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
* m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
* m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
* m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
* m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
* m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.

6 years agoposix_spawn_file_actions_*: Document musl libc bugs.
Bruno Haible [Sat, 23 Mar 2019 20:45:54 +0000 (21:45 +0100)]
posix_spawn_file_actions_*: Document musl libc bugs.

* doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
the bug.
* doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Likewise.
* doc/posix-functions/posix_spawn_file_actions_addopen.texi: Likewise.
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): When
cross-compiling to a musl system, guess no.
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): Likewise.
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.

6 years agoautoupdate
Karl Berry [Sat, 23 Mar 2019 20:44:17 +0000 (13:44 -0700)]
autoupdate

6 years agofutimens: Document musl libc bug.
Bruno Haible [Sat, 23 Mar 2019 20:39:37 +0000 (21:39 +0100)]
futimens: Document musl libc bug.

* doc/posix-functions/futimens.texi: Mention the bug.
* m4/futimens.m4 (gl_FUNC_FUTIMENS): Require AC_CANONICAL_HOST. When
cross-compiling, guess no on glibc and musl systems.

6 years agoClarify that cross-compilation guesses are guesses.
Bruno Haible [Sat, 23 Mar 2019 20:24:50 +0000 (21:24 +0100)]
Clarify that cross-compilation guesses are guesses.

* m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): When cross-compiling, add
prefix 'guessing ' to gl_cv_func_chown_follows_symlink.
* m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): When cross-compiling, add
prefix 'guessing ' to gl_cv_func_fchownat_nofollow_works.
* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): When
cross-compiling, add prefix 'guessing ' to gl_cv_func_getcwd_abort_bug.
* m4/glob.m4 (gl_GLOB): When cross-compiling, add prefix 'guessing ' to
gl_cv_glob_lists_symlinks.
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, add prefix
'guessing ' to ac_cv_func_malloc_0_nonnull.
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF): When cross-compiling, add prefix
'guessing ' to ac_cv_func_realloc_0_nonnull.
* m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, add prefix
'guessing ' to gl_cv_func_poll.
* m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): When cross-
compiling, add prefix 'guessing ' to gl_cv_func_iconv_supports_utf.
* m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Update accordingly.

6 years agostrtold: Fix typo.
Bruno Haible [Sat, 23 Mar 2019 19:20:44 +0000 (20:20 +0100)]
strtold: Fix typo.

* m4/strtold.m4 (gl_FUNC_STRTOLD): Fix typo in variable name.

6 years agonoreturn: In C++ mode with clang, use _Noreturn as fallback.
Bruno Haible [Sat, 23 Mar 2019 18:53:22 +0000 (19:53 +0100)]
noreturn: In C++ mode with clang, use _Noreturn as fallback.

Reported by Akim Demaille.

* lib/noreturn.h (_GL_NORETURN_FUNC): In C++ mode with clang, when
[[noreturn]] would not work, use _Noreturn instead.

6 years agolibtextstyle-optional: Fix compiler warnings
Akim Demaille [Fri, 22 Mar 2019 19:05:46 +0000 (20:05 +0100)]
libtextstyle-optional: Fix compiler warnings

* lib/textstyle.in.h (html_styled_ostream_create): Flag arguments
as unused.

6 years agobitset: fix memory leaks
Akim Demaille [Tue, 19 Mar 2019 20:38:00 +0000 (21:38 +0100)]
bitset: fix memory leaks

Reported by Bruno Haible.
https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00027.html

* lib/bitset/vector.c (vbitset_free): New.
(vbitset_vtable): Use it.

6 years agobitset: minor changes
Akim Demaille [Tue, 19 Mar 2019 20:26:35 +0000 (21:26 +0100)]
bitset: minor changes

* lib/bitset/base.h (bitset_alloc_type): Remove, unused.
* lib/bitset/table.c: Formatting changes.
Remove useless braces.
Prefer using else in cascades of if/else-if with returns.
* lib/bitset/vector.c: Reduce scopes.

6 years agobitset: expose bitset_resize
Akim Demaille [Mon, 18 Mar 2019 17:27:27 +0000 (18:27 +0100)]
bitset: expose bitset_resize

* lib/bitset.h (bitset_resize): Bounce on the polymorphic implementation.
* tests/test-bitset.c (check_attributes): Check bitset_resize.
(main): Use a variable bitset as reference, since fixed does not support resize.

6 years agodoc: Document the 'stdnoreturn' and 'noreturn' modules.
Bruno Haible [Wed, 20 Mar 2019 03:36:11 +0000 (04:36 +0100)]
doc: Document the 'stdnoreturn' and 'noreturn' modules.

Reported by Akim Demaille.

* doc/noreturn.texi: New file.
* doc/gnulib.texi: Include it.

6 years agodoc: Document how to use 'static inline'.
Bruno Haible [Wed, 20 Mar 2019 02:51:26 +0000 (03:51 +0100)]
doc: Document how to use 'static inline'.

* doc/static-inline.texi: New file.
* doc/gnulib.texi: Include it.

6 years agolibtextstyle-optional: Add tests.
Bruno Haible [Tue, 19 Mar 2019 23:37:52 +0000 (00:37 +0100)]
libtextstyle-optional: Add tests.

* tests/test-libtextstyle.c: New file, based on libtextstyle's
adhoc-tests/hello.c.
* tests/test-libtextstyle-default.css: New file, copied from
libtextstyle's adhoc-tests/hello-default.css.
* modules/libtextstyle-optional-tests: New file.

6 years agolibtextstyle-optional: New module.
Bruno Haible [Tue, 19 Mar 2019 23:35:11 +0000 (00:35 +0100)]
libtextstyle-optional: New module.

* lib/textstyle.in.h: New file, based on libtextstyle's textstyle.h.
* m4/libtextstyle-optional.m4: New file, based on m4/libtextstyle.m4.
* modules/libtextstyle-optional: New file.

6 years agoc-stack: Make signal handlers more reliable.
Bruno Haible [Tue, 19 Mar 2019 22:34:47 +0000 (23:34 +0100)]
c-stack: Make signal handlers more reliable.

* lib/c-stack.c (progname): New variable.
(die): Use it.
(c_stack_action): Initialize it.
(segv_handler): Save and restore errno.

6 years agoHelp making signal handlers more reliable.
Bruno Haible [Tue, 19 Mar 2019 22:32:42 +0000 (23:32 +0100)]
Help making signal handlers more reliable.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Emit definition of
_GL_ASYNC_SAFE into config.h.
* lib/nanosleep.c (sighandler): Mark as _GL_ASYNC_SAFE.
* lib/fatal-signal.h (at_fatal_signal): Add _GL_ASYNC_SAFE marker to
argument.
* lib/fatal-signal.c (action_t, uninstall_handlers,
fatal_signal_handler): Mark as _GL_ASYNC_SAFE.
* lib/clean-temp.c (cleanup_action): Mark as _GL_ASYNC_SAFE.
* lib/wait-process.c (cleanup_slaves, cleanup_slaves_action): Mark as
_GL_ASYNC_SAFE.
* lib/c-stack.h (c_stack_action): Add _GL_ASYNC_SAFE marker to argument.
* lib/c-stack.c: Add _GL_ASYNC_SAFE markers.

6 years ago_Noreturn: clang and MSVC do support [[noreturn]] in C++11 mode.
Bruno Haible [Mon, 18 Mar 2019 21:02:38 +0000 (22:02 +0100)]
_Noreturn: clang and MSVC do support [[noreturn]] in C++11 mode.

* lib/_Noreturn.h: Use [[noreturn]] if __GNUC__ and __GNUC_MINOR__
indicate clang, or if _MSC_VER indicates MSVC++ 14.0 or newer.

6 years ago_Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode
Akim Demaille [Sun, 17 Mar 2019 18:27:20 +0000 (19:27 +0100)]
_Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode

* lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before
GCC 4.8.

6 years agoautoupdate
Paul Eggert [Sun, 17 Mar 2019 23:29:28 +0000 (16:29 -0700)]
autoupdate

6 years agofts: minor simplification
Paul Eggert [Sun, 17 Mar 2019 19:39:50 +0000 (12:39 -0700)]
fts: minor simplification

* lib/fts.c (fts_safe_changedir): Remove redundant assignment.

6 years agoautoupdate
Karl Berry [Sun, 17 Mar 2019 16:24:57 +0000 (09:24 -0700)]
autoupdate

6 years agobitset, timevar: Depend on c99
Akim Demaille [Sun, 17 Mar 2019 07:34:22 +0000 (08:34 +0100)]
bitset, timevar: Depend on c99

Reported by Bruno Haible.
* modules/bitset, modules/timevar (Depends-on): Add c99.

6 years agobitset: a bit (...) more tests
Akim Demaille [Sat, 16 Mar 2019 16:36:22 +0000 (17:36 +0100)]
bitset: a bit (...) more tests

* tests/test-bitset.c (check_attributes): Check zero and ones.

6 years agobitset: fix overflows
Akim Demaille [Sat, 16 Mar 2019 16:16:48 +0000 (17:16 +0100)]
bitset: fix overflows

Reported by Bruno Haible.
https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00017.html

* lib/bitset/table.c (tbitset_test): last_bit is the position of
the bit in the array of bitset_word, so be sure to take its modulo
number-of-bits-in-bitset-word (i.e., EBITSET_ELT_WORDS).
* lib/bitset/list.c (lbitset_unused_clear): Likewise.

6 years agobitset: style changes
Akim Demaille [Thu, 14 Mar 2019 07:31:54 +0000 (08:31 +0100)]
bitset: style changes

* lib/bitset/table.c: Use NULL, not 0, for pointers.
Formatting changes.
(tbitset_list): Reduce scopes.

6 years agofatal-signal: Pass the signal number to the action.
Bruno Haible [Sat, 16 Mar 2019 21:56:21 +0000 (22:56 +0100)]
fatal-signal: Pass the signal number to the action.

* lib/fatal-signal.h (at_fatal_signal): Change the signature.
* lib/fatal-signal.c (action_t): Take the signal number as parameter.
(fatal_signal_handler): Pass the signal number to the action.
* lib/clean-temp.c (cleanup_action): Renamed from cleanup. Take the
signal number as parameter.
(create_temp_dir): Update.
* lib/wait-process.c (cleanup_slaves_action): New function.
(register_slave_subprocess): Update at_fatal_signal invocation.
* NEWS: Mention the change.

6 years agofatal-signal: Add function that lists the fatal signals.
Bruno Haible [Sat, 16 Mar 2019 16:48:06 +0000 (17:48 +0100)]
fatal-signal: Add function that lists the fatal signals.

* lib/fatal-signal.h (get_fatal_signals): New declaration.
* lib/fatal-signal.c (get_fatal_signals): New function.

6 years agoisatty: Make it return true in Cygwin consoles on native Windows.
Bruno Haible [Thu, 14 Mar 2019 22:54:28 +0000 (23:54 +0100)]
isatty: Make it return true in Cygwin consoles on native Windows.

* lib/isatty.c: Include <string.h>.
(GetProcAddress): New macro.
(GetNamedPipeClientProcessIdFuncType): New type.
(GetNamedPipeClientProcessIdFunc): New variable.
(QueryFullProcessImageNameFuncType): New type.
(QueryFullProcessImageNameFunc): New variable.
(initialized): New variable.
(initialize): New function.
(IsCygwinConsoleHandle): New function.
(isatty): Invoke it.
* doc/posix-functions/isatty.texi: Mention the issue.

6 years agoall: Update URLs to msdn.microsoft.com.
Bruno Haible [Thu, 14 Mar 2019 08:49:24 +0000 (09:49 +0100)]
all: Update URLs to msdn.microsoft.com.

* lib/stat-w32.c et al.: Update URLs after most of msdn.microsoft.com
was moved to docs.microsoft.com.

6 years agognulib-tool: Clarify the coding style.
Bruno Haible [Wed, 13 Mar 2019 19:00:53 +0000 (20:00 +0100)]
gnulib-tool: Clarify the coding style.

Suggested by Pavel Raiskup <praiskup@redhat.com>.

* gnulib-tool: Add comment about coding style.

6 years agoautoupdate
Karl Berry [Wed, 13 Mar 2019 18:14:26 +0000 (11:14 -0700)]
autoupdate

6 years agoautoupdate
Karl Berry [Tue, 12 Mar 2019 16:07:54 +0000 (09:07 -0700)]
autoupdate

6 years agostrtod: fix clash with strtold
Paul Eggert [Mon, 11 Mar 2019 23:40:29 +0000 (16:40 -0700)]
strtod: fix clash with strtold

Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
* lib/strtod.c (compute_minus_zero, minus_zero):
Simplify by remving the macro / external variable,
and having just a function.  User changed.  This avoids
the need for an external variable that might clash.

6 years agoautoupdate
Karl Berry [Mon, 11 Mar 2019 16:16:52 +0000 (09:16 -0700)]
autoupdate

6 years agoalloca-opt: Fix conflict mingw's new <alloca.h> file.
Bruno Haible [Sun, 10 Mar 2019 19:39:34 +0000 (20:39 +0100)]
alloca-opt: Fix conflict mingw's new <alloca.h> file.

Reported by Eli Zaretskii <eliz@gnu.org>.

* lib/alloca.in.h: On mingw systems that have <alloca.h>, include that.
* m4/alloca.m4 (gl_FUNC_ALLOCA): Set HAVE_ALLOCA_H.
* modules/alloca-opt (Makefile.am): Substitute HAVE_ALLOCA_H.

6 years agoautoupdate
Karl Berry [Sun, 10 Mar 2019 17:11:53 +0000 (10:11 -0700)]
autoupdate

6 years agotests: Avoid havoc with "gcc -fcheck-pointer-bounds".
Bruno Haible [Sun, 10 Mar 2019 16:09:30 +0000 (17:09 +0100)]
tests: Avoid havoc with "gcc -fcheck-pointer-bounds".

* tests/test-fprintf-posix2.c: Skip the test when -fcheck-pointer-bounds
is in use.
* tests/test-printf-posix2.c: Likewise.

6 years agouninorm tests: Free allocated memory.
Bruno Haible [Sun, 10 Mar 2019 14:14:01 +0000 (15:14 +0100)]
uninorm tests: Free allocated memory.

* tests/uninorm/test-u32-normalize-big.h
(struct normalization_test_file): Remove 'const' from allocated member.
(free_normalization_test_file): New declaration.
* tests/uninorm/test-u32-normalize-big.c (test_other): Free allocated
memory.
(free_normalization_test_file): New function.
* tests/uninorm/test-u32-nfc-big.c (main): Free allocated
'struct normalization_test_file' contents.
* tests/uninorm/test-u32-nfd-big.c (main): Likewise.
* tests/uninorm/test-u32-nfkc-big.c (main): Likewise.
* tests/uninorm/test-u32-nfkd-big.c (main): Likewise.

6 years agodi-set: Fix memory leak.
Bruno Haible [Sun, 10 Mar 2019 13:18:37 +0000 (14:18 +0100)]
di-set: Fix memory leak.

* lib/di-set.c (di_set_free): Free the ino_map through ino_map_free(),
not free().

6 years agotests: Free allocated memory.
Bruno Haible [Sun, 10 Mar 2019 13:05:09 +0000 (14:05 +0100)]
tests: Free allocated memory.

Reported by <deltatau@protonmail.com> via Assaf Gordon.

* tests/test-astrxfrm.c (main): Free allocated memory.
* tests/test-bitset.c (compare, check_attributes): Free allocated
bitsets.
* tests/test-filenamecat.c (main): Free allocated memory.
* tests/test-freadahead.c (main): Free allocated memory and close stdin.
* tests/test-freadptr.c (main): Likewise.
* tests/test-freadptr2.c (main): Free allocated memory.
* tests/test-freadseek.c (main): Likewise.
* tests/test-gc-arcfour.c (main): Close allocated context.
* tests/test-gc-arctwo.c (main): Likewise.
* tests/test-gc-des.c (main): Close all allocated contexts.
* tests/test-pipe-filter-gi1.c (main): Free allocated memory.
* tests/test-pipe-filter-ii1.c (main): Likewise.
* tests/test-posix_spawn_file_actions_addchdir.c (main): Destroy the
allocated file actions.
* tests/test-posix_spawn_file_actions_addclose.c (main): Likewise.
* tests/test-posix_spawn_file_actions_adddup2.c (main): Likewise.
* tests/test-posix_spawn_file_actions_addopen.c (main): Likewise.
* tests/test-sameacls.c (main): Free allocated memory and ACLs.
* tests/test-strfmon_l.c (main): Free allocated locales.
* tests/test-striconveh.c (main): Free allocated iconv_t objects.
* tests/uniconv/test-u8-conv-to-enc.c (main): Free allocated memory.
* tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
* tests/unistr/test-chr.h (main): Free input32.
* tests/unistr/test-strchr.h (test_strchr): Likewise.

6 years agoFix another test failure introduced by the same commit.
Bruno Haible [Sun, 10 Mar 2019 12:08:25 +0000 (13:08 +0100)]
Fix another test failure introduced by the same commit.

6 years agoFix test failure introduced by last commit.
Bruno Haible [Sun, 10 Mar 2019 12:01:33 +0000 (13:01 +0100)]
Fix test failure introduced by last commit.

6 years agotests: Prepare for using valgrind.
Bruno Haible [Sun, 10 Mar 2019 10:32:11 +0000 (11:32 +0100)]
tests: Prepare for using valgrind.

tests/*.sh: Invoke all test programs through ${CHECKER}.
tests/*/*.sh: Likewise.

6 years agoget-rusage-as, pthread_sigmask tests: Fix -fsanitize=thread findings.
Bruno Haible [Sun, 10 Mar 2019 00:28:42 +0000 (01:28 +0100)]
get-rusage-as, pthread_sigmask tests: Fix -fsanitize=thread findings.

* lib/get-rusage-as.c (get_rusage_as): When compiled by
"gcc -fsanitize=thread", don't try get_rusage_as_via_setrlimit.
* tests/test-pthread_sigmask2.c (main): Clean up the killer_thread
before exiting.

6 years agotest-userspec.c: don't print NULL
Jim Meyering [Sun, 10 Mar 2019 05:38:03 +0000 (21:38 -0800)]
test-userspec.c: don't print NULL

* tests/test-userspec.c (main): A test release of gcc,
9.0.1 20190310, warned that this test would attempt to
print a NULL pointer via a %s printf format.  Fix that
and remove the unnecessary preceding "!diag" conjunct.
Also add a comment.

6 years agogetloadavg: Write NULL for the null pointer.
Bruno Haible [Sun, 3 Mar 2019 18:36:14 +0000 (19:36 +0100)]
getloadavg: Write NULL for the null pointer.

Reported by Michal Privoznik <mprivozn@redhat.com>.

* lib/getloadavg.c (getloadavg): Write NULL instead of 0.

6 years agoalloca, tsearch-tests: Write NULL for the null pointer.
Michal Privoznik [Sun, 3 Mar 2019 18:34:57 +0000 (19:34 +0100)]
alloca, tsearch-tests: Write NULL for the null pointer.

* lib/alloca.c (i00afunc): Write NULL instead of 0.
* tests/test-tsearch.c (mangle_tree): Likewise.

6 years agostrfmon_l: Fix -fsanitize=address finding.
Bruno Haible [Sat, 9 Mar 2019 22:30:40 +0000 (23:30 +0100)]
strfmon_l: Fix -fsanitize=address finding.

* lib/strfmon_l.c: Include <errno.h>, <stdbool.h>, <stdlib.h>,
<string.h>.
(MAX_ARGS): Renamed from MAX_ARG_WORDS.
(directive_t, directives_t): New types.
(fmon_parse): New function.
(rpl_strfmon_l): Don't call va_arg more often than needed for the
format string. Consume 'long double' arguments in places where the
format string indicates so.
* modules/strfmon_l (Depends-on): Add 'stdbool'.

6 years agocrypto/des: Fix undefined behaviour.
Bruno Haible [Sat, 9 Mar 2019 21:21:25 +0000 (22:21 +0100)]
crypto/des: Fix undefined behaviour.

* lib/des.c (READ_64BIT_DATA): Cast bytes to 'unsigned int', to avoid
shift operations on 'int'.

6 years agoFix undefined behaviour.
Bruno Haible [Sat, 9 Mar 2019 19:32:25 +0000 (20:32 +0100)]
Fix undefined behaviour.

* lib/bitrotate.h (rotl16, rotr16, rotl8, rotr8): Case x to
'unsigned int', to avoid shift operations on 'int'.
* lib/xmemdup0.c (xmemdup0): Don't invoke memcpy with a zero size.
* tests/test-count-leading-zeros.c (main): Use a random number that has
as many bits as TYPE, not only 2*15 or 2*31 bits.
* tests/test-count-trailing-zeros.c (main): Likewise.
* tests/test-count-one-bits.c (main): Likewise.
* tests/test-memmem.c: Don't include "null-ptr.h".
(main): Use zerosize_ptr() instead of null_ptr().
* modules/memmem-tests (Files): Remove tests/null-ptr.h.

6 years agounilbrk/u*-possible-linebreaks: Fix undefined behaviour.
Bruno Haible [Fri, 8 Mar 2019 23:27:19 +0000 (00:27 +0100)]
unilbrk/u*-possible-linebreaks: Fix undefined behaviour.

Reported by Jeffrey Walton <noloader@gmail.com>.

* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
invoke memset with a zero size.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
Adjust accordingly.

6 years agounistr/*, uniconv/*: Fix undefined behaviour.
Bruno Haible [Fri, 8 Mar 2019 23:01:47 +0000 (00:01 +0100)]
unistr/*, uniconv/*: Fix undefined behaviour.

Reported by Jeffrey Walton <noloader@gmail.com>.

* lib/unistr/u-cpy.h (FUNC): Don't invoke memcpy with a zero size.
* lib/unistr/u-cpy-alloc.h (FUNC): Likewise.
* lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
* lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.

6 years agounistr/u8-cmp: Fix undefined behaviour.
Bruno Haible [Fri, 8 Mar 2019 19:38:22 +0000 (20:38 +0100)]
unistr/u8-cmp: Fix undefined behaviour.

Reported by Jeffrey Walton <noloader@gmail.com>.

* lib/unistr/u8-cmp.c (u8_cmp): Don't invoke memcmp if n is zero.

6 years agounictype/numeric: Fix undefined behaviour.
Bruno Haible [Fri, 8 Mar 2019 18:17:37 +0000 (19:17 +0100)]
unictype/numeric: Fix undefined behaviour.

Reported by Jeffrey Walton <noloader@gmail.com>.

* lib/unictype/numeric.c (uc_numeric_value): Avoid undefined behaviour
on shift overflow, caught by "gcc -fsanitize=undefined".
* lib/unictype/bidi_of.c (uc_bidi_class): Add cast, for clarity.
* lib/unictype/categ_of.c (lookup_withtable): Likewise.
* lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.

6 years agoautoupdate
Karl Berry [Fri, 8 Mar 2019 17:27:47 +0000 (09:27 -0800)]
autoupdate

6 years agogit-version-gen: fix --version copyright year
Paul Eggert [Tue, 5 Mar 2019 23:05:33 +0000 (15:05 -0800)]
git-version-gen: fix --version copyright year

* build-aux/git-version-gen, build-aux/move-if-change (version):
--version output copyright year is now taken from script year,
so that it no longer needs to be updated by hand.

6 years agoautoupdate
Karl Berry [Mon, 4 Mar 2019 16:35:35 +0000 (08:35 -0800)]
autoupdate

6 years agorelocatable-prog: Use wrapper-free installation on Mac OS X, take 2.
Bruno Haible [Mon, 4 Mar 2019 16:25:09 +0000 (17:25 +0100)]
relocatable-prog: Use wrapper-free installation on Mac OS X, take 2.

This approach supports relocatable installation of shared libraries
which depend on other shared libraries from the same package.

* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
If use_macos_tools is true, use reloc-ldflags and set LIBTOOL to be a
wrapper around the original LIBTOOL.
* build-aux/reloc-ldflags: Add support for Mac OS X, which uses the
token '@loader_path' instead of '$ORIGIN'.
* build-aux/libtool-reloc: New file.
* modules/relocatable-prog (Files): Add it.
* doc/relocatable-maint.texi (Supporting Relocation): Update to match
the recent changes. Document the need to set the *_LDFLAGS of libraries.
RELOCATABLE_LIBRARY_PATH and RELOCATABLE_CONFIG_H_DIR should be set in
Makefile.am, not in configure.ac.

6 years agorelocatable-prog: Revert "Use wrapper-free installation on Mac OS X."
Bruno Haible [Mon, 4 Mar 2019 16:25:04 +0000 (17:25 +0100)]
relocatable-prog: Revert "Use wrapper-free installation on Mac OS X."

* build-aux/install-reloc: Revert change.
* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.

6 years agoautoupdate
Karl Berry [Sun, 3 Mar 2019 22:09:37 +0000 (14:09 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Fri, 1 Mar 2019 16:42:42 +0000 (08:42 -0800)]
autoupdate

6 years agonstrftime: support the ‘+’ flag
Paul Eggert [Mon, 25 Feb 2019 07:32:07 +0000 (23:32 -0800)]
nstrftime: support the ‘+’ flag

* lib/nstrftime.c (add, __strftime_internal):
Add support for the ‘+’ flag introduced in POSIX.1-2017.
(__strftime_internal): New arg ‘width’.  All uses changed.
(DO_YEARISH, DO_MAYBE_SIGNED_NUMBER): New macros.

6 years agoautoupdate
Karl Berry [Sun, 24 Feb 2019 16:05:56 +0000 (08:05 -0800)]
autoupdate

6 years agorelocatable-prog: Improve verbose output.
Bruno Haible [Sun, 24 Feb 2019 14:18:24 +0000 (15:18 +0100)]
relocatable-prog: Improve verbose output.

* build-aux/install-reloc (func_verbose): Escape characters that would
be interpreted by the shell.

6 years agostat, lstat: Fix conflict with relocatable-prog-wrapper module.
Bruno Haible [Sun, 24 Feb 2019 10:59:48 +0000 (11:59 +0100)]
stat, lstat: Fix conflict with relocatable-prog-wrapper module.

* lib/stat.c: On platforms other than OSF/1, include <sys/stat.h>, not
"sys/stat.h".
* lib/lstat.c: Likewise.
* lib/fstat.c: Likewise.
* lib/fstatat.c: Likewise.

6 years agolong-options: add parse_gnu_standard_options_only
Bernhard Voelker [Thu, 29 Nov 2018 08:06:26 +0000 (09:06 +0100)]
long-options: add parse_gnu_standard_options_only

Discussed in https://bugs.gnu.org/33468 .

* lib/long-options.c (parse_long_options): Use EXIT_SUCCESS instead
of 0.
(parse_gnu_standard_options_only): Add function to
process the GNU default options --help and --version and fail for any other
unknown long or short option. See
https://gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html .
* lib/long-options.h (parse_gnu_standard_options_only): Declare it.
* modules/long-options (depends-on): Add stdbool, exitfail.
* top/maint.mk (sc_prohibit_long_options_without_use): Update
syntax-check rule, add new function name.

6 years agorelocatable-prog: Update documentation.
Bruno Haible [Sun, 24 Feb 2019 00:52:19 +0000 (01:52 +0100)]
relocatable-prog: Update documentation.

* doc/relocatable-maint.texi (Supporting Relocation): Mention GNU/Hurd and
GNU/kFreeBSD as well.

6 years agorelocatable-prog: Update documentation.
Bruno Haible [Sun, 24 Feb 2019 00:49:15 +0000 (01:49 +0100)]
relocatable-prog: Update documentation.

* doc/relocatable-maint.texi (Supporting Relocation): Update to match
the recent changes.

6 years agorelocatable-prog: Use wrapper-free installation also on Mac OS X 10.4.
Bruno Haible [Sat, 23 Feb 2019 23:25:02 +0000 (00:25 +0100)]
relocatable-prog: Use wrapper-free installation also on Mac OS X 10.4.

* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Treat Mac OS X 10.4 like 10.5.

6 years agonstrftime: tweak arg order
Paul Eggert [Sat, 23 Feb 2019 23:07:47 +0000 (15:07 -0800)]
nstrftime: tweak arg order

* lib/nstrftime.c (__strftime_internal): Interchange arg order.
All callers changed.  Suggested by TAMUKI Shoichi in:
https://lists.gnu.org/r/bug-gnulib/2019-02/msg00052.html

6 years agorelocatable-prog: Use wrapper-free installation also on Mac OS X.
Bruno Haible [Sat, 23 Feb 2019 21:42:54 +0000 (22:42 +0100)]
relocatable-prog: Use wrapper-free installation also on Mac OS X.

Reported by Paul Smith <psmith@gnu.org>.

* build-aux/install-reloc: Accept a 'mode' argument as first argument.
(func_relativize): New function, from gnulib-tool.
Handle mode 'macosx' through invocations of 'otool' and
'install_name_tool'.
* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
If use_macos_tools is true, set INSTALL_PROGRAM_ENV to an
'install-reloc' invocation with mode 'macosx'.

6 years agorelocatable-prog: Use $ORIGIN trick also on GNU/Hurd.
Bruno Haible [Sat, 23 Feb 2019 20:24:14 +0000 (21:24 +0100)]
relocatable-prog: Use $ORIGIN trick also on GNU/Hurd.

* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
Hurd with glibc >= 2.27.

6 years agonstrftime: merge glibc strftime changes
Paul Eggert [Fri, 22 Feb 2019 04:07:21 +0000 (20:07 -0800)]
nstrftime: merge glibc strftime changes

This incorporates:
2019-02-11 Fix a few whitespace arrangement inconsistencies
2019-01-24 strftime: Pass flags from "%EY" to "%Ey" [BZ #24096]
2019-01-24 Set the default width of "%Ey" to 2 [BZ #23758]
2019-01-11 strftime: use the "L_" macro with character literals
* lib/nstrftime.c (__strftime_internal): New arg yr_spec.  All
callers changed.  Default width of %Ey is now 2.  This is needed
for proper handling of Japanese dates starting on 2019-05-01.

6 years agorelocatable-prog: Use $ORIGIN trick on more platforms.
Bruno Haible [Wed, 20 Feb 2019 01:39:52 +0000 (02:39 +0100)]
relocatable-prog: Use $ORIGIN trick on more platforms.

* m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
FreeBSD >= 7.3, DragonFly >= 3.0, NetBSD >= 8.0, OpenBSD >= 5.4,
Solaris >= 10, Haiku. But don't use it on Android.
* build-aux/reloc-ldflags: Allow the use of the $ORIGIN trick also on
Hurd, FreeBSD, DragonFly, NetBSD, OpenBSD, Solaris, Haiku.

6 years agoprogreloc: Speed up executable lookup on various platforms.
Bruno Haible [Tue, 19 Feb 2019 20:42:54 +0000 (21:42 +0100)]
progreloc: Speed up executable lookup on various platforms.

* lib/progreloc.c: Include <errno.h>.
(safe_read, full_read): New functions.
(find_executable): On GNU/kFreeBSD, FreeBSD, DragonFly, NetBSD, Solaris,
prefer the information from the /proc file system to a PATH search.

6 years agoprogreloc: Simplify code for Android.
Bruno Haible [Tue, 19 Feb 2019 20:38:53 +0000 (21:38 +0100)]
progreloc: Simplify code for Android.

* lib/progreloc.c (executable_fd): Don't define on Android.
(maybe_executable, find_executable): Don't use executable_fd on Android.

6 years agoautoupdate
Karl Berry [Tue, 19 Feb 2019 16:54:45 +0000 (08:54 -0800)]
autoupdate

6 years agoautoupdate
Karl Berry [Mon, 18 Feb 2019 16:02:49 +0000 (08:02 -0800)]
autoupdate

6 years agognulib-tool: Support --import with just a few tests, not --with-tests.
Bruno Haible [Fri, 15 Feb 2019 20:27:44 +0000 (21:27 +0100)]
gnulib-tool: Support --import with just a few tests, not --with-tests.

* gnulib-tool (func_import): New variable 'gentests'. Use it instead of
'inctests' when generating files; use 'inctests' only for computing the
transitive closure.

6 years agognulib-tool: Improve handling of multiple --local-dir options.
Bruno Haible [Thu, 14 Feb 2019 19:50:57 +0000 (20:50 +0100)]
gnulib-tool: Improve handling of multiple --local-dir options.

* doc/gnulib.texi (Extending Gnulib): Explain how multiple --local-dir
options work.
* gnulib-tool (func_path_prepend): Remove function.
(func_path_foreach): Make IFS handling more robust.
(local_gnulib_path): Collect --local-dir values using func_path_append,
not func_path_prepend.
(func_determine_path_separator): Make IFS handling more robust.
(func_lookup_file_cb): New function.
(func_lookup_file): Rewritten to use func_lookup_file_cb instead of
func_lookup_local_file. Apply the patches in the reverse order of their
origin in $local_gnulib_path.
(func_count_relative_local_gnulib_path): Make IFS handling more robust.
* NEWS: Mention that the first --local-dir option is the one with
highest priority.

6 years agolibtextstyle: New module.
Bruno Haible [Sun, 10 Feb 2019 11:49:39 +0000 (12:49 +0100)]
libtextstyle: New module.

* m4/libtextstyle.m4: New file.
* modules/libtextstyle: New file.

6 years agodeclared.sh: Fix bug with variables of pointer type.
Bruno Haible [Wed, 6 Feb 2019 01:41:49 +0000 (02:41 +0100)]
declared.sh: Fix bug with variables of pointer type.

* build-aux/declared.sh (sed_extract_extern_declared): Allow the space
before the symbol to be omitted if the preceding character is a '*'.

6 years agoAdd script for running tests under valgrind.
Bruno Haible [Mon, 4 Feb 2019 21:35:38 +0000 (22:35 +0100)]
Add script for running tests under valgrind.

* build-aux/run-test: New file, from GNU libunistring.
* doc/valgrind-tests.texi: Rewritten to mention alternative approaches
as well.

6 years agodeclared.sh: Fix --version output.
Bruno Haible [Mon, 4 Feb 2019 20:37:28 +0000 (21:37 +0100)]
declared.sh: Fix --version output.

* build-aux/declared.sh (func_version): Update package name.

6 years agoAdd script for determining the set of symbols to export from a library.
Bruno Haible [Sun, 3 Feb 2019 20:44:16 +0000 (21:44 +0100)]
Add script for determining the set of symbols to export from a library.

* build-aux/declared.sh: New file, from GNU libunistring.
* doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
Mention it.

6 years agovla: add commentary about VLA_ELEMS
Paul Eggert [Sat, 2 Feb 2019 22:39:59 +0000 (14:39 -0800)]
vla: add commentary about VLA_ELEMS

* lib/vla.h (VLA_ELEMS): Add commentary,
some inspired by Bruno Haible’s proposal in:
https://lists.gnu.org/r/bug-gnulib/2019-01/msg00109.html

6 years agodtoastr,ftoastr,ldtoastr: port to c-strtod changes
Paul Eggert [Sat, 2 Feb 2019 21:01:55 +0000 (13:01 -0800)]
dtoastr,ftoastr,ldtoastr: port to c-strtod changes

Decouple these modules from c-strtod.  Nowadays it’s reasonable to
assume the C99 signatures for strtod and strtold.  Programs that
require stricter adherence to C99 should also use the strtod and
strtold modules as needed, and we no longer need the
HAVE_C99_STRTOLD macro.
* NEWS: Mention this.
* lib/ftoastr.c (STRTOF) [LENGTH == 3]: Assume strtold.
* m4/c-strtod.m4 (gl_C_STRTOLD): Do not define HAVE_C99_STRTOLD.
* modules/dtoastr, modules/ftoastr, modules/ldtoastr:
(Files): Remove m4/c-strtod.m4.
(configure.ac): Do not require gl_C99_STRTOLD, which no longer
exists.

6 years agoautoupdate
Karl Berry [Sat, 2 Feb 2019 16:04:06 +0000 (08:04 -0800)]
autoupdate

6 years agofma: Improve code style.
Bruno Haible [Sat, 2 Feb 2019 15:15:13 +0000 (16:15 +0100)]
fma: Improve code style.

* lib/fma.c: Include <limits.h>, for CHAR_BIT.

6 years ago*-map tests: Fix compilation error.
Colin Watson [Sat, 2 Feb 2019 15:12:09 +0000 (16:12 +0100)]
*-map tests: Fix compilation error.

* tests/test-array_map.c: Include <limits.h>, for CHAR_BIT.
* tests/test-hash_map.c: Likewise.
* tests/test-linkedhash_map.c: Likewise.

6 years agoc-strtod, c-strtold: Use the bug fixes for strtod, strtold.
Bruno Haible [Fri, 1 Feb 2019 03:34:37 +0000 (04:34 +0100)]
c-strtod, c-strtold: Use the bug fixes for strtod, strtold.

* lib/stdlib.in.h (GNULIB_defined_strtod_function,
GNULIB_defined_strtold_function): New macros.
* lib/c-strtod.c (HAVE_GOOD_STRTOD_L): New macro.
(STRTOD): Ignore HAVE_C99_STRTOLD.
(c_locale): Don't define it on platforms where strtod_l/strtold_l is
deemed buggy. But do use it on platforms where uselocale exists and is
usable.
(C_STRTOD): Don't use STRTOD_L on platforms where strtod_l/strtold_l is
deemed buggy. On platforms where uselocale exists and is usable, use
uselocale and strtod/strtold.
* m4/c-strtod.m4 (gl_C99_STRTOLD): Remove macro.
(gl_C_STRTOD): Require gt_FUNC_USELOCALE.
(gl_C_STRTOLD): Likewise. Define HAVE_C99_STRTOLD unconditionally.
* modules/c-strtod (Files): Add m4/intl-thread-locale.m4.
(Depends-on): Add strtod.
* modules/c-strtold (Files): Add m4/intl-thread-locale.m4.
(Depends-on): Add strtold.

6 years agostrtod, strtold: Use the locale's decimal point.
Bruno Haible [Fri, 1 Feb 2019 02:12:28 +0000 (03:12 +0100)]
strtod, strtold: Use the locale's decimal point.

* lib/strtod.c: Include <locale.h>, <stdio.h>, <langinfo.h>.
(decimal_point_char): New function, copied from lib/vasnprintf.c.
(parse_number): Add a radixchar argument. Use it instead of '.'.
(STRTOD): Invoke decimal_point_char and pass the result to parse_number.
* m4/strtod.m4 (gl_PREREQ_STRTOD): Test whether nl_langinfo exists.
* m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
* tests/test-strtod1.c: New file.
* tests/test-strtod1.sh: New file.
* modules/strtod-tests (Files): Add test-strtod1.{sh,c}. Add
locale-fr.m4 and its dependencies.
(configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to compile test-strtod1.c and run
test-strtod1.sh.
* tests/test-strtold1.c: New file.
* tests/test-strtold1.sh: New file.
* modules/strtold-tests (Files): Add test-strtold1.{sh,c}. Add
locale-fr.m4 and its dependencies.
(configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to compile test-strtold1.c and run
test-strtold1.sh.

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.