2021-09-09 Pádraig Brady
maintainer-makefile: add 'can' to sc_prohibit_doubled_word
* top/maint.mk (sc_prohibit_doubled_word): Check for "can can".
2021-09-08 Paul Eggert
strerror_r-posix: port even better to Android
* lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the
system strerror_r returns char *, and HAVE_DECL_STRERROR_R to
decide whether it either does that or returns an integer. In the
former case, use the system strerror_r even on platforms like
Android API level 23 that don’t have __xpg_strerror_r; also
check for strerror_r failure just in case.
* m4/error.m4 (gl_PREREQ_ERROR):
* m4/strerror_r.m4 (gl_PREREQ_STRERROR_R):
Use system extensions on Android, to avoid mishandling strerror_r
on API level 23 and later.
* modules/error, modules/strerror_r-posix (configure.ac):
Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that
AC_REQUIREs are propagated out.
strerror_r-posix: port better to Android
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move requirement of
gl_USE_SYSTEM_EXTENSIONS from here ...
(gl_FUNC_STRERROR_R_WORKS): ... to here, which is the macro that
actually needs it. This avoids a bug where 'configure' tests
whether strerror_r has the POSIX API before enabling GNU
extensions. On Android, enabling GNU extensions switches from the
POSIX to the GNU API. Problem reported by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
string, wchar: port rpl_free decl to Android
* lib/string.in.h, lib/wchar.in.h:
(free): When replacing it, declare the unreplaced version too.
Problem reported by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
2021-09-07 Paul Eggert
string, wchar: avoid some namespace pollution
* lib/string.in.h, lib/wchar.in.h:
(free): Declare by hand instead of including stdlib.h.
This avoids some namespace pollution. It should also avoid some
nested-include problems described by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
* modules/string, modules/wchar:
(Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
(Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
2021-09-04 Paul Eggert
idx: break copying from glibc
* config/srclist.txt: Comment out idx.h, and bring back recent change.
2021-09-04 Sun Haiyong (tiny change)
sigsegv: Improve cross-compilation support for LoongArch CPU.
* m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
down on LoongArch.
2021-09-04 Simon Josefsson
doc: Improve help related to bootstrap script.
* doc/gnulib-tool.texi (VCS Issues): Make title more positive,
s/Issues/Integration/. Some more bootstrap-related hints,
including changing suggested submodule path from .gnulib to gnulib
as this seems to be more wide-spread.
2021-09-04 Paul Eggert
intprops: fix minor doc glitches
* doc/intprops.texi (Integer Properties): Fix doc glitches.
2021-09-04 Simon Josefsson
doc: Add suggestions on FDL texinfo usage.
* doc/licenses-texi.texi (License Texinfo sources): Add texinfo
examples.
2021-09-03 Simon Josefsson
maintainer-makefile: Add indentation syntax-check rule.
* top/maint.mk (indent): Use AM_V_GEN and indent_args.
(sc_indent): New rule.
(indent_args): New variable.
(C_SOURCES): New variable, initialized to reasonable C files.
(exclude_file_name_regexp--indent): New variable.
2021-08-30 Paul Eggert
idx: add commentary
* lib/idx.h: Add comments about ssize_t and strlen, in
response to comments from Simon Josefsson in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00196.html
2021-08-29 Paul Eggert
attribute: keep up with gnulib-common.m4
* lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE):
New macros, aliases for the _GL_-prefixed macros added
to gnulib-common.m4 last month.
2021-08-29 Bruno Haible
supersede: Fix test failure under QEMU user-mode for Linux/mips.
* tests/test-supersede-open.h (test_open_supersede): Copy statbuf.st_dev
into a local variable of type dev_t.
* tests/test-supersede-fopen.h (test_fopen_supersede): Likewise.
2021-08-29 Bruno Haible
spawn-pipe: Fix test failure when running under QEMU user-mode.
* tests/test-spawn-pipe-child.c: Include , ,
qemu.h.
(main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
* modules/spawn-pipe-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-29 Bruno Haible
execute: Fix test failure when running under QEMU user-mode.
* tests/test-execute-child.c: Include , qemu.h.
(main): Under QEMU user-mode, allow fd 3 to be open.
* modules/execute-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-29 Bruno Haible
posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU.
* tests/test-posix_spawn-fchdir.c: Include qemu.h.
(is_qemu): New variable.
(test): Under QEMU user-mode, don't expect that "pwd" produces the
result "/".
(main): Initialize is_qemu. Under QEMU user-mode, skip the relative file
name test.
* modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-29 Bruno Haible
getcwd tests: Avoid test failure when running under QEMU user-mode.
* modules/getcwd-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* tests/test-getcwd.c: Include qemu.h.
(test_long_name): Skip this test when running under QEMU user-mode.
(main): Consider return code 77 from test_long_name.
2021-08-29 Paul Eggert
base32, base64: treat negative sizes as overflows
* lib/base64.c (base64_encode_alloc):
* lib/base32.c (base32_encode_alloc):
Treat negative sizes as overflows, for better compatibility
with previous API.
2021-08-29 Bruno Haible
explicit_bzero test: Fix test failure due to GCC optimizations.
* tests/test-explicit_bzero.c (do_secret_stuff): Use static variable
'last_stackbuf'.
(main): Use an 'if' to combine the two do_secret_stuff invocations.
2021-08-29 Paul Eggert
dfa: port to non-gnulib
Suggested by Arnold Robbins in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html
* lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]:
Add missing definition.
2021-08-29 Paul Eggert
base32, base64: fix broken tests
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html
* lib/base32.c, lib/base64.c: Do not include verify.h,
and omit all uses of ‘assume’.
* modules/base32, modules/base64 (Depends-on): Remove verify.
* tests/test-base32.c, tests/test-base64.c:
Don’t pass out-of-range values to allocator,
as converting them to idx_t relies on implementation-defined
behavior that could trap.
ialloc: relicense
* modules/ialloc (License): Change from LGPL to LGPLv2+.
2021-08-28 Bruno Haible
fma: Fix compilation error on Linux/sh4.
* lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these
rounding modes are not defined.
2021-08-28 Bruno Haible
Skip some tests when running under QEMU user-mode.
* tests/qemu.h: New file.
* tests/test-get-rusage-as.c: Include qemu.h.
(main): Skip the test when running under QEMU.
* tests/test-get-rusage-data.c: Include qemu.h.
(main): Skip the test when running under QEMU.
* tests/test-printf-posix2.c: Include qemu.h.
(main): Return with code 77 when running under QEMU.
* tests/test-fprintf-posix2.c: Include qemu.h.
(main): Return with code 77 when running under QEMU.
* tests/test-fprintf-posix3.c: Include qemu.h.
(main): Return with code 79 when running under QEMU.
* tests/test-fprintf-posix3.sh: Skip the test when the return code was
79.
* tests/test-dprintf-posix2.c: Include qemu.h.
(main): Return with code 79 when running under QEMU. Use return code 80
instead of 78.
* tests/test-dprintf-posix2.sh: Skip the test when the return code was
79. Update for changed return code.
* modules/get-rusage-as-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/get-rusage-data-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/fprintf-posix-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/dprintf-posix-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-28 Bruno Haible
sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha.
* lib/sigabbrev_np.c (sigabbrev_np): When SIGINFO and SIGPWR have the
same value, give precendence to SIGPWR.
* lib/sigdescr_np.c (sigdescr_np): Likewise.
* tests/test-sigabbrev_np.c (main): Likewise.
* tests/test-sigdescr_np.c (main): Likewise.
2021-08-28 Bruno Haible
execle, execve, execvpe tests: Fix test failures under qemu user-mode.
* test-execle-main.c: Include .
(get_environ_assignment, create_minimal_env): New functions.
(main): Call create_minimal_env.
* test-execve-main.c: Likewise.
* test-execvpe-main.c: Likewise.
2021-08-27 Paul Eggert
base32, base64: prefer signed to unsigned integers
* lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h.
Include intprops.h, verify.h.
* lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8)
(base32_decode_ctx, base32_decode_alloc_ctx):
* lib/base32.h (struct base32_decode_context):
* lib/base64.c (base64_encode_fast, base64_encode)
(base64_encode_alloc, get_4, decode_4, base64_decode_ctx)
(base64_decode_alloc_ctx):
* lib/base64.h (struct base64_decode_context):
* tests/test-base32.c (main):
* tests/test-base64.c (main):
Prefer signed to unsigned integers.
* lib/base32.c (base32_encode_alloc):
* lib/base64.c (base64_encode_alloc):
Use simpler and more-direct check for overflow, removing a TODO.
* lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h.
* modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
2021-08-26 Paul Eggert
regex: use __attr_access and C99-style array arg
This should help with some static checking.
Derived from a suggestion by Martin Sebor in:
https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html
* config/srclist.txt: Remove lib/regex.c for now.
* lib/regex.c: Ignore -Wvla for the whole file.
* lib/regex.h (_REGEX_NELTS, _Attr_access_): New macros.
Ignore -Wvla when declaring regexec.
(re_compile_pattern, re_search, re_search2, re_match, re_match_2)
(regerror): Mark with _Attr_access_, as glibc does.
* lib/regex.h (regexec):
* lib/regexec.c (regexec, __compat_regexec):
Use _REGEX_NELTS for each array parameter whose size is another arg
but with an access pattern that cannot be captured with __attr_access.
2021-08-25 Bruno Haible
execute tests: Fix test failure when libtool is in use.
* modules/execute-tests (Makefile.am): Link test-execute-child without
using libtool.
* modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child
without using libtool.
* modules/system-quote-tests (Makefile.am): Link test-system-quote-child
without using libtool.
2021-08-24 Paul Eggert
dfa: prefer idx_t to ptrdiff_t for nonnegative
* lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb)
(dfaexec_noop, dfaexec):
* lib/dfa.h (dfaparse, dfacomp, dfaexec):
Prefer idx_t to ptrdiff_t for counts, which should be nonnegative.
* lib/dfa.h: Include idx.h.
2021-08-22 Bruno Haible
snippet/unused-parameter: Mark unused module obsolete.
* modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
2021-08-22 Bruno Haible
Make generated .in.h files as standalone as possible.
Reported by Jan Engelhardt .
* lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
_GL_ATTRIBUTE_MALLOC): Add fallback definitions.
* lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add
fallback definitions.
* lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition.
* lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition.
* lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition.
* lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency
with the other *.in.h files.
* lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback
definition.
* lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
* lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
* lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of
_GL_UNUSED.
(_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add
fallback definitions.
2021-08-22 Bruno Haible
gnulib-common.m4: Clarify logic behind _GL_UNUSED_LABEL.
Reported by Paul Eggert.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment and write the
condition in a way that is close to the comment.
2021-08-22 Paul Eggert
c-stack: depend on inttypes, mempcpy
* modules/c-stack (Depends-on): Add inttypes, mempcpy.
mempcpy problem reported by Evan Miller in:
https://debbugs.gnu.org/50098#31
2021-08-22 Bruno Haible
mountlist: Use recommended syntax for _GL_UNUSED_LABEL.
* lib/mountlist.c (read_file_system_list): Add semicolon after
_GL_UNUSED_LABEL.
2021-08-22 Bruno Haible
gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_UNUSED_LABEL use
_GL_ATTRIBUTE_UNUSED also for clang.
2021-08-22 Bruno Haible
gnulib-common.m4: Use C2x [[maybe_unused]] when possible.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
_GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
* lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
declaration.
* lib/c-stack.c (null_action, segv_handler, overflow_handler,
c_stack_action): Likewise.
* lib/chown.c (chown): Likewise.
* lib/clean-temp-simple.c (cleanup_action): Likewise.
* lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
fts_set): Likewise.
* lib/getgroups.c (getgroups): Likewise.
* lib/getopt.c (_getopt_initialize): Likewise.
* lib/getugroups.c (getugroups): Likewise.
* lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
gl_locale_name_posix, gl_locale_name_environ): Likewise.
* lib/mkdir.c (rpl_mkdir): Likewise.
* lib/mkfifo.c (mkfifo): Likewise.
* lib/mkfifoat.c (mkfifoat): Likewise.
* lib/mknod.c (mknod): Likewise.
* lib/mknodat.c (mknodat): Likewise.
* lib/mountlist.c (me_remote): Likewise.
* lib/openpty.c (openpty): Likewise.
* lib/parse-datetime.y (yyerror): Likewise.
* lib/passfd.c (sendfd, recvfd): Likewise.
* lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
pthread_cond_broadcast, pthread_cond_destroy): Likewise.
* lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
* lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
* lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
Likewise.
* lib/pthread-thread.c (pthread_attr_destroy): Likewise.
* lib/readlink.c (readlink): Likewise.
* lib/rename.c (rpl_rename): Likewise.
* lib/set-permissions.c (set_permissions): Likewise.
* lib/sockets.c (gl_sockets_startup): Likewise.
* lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
stat_time_normalize): Likewise.
* lib/strptime.c (__strptime_internal): Likewise.
* lib/strtod.c (LDEXP): Likewise.
* lib/symlink.c (symlink): Likewise.
* lib/symlinkat.c (symlinkat): Likewise.
* lib/tempname.c (try_dir, try_nocreate): Likewise.
* lib/textstyle.in.h (styled_ostream_begin_use_class,
styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
styled_ostream_flush_to_current_style, fd_ostream_create,
term_ostream_get_color, term_ostream_set_color,
term_ostream_get_bgcolor, term_ostream_set_bgcolor,
term_ostream_get_weight, term_ostream_set_weight,
term_ostream_get_posture, term_ostream_set_posture,
term_ostream_get_underline, term_ostream_set_underline,
term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
term_ostream_set_hyperlink, term_ostream_create,
term_styled_ostream_create, html_styled_ostream_create,
handle_color_option, handle_style_option, style_file_prepare,
styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
* lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
Likewise.
* lib/wait-process.c (cleanup_slaves_action): Likewise.
* tests/signature.h (SIGNATURE_CHECK2): Likewise.
* tests/test-areadlink.c (do_areadlink): Likewise.
* tests/test-areadlinkat.c (do_areadlinkat): Likewise.
* tests/test-ceilf-ieee.c (main): Likewise.
* tests/test-ceilf1.c (main): Likewise.
* tests/test-dirent.c (dir): Likewise.
* tests/test-fchownat.c (main): Likewise.
* tests/test-fdopendir.c (main): Likewise.
* tests/test-filenamecat.c (main): Likewise.
* tests/test-floor1.c (main): Likewise.
* tests/test-floorf-ieee.c (main): Likewise.
* tests/test-floorf1.c (main): Likewise.
* tests/test-fseeko.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-ftello.c (main): Likewise.
* tests/test-getdomainname.c (main): Likewise.
* tests/test-getgroups.c (main): Likewise.
* tests/test-gethostname.c (main): Likewise.
* tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
* tests/test-mkdirat.c (main): Likewise.
* tests/test-openat.c (main): Likewise.
* tests/test-parse-datetime.c (main): Likewise.
* tests/test-quotearg-simple.c (main): Likewise.
* tests/test-quotearg.c (main): Likewise.
* tests/test-sethostname2.c (main): Likewise.
* tests/test-unlinkat.c (main): Likewise.
* tests/test-version-etc.c (main): Likewise.
* tests/test-xalloc-die.c (main): Likewise.
* tests/test-xfprintf-posix.c (main): Likewise.
* tests/test-xprintf-posix.c (main): Likewise.
* tests/test-xvasprintf.c (main): Likewise.
2021-08-22 Bruno Haible
gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Add comments to the
_GL_ATTRIBUTE_* macros, based on lib/attribute.h.
2021-08-22 Bernhard Voelker
doc: fix order of stdlib functions
* doc/gnulib.texi (node Glibc stdlib.h): Move mrand48_r after mkstemps.
Reported by Benno Schulenberg.
2021-08-21 Bruno Haible
c-stack: Test for libsigsegv once, not twice.
* m4/sigsegv.m4: New file, based on modules/sigsegv.
* modules/sigsegv (Files): Add it.
(configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv
instead of with_libsigsegv and gl_cv_lib_sigsegv.
* m4/c-stack.m4 (gl_C_STACK): Likewise.
2021-08-21 Bruno Haible
rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20).
* lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
* modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
2021-08-20 Paul Eggert
rawmemchr: modernize and simplify
* lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined;
otherwise this file would not be compiled. Include limits.h,
stdalign.h, stdint.h, verify.h.
(rawmemchr): Prefer uintptr_t to unsigned long and to size_t when
it’s the better type. Verify that longword lacks padding. Use
alignof rather than sizeof when checking alignment. Simplify by
assuming C99 decl-after-statement, and by using multiplication
rather than repeated shifting and OR (modern compilers can
optimize the multiplication if needed). Avoid unnecessary casts.
Don’t assume CHAR_WIDTH is 8. Convert back and forth between void *
to suppress bogus GCC warnings about alignment. Omit a
duplicate assignment to char_ptr.
* modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
2021-08-17 Paul Eggert
c-stack: fix libsigsegv dependency (regression 2021-05-18)
Problem reported for GNU grep by Evan Miller (Bug#50098).
* m4/c-stack.m4 (gl_C_STACK): Call gl_LIBSIGSEGV before
testing gl_cv_lib_sigsegv.
2021-08-14 Bruno Haible
doc: Update for glibc 2.34.
* doc/posix-functions/timespec_getres.texi: New file.
* doc/glibc-functions/_Fork.texi: New file.
* doc/glibc-functions/closefrom.texi: New file.
* doc/glibc-functions/dn_comp.texi: New file.
* doc/glibc-functions/dn_skipname.texi: New file.
* doc/glibc-functions/execveat.texi: New file.
* doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New
file.
* doc/glibc-functions/res_dnok.texi: New file.
* doc/glibc-functions/res_hnok.texi: New file.
* doc/glibc-functions/res_mailok.texi: New file.
* doc/glibc-functions/res_nmkquery.texi: New file.
* doc/glibc-functions/res_nquery.texi: New file.
* doc/glibc-functions/res_nquerydomain.texi: New file.
* doc/glibc-functions/res_nsearch.texi: New file.
* doc/glibc-functions/res_nsend.texi: New file.
* doc/glibc-functions/res_ownok.texi: New file.
* doc/glibc-functions/res_send.texi: New file.
* doc/gnulib.texi: Include them.
* doc/glibc-functions/inet_neta.texi: Remove file.
* doc/glibc-functions/malloc_get_state.texi: Remove file.
* doc/glibc-functions/malloc_set_state.texi: Remove file.
* doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file.
* doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file.
* doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file.
* doc/glibc-functions/pthread_yield.texi: Remove file.
* doc/gnulib.texi: Don't include them.
* doc/glibc-headers/resolv.texi: Update.
* doc/pastposix-functions/h_errno.texi: Likewise.
* doc/posix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.
2021-08-12 Paul Eggert
memrchr-tests: port to GCC 12
* tests/test-memrchr.c: Bug#101494 is fixed in GCC 12.
2021-08-12 Akim Demaille
snippet/_Noreturn: Fix typo
* lib/_Noreturn.h: Fix spelling of 4.
2021-08-11 Paul Eggert
dynarray: merge from glibc
This also helps document glibc’s direction in using GCC’s
memory-allocation checking.
* lib/cdefs.h: Omit comments that glibc rejected.
(__returns_nonnull, __attr_access_none, __attr_dealloc)
(__attr_dealloc_free): New macros.
* lib/libc-config.h: Undef the new macros that are defined
unconditionally.
* lib/malloc/dynarray_at_failure.c [_LIBC]: Do not include stdlib.h.
(__libc_dynarray_at_failure) [_LIBC]: Call __libc_fatal,
fixing a bad merge previously.
2021-08-08 Bruno Haible
canonicalize-lgpl: Fix conflict with z/OS .
Reported by Mike Fulton in
via Eric Blake.
* lib/canonicalize-lgpl.c (__stat): Remove macro.
(file_accessible): Use 'stat' instead.
2021-08-08 Bruno Haible
ptsname_r: Drop sync with glibc.
* lib/ptsname_r.c: Drop _LIBC code.
(__set_errno, __isatty, __stat, __ttyname_r, __ptsname_r): Remove
macros.
(ptsname_r): Rename local variable 'save_errno'.
2021-08-08 Bruno Haible
config: Update after glibc changed.
* config/srclist.txt: Remove two files that glibc dropped on 2013-12-17.
2021-08-08 Bruno Haible
relocatable-lib-lgpl: Fix a memory leak related to a Windows DLL.
Reported by Jonathan Boeing in
.
* lib/relocatable.c (DllMain): Avoid memory leak in a special case
of repeated attach/detach.
2021-08-08 Bruno Haible
fopen: Fix link error on native Windows.
* modules/fopen (Depends-on): Add close.
2021-08-08 Bruno Haible
fopen: Fix compilation error on AIX (regression from 2020-05-28).
* modules/fopen (Depends-on): Add fcntl-h.
2021-08-08 Bruno Haible
stdio: Improve GCC 11 allocation-deallocation checking.
* lib/stdio.in.h (fdopen, fopen, tmpfile): For GCC >= 11: Declare nearly
always.
(popen): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'popen' is not in use.
2021-08-08 Bruno Haible
dirent: Improve GCC 11 allocation-deallocation checking.
* lib/dirent.in.h (opendir): For GCC >= 11: Declare also when the
platform already declares the function or when the module 'opendir' is
not in use.
(fdopendir): For GCC >= 11: Declare also when the platform already
declares the function or when the module 'fdopendir' is not in use.
2021-08-08 Bruno Haible
stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
* lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the
platform already declares the function or when the module
'aligned_alloc' is not in use.
(calloc): For GCC >= 11: Declare nearly always.
(canonicalize_file_name): For GCC >= 11: Declare also when the platform
already declares the function or when the module 'canonicalize-lgpl' is
not in use.
(malloc, realloc): For GCC >= 11: Declare nearly always.
* lib/malloc.in.h: Remove redundant include.
(memalign): For GCC >= 11: Declare also when the platform already
declares the function or when the module 'memalign' is not in use.
* lib/string.in.h: Include always.
(strdup): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'strdup' or 'strdup-posix' is not in
use.
* lib/wchar.in.h: Include always.
(wcsdup): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'wcsdup' is not in use.
* modules/free-posix (Depends-on): Add string, wchar.
2021-08-07 Bruno Haible
gnulib-tool: Add support for Automake 1.16.4.
Reported by in
.
* build-aux/test-driver-1.16.3.diff: Renamed from
build-aux/test-driver.diff.
* build-aux/test-driver.diff: Update to match Automake 1.16.4.
* gnulib-tool (func_create_testdir, func_create_megatestdir): Try both
.diff files.
2021-08-07 Bruno Haible
gnulib-common.m4: Minor style fix.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Keep list of attributes sorted
alphabetically.
2021-08-07 Bruno Haible
uninorm, unistr: Improve GCC 11 allocation-deallocation checking.
* lib/uninorm.in.h (uninorm_filter_free): Move declaration up.
(uninorm_filter_create): Declare that deallocation must happen through
'uninorm_filter_free'.
* lib/unistr.in.h: Include .
(u8_strdup, u16_strdup, u32_strdup): Declare that deallocation must
happen through 'free'.
2021-08-07 Bruno Haible
ialloc: Prepare for allocation-deallocation checking.
* lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that
deallocation must happen through 'free'.
2021-08-07 Bruno Haible
aligned-malloc: Prepare for allocation-deallocation checking.
* lib/aligned-malloc.h (aligned_free): Move declaration up.
(aligned_malloc): Add comment that deallocation must happen through
'aligned_free'.
2021-08-07 Bruno Haible
list, set, oset, map, omap: Prepare allocation-deallocation checking.
* lib/gl_list.h (gl_list_create_empty, gl_list_nx_create_empty,
gl_list_create, gl_list_nx_create): Add comment that deallocation must
happen through 'gl_list_free'.
* lib/gl_xlist.h (gl_list_create_empty, gl_list_create): Likewise.
* lib/gl_sublist.h (gl_sublist_create, gl_sublist_nx_create): Likewise.
* lib/gl_xsublist.h (gl_sublist_create): Likewise.
* lib/gl_set.h (gl_set_create_empty, gl_set_nx_create_empty): Add
comment that deallocation must happen through 'gl_set_free'.
* lib/gl_xset.h (gl_set_create_empty): Likewise.
* lib/gl_oset.h (gl_oset_create_empty, gl_oset_nx_create_empty): Add
comment that deallocation must happen through 'gl_oset_free'.
* lib/gl_xoset.h (gl_oset_create_empty): Likewise.
* lib/gl_map.h (gl_map_create_empty, gl_map_nx_create_empty): Add
comment that deallocation must happen through 'gl_map_free'.
* lib/gl_xmap.h (gl_map_create_empty): Likewise.
* lib/gl_omap.h (gl_omap_create_empty, gl_omap_nx_create_empty): Add
comment that deallocation must happen through 'gl_omap_free'.
* lib/gl_xomap.h (gl_omap_create_empty): Likewise.
2021-08-07 Bruno Haible
xgetdomainname: Improve GCC 11 allocation-deallocation checking.
* lib/xgetdomainname.h: Include .
(xgetdomainname): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
xgetdomainname: Ensure .c file starts with '#include '.
* lib/xgetaname-impl.h: New file, based on lib/xgethostname.c.
* lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h.
* lib/xgetdomainname.c: Include . Include xgetaname-impl.h
instead of xgethostname.c.
* modules/xgethostname (Files): Add lib/xgetaname-impl.h.
* modules/xgetdomainname (Files): Likewise.
(Depends-on): Remove xgethostname. Add free-posix, xalloc.
2021-08-07 Bruno Haible
xstrndup: Improve GCC 11 allocation-deallocation checking.
* lib/xstrndup.h: Include instead of .
(xstrndup): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
xstriconveh: Improve GCC 11 allocation-deallocation checking.
* lib/xstriconveh.h: Include instead of .
(xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen
through 'free'.
2021-08-07 Bruno Haible
xmemdup0: Improve GCC 11 allocation-deallocation checking.
* lib/xmemdup0.h: Include instead of .
(xmemdup0): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
windows-spawn: Improve GCC 11 allocation-deallocation checking.
* lib/windows-spawn.h: Include .
(compose_command, compose_envblock): Declare that deallocation must
happen through 'free'.
2021-08-07 Bruno Haible
string-buffer: Improve GCC 11 allocation-deallocation checking.
* lib/string-buffer.h: Include instead of .
(sb_dupfree): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
striconveha: Improve GCC 11 allocation-deallocation checking.
* lib/striconveha.h: Include instead of .
(str_iconveha): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
striconveh: Improve GCC 11 allocation-deallocation checking.
* lib/striconveh.h: Include instead of .
(str_cd_iconveh, str_iconveh): Declare that deallocation must happen
through 'free'.
2021-08-07 Bruno Haible
striconv: Improve GCC 11 allocation-deallocation checking.
* lib/striconv.h: Include instead of .
(str_cd_iconv, str_iconv): Declare that deallocation must happen through
'free'.
2021-08-07 Bruno Haible
relocatable-lib-lgpl: Improve GCC 11 allocation-deallocation checking.
* lib/relocatable.h: Include .
(compute_curr_prefix): Declare that deallocation must happen through
'free'.
2021-08-07 Bruno Haible
regex-quote: Improve GCC 11 allocation-deallocation checking.
* lib/regex-quote.h: Include instead of .
(regex_quote): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
readline: Improve GCC 11 allocation-deallocation checking.
* lib/readline.h: Include .
(readline): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
read-file: Improve GCC 11 allocation-deallocation checking.
* lib/read-file.h: Include instead of .
(fread_file, read_file): Declare that deallocation must happen through
'free'.
2021-08-07 Bruno Haible
pipe-filter-gi: Improve GCC 11 allocation-deallocation checking.
* lib/pipe-filter.h (pipe_filter_gi_close): Move declaration up.
(pipe_filter_gi_create): Declare that deallocation must happen through
'pipe_filter_gi_close'.
2021-08-07 Bruno Haible
javaversion: Improve GCC 11 allocation-deallocation checking.
* lib/javaversion.h: Include .
(javaexec_version): Declare that deallocation must happen through
'free'.
2021-08-07 Bruno Haible
ino-map: Improve GCC 11 allocation-deallocation checking.
* lib/ino-map.h (ino_map_free): Move declaration up.
(ino_map_alloc): Declare that deallocation must happen through
'ino_map_free'.
2021-08-07 Bruno Haible
hash: Improve GCC 11 allocation-deallocation checking.
* lib/hash.h (hash_free): Move declaration up.
(hash_initialize, hash_xinitialize): Declare that deallocation must
happen through 'hash_free'.
2021-08-07 Bruno Haible
hamt: Improve GCC 11 allocation-deallocation checking.
* lib/hamt.h (hamt_free): Move declaration up.
(hamt_create, hamt_copy): Declare that deallocation must happen through
'hamt_free'.
2021-08-07 Bruno Haible
get_progname_of: Improve GCC 11 allocation-deallocation checking.
* lib/get_progname_of.h: Include .
(get_progname_of): Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
fts: Improve GCC 11 allocation-deallocation checking.
* lib/fts_.h (fts_open): Declare that deallocation must happen through
'fts_close'.
2021-08-07 Bruno Haible
eealloc: Improve GCC 11 allocation-deallocation checking.
* lib/eealloc.h (eemalloc): Declare that deallocation must happen
through 'free'.
2021-08-07 Bruno Haible
di-set: Improve GCC 11 allocation-deallocation checking.
* lib/di-set.h (di_set_free): Move declaration up.
(di_set_alloc): Declare that deallocation must happen through
'di_set_free'.
2021-08-07 Bruno Haible
[x]concat-filename: Improve GCC 11 allocation-deallocation checking.
* lib/concat-filename.h: Include .
(concatenated_filename, xconcatenated_filename): Declare that
deallocation must happen through 'free'.
2021-08-07 Bruno Haible
clean-temp: Improve GCC 11 allocation-deallocation checking.
* lib/clean-temp.h (cleanup_temp_dir): Move declaration up.
(create_temp_dir): Declare that deallocation must happen through
'cleanup_temp_dir'.
2021-08-07 Bruno Haible
canon-host: Improve GCC 11 allocation-deallocation checking.
* lib/canon-host.h: Include .
(canon_host, canon_host_r): Declare that deallocation must happen
through 'free'.
2021-08-07 Bruno Haible
c-xvasprintf: Improve GCC 11 allocation-deallocation checking.
* lib/c-xvasprintf.h: Include .
(c_xasprintf, c_xvasprintf): Declare that deallocation must happen
through 'free'.
2021-08-07 Bruno Haible
bitsetv: Improve GCC 11 allocation-deallocation checking.
* lib/bitsetv.h (bitsetv_free): Move declaration up.
(bitsetv_alloc, bitsetv_create): Declare that deallocation must happen
through 'bitsetv_free'.
bitset: Improve GCC 11 allocation-deallocation checking.
* lib/bitset.h (bitset_free): Move declaration up.
(bitset_alloc, bitset_create): Declare that deallocation must happen
through 'bitset_free'.
(bitset_obstack_free): Move declaration up.
(bitset_obstack_alloc): Declare that deallocation must happen through
'bitset_obstack_free'.
2021-08-07 Bruno Haible
argv-iter: Improve GCC 11 allocation-deallocation checking.
* lib/argv-iter.h (argv_iter_free): Move declaration up.
(argv_iter_init_argv, argv_iter_init_stream): Declare that deallocation
must happen through 'argv_iter_free'.
2021-08-07 Bruno Haible
argp: Improve GCC 11 allocation-deallocation checking.
* lib/argp-fmtstream.h (__argp_fmtstream_free, argp_fmtstream_free):
Move declarations up.
(__argp_make_fmtstream): Declare that deallocation must happen through
'__argp_fmtstream_free'.
(argp_make_fmtstream): Declare that deallocation must happen through
'argp_fmtstream_free'.
2021-08-07 Bruno Haible
areadlink, areadlinkat: Improve GCC 11 allocation-deallocation checking.
* lib/areadlink.h: Include instead of .
(areadlink, areadlink_with_size, areadlinkat, areadlinkat_with_size):
Declare that deallocation must happen through 'free'.
2021-08-07 Bruno Haible
stdio: Improve GCC 11 allocation-deallocation checking.
* lib/stdio.in.h (fdopen, fopen, tmpfile): Declare that deallocation
must happen through 'fclose'.
(popen): Declare that deallocation must happen through 'pclose'.
* lib/stdio-safer.h (fopen_safer, tmpfile_safer): Declare that
deallocation must happen through 'fclose'.
(popen_safer): Declare that deallocation must happen through 'pclose'.
(freopen_safer): Declare that arguments must be non-NULL.
2021-08-07 Bruno Haible
dirent: Improve GCC 11 allocation-deallocation checking.
* lib/dirent.in.h (closedir): Move declaration up.
(opendir, fdopendir): Declare that deallocation must happen through
'closedir'.
* lib/dirent-safer.h (opendir_safer): Likewise.
* lib/opendirat.h (opendirat): Likewise.
2021-08-07 Bruno Haible
stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
* lib/stdlib.in.h (free): Move declaration up.
(aligned_alloc, calloc, canonicalize_file_name, malloc, realloc):
Declare that deallocation must happen through 'free' (which may actually
be 'rpl_free').
* lib/string.in.h: Include .
(strdup): Declare deallocation.
* lib/wchar.in.h: Include .
(wcsdup): Declare deallocation.
* lib/malloc.in.h: Include .
(memalign): Declare deallocation.
2021-08-07 Bruno Haible
year2038: Fix recommendation regarding -m64 flag.
* m4/year2038.m4 (gl_YEAR2038_BODY): Recommend to put option --m64 in
CC, not in CPPFLAGS and LDFLAGS.
2021-08-07 Bruno Haible
quotearg: Tweak last commit.
* lib/quotearg.h: Don't include . Remove stray semicolon.
2021-08-07 Bruno Haible
malloca: Tweak last commit.
* lib/malloca.h: Keep use and declaration of mmalloca close together.
2021-08-07 Bruno Haible
dirname-lgpl, sh-quote, system-quote, xstriconv: Clean up includes.
* lib/dirname.h: Don't include .
* lib/sh-quote.h: Likewise.
* lib/system-quote.h: Likewise.
* lib/xstriconv.h: Likewise.
2021-08-07 Bruno Haible
dfa: Improve GCC 11 allocation-deallocation checking.
* lib/dfa.h (dfamust): Declare that deallocation must happen through
dfamustfree.
2021-08-06 Paul Eggert
glob: merge from glibc
* lib/glob-libc.h, lib/glob.c: Merge changes from glibc 2.34.
The result should be copyable directly into glibc.
* modules/glob-h (glob-libc.gl.h): Also omit __THROWNL.
2021-08-03 Simon Josefsson
announce-gen: Print SHA1/B64(SHA256) instead of MD5/SHA1.
* build-aux/announce-gen (%digest_classes): Removed.
(usage): Doc fix.
(print_checksums): Instead of MD5/SHA1, print SHA1 and
B64(SHA256), inspired by OpenSSH announcements.
maintainer-makefile: Print checksums by default.
* top/maint.mk (announcement): Drop --no-print-checksums.
2021-08-02 Paul Eggert
manywarnings: enable some malloc warnings
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Stop adding
-Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and
-Wno-analyzer-use-after-free, as these false alarms don’t seem
to be as much of an issue now that we’ve pacified a couple
of individual modules and GCC has some bug fixes.
dfa: omit unneeded malloc+free
Problem indirectly found by Coverity.
* lib/dfa.c (enlistnew): New function, with most of the body of
the old ‘enlist’. It assumes its arg NEW has been malloced and
can be freed eventually.
(enlist, addlists, dfamust): Use it.
(dfamust): Omit an unnecessary malloc+free.
year2038: port to unusual time_t platforms
* m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): Check that time_t
can go to 2**32 - 1, not to 2**63 - 1, as the former is enough to
be year 2038 safe. Unsigned 32-bit time_t (AmigaOS) and signed
40-bit time_t (Unisys ClearPath) have occurred in the wild, and
even if Gnulib code is rarely or never ported to them there’s no
need to exclude them merely because of year 2038 issues.
(gl_YEAR2038_BODY): Adjust messages to match. Use 2**32 - 1,
not 2**32, as the test timestamp, to allow unsigned 32-bit time_t.
2021-08-01 Paul Eggert
xalloc: no attribute (malloc (free)) on inline
The GCC manual says you can’t use __attribute__ ((__malloc__
(free, 1))) on inline functions. Problem discovered when
compiling diffutils 3.8 on RHEL 8.4 using a GCC 11.2.0 that I
built myself. Perhaps the problem was not discovered earlier
because the attribute works with ‘free’ (which is what I was
seeing before on Fedora 34) but not with ‘rpl_free’ (seen on RHEL
8.4). Anyway, the GCC manual says it shouldn’t work at all, so
don’t use it.
* lib/xalloc.h (xnmalloc, xcharalloc): No longer inline.
* lib/xmalloc.c (xcharalloc, xnmalloc): Move function bodies here.
* m4/gnulib-common.m4 (_GL_ATTRIBUTE_DEALLOC)
(_GL_ATTRIBUTE_DEALLOC_FREE): Document that these cannot be
used on inline functions, as per the GCC 11.2.1 manual.
sigsegv-tests: make more things static
* tests/test-sigsegv-catch-segv1.c:
* tests/test-sigsegv-catch-stackoverflow1.c:
* tests/test-sigsegv-catch-stackoverflow2.c:
Declare some functions and variables static, to pacify GCC when
warning about external functions missing declarations.
maint: improve -fanalyzer malloc checking
* lib/backup-internal.h, lib/backupfile.h:
* lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
* lib/filenamecat.h, lib/malloca.h, lib/modechange.h:
* lib/mountlist.h, lib/pagealign_alloc.h, lib/quotearg.h:
* lib/readutmp.h, lib/savedir.h, lib/sh-quote.h, lib/system-quote.h:
* lib/trim.h, lib/xgetcwd.h, lib/xgethostname.h, lib/xmalloca.h:
* lib/xreadlink.h, lib/xstriconv.h, lib/xvasprintf.h:
Add malloc-related attributes and include stdlib.h as needed.
* lib/dfa.c: Include verify.h.
(assume_nonnull): New macro.
(dfamust): Use it to pacify GCC.
* lib/malloca.c (mmalloca): Redo to pacify GCC, to cut down on the
number of casts, and to avoid signed integer overflow on
theoretical platforms.
* lib/vasnprintf.c, tests/test-argmatch.c:
Disable -Wanalyzer-null-argument here.
* m4/manywarnings.m4: Update GCC bug report number in comment.
2021-08-01 Jim Meyering
regex: pacify GCC 11.2.1's -fanalyzer
* lib/regex_internal.c (re_node_set_merge):
Add a debug assertion to pacify GCC 11.2.1's -fanalyzer.
2021-08-01 Bruno Haible
limits-h tests: Add tests for BOOL_MAX and BOOL_WIDTH.
* tests/test-limits-h.c (bool_attrs): New variable.
Check value of BOOL_MAX.
2021-07-31 Paul Eggert
regex: pacify GCC 11.2 -fanalyzer
* lib/regex_internal.c (re_node_set_insert):
Add a debug assertion to pacify GCC 11.2 -fanalyzer.
maint: pacify GCC 11.2 -fanalyzer in crypto tests
* tests/bench-digest.h (main): Report an error after memory
exhaustion, instead of using a null pointer.
2021-07-30 Paul Eggert
xalloc: add malloc-related function attributes
* lib/quotearg.h, lib/xalloc.h: Include stdlib.h, for
the benefit of _GL_ATTRIBUTE_RETURNS_NONNULL.
* lib/quotearg.h (clone_quoting_options):
* lib/xalloc.h (xmalloc, ximalloc, xzalloc, xizalloc, xcalloc)
(xicalloc, xrealloc, xirealloc, xireallocarray, x2realloc)
(x2nrealloc, xmemdup, ximemdup, xstrdup, xnmalloc, xcharalloc):
Add _GL_ATTRIBUTE_DALLOC_FREE and _GL_ATTRIBUTE_RETURNS_NONNULL
attributes as appropriate.
gnulib-common: update for gcc -Wmismatched-dealloc
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macros
_GL_ATTRIBUTE_DEALLOC and _GL_ATTRIBUTE_DEALLOC_FREE. These can
be useful with gcc -Wmismatched-dealloc.
gnulib-common: update for C2x 2020-12-11 draft
Use blessed-by-draft-standard way to test for [[__deprecated__]]
etc.; this is supported by GCC 11 and the fallback code should
work fine with GCC 10 and earlier.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro
_GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in
deciding whether to use C2x attributes like [[__deprecated__]].
manywarnings: document GCC 11 warnings
* build-aux/gcc-warning.spec: Add warnings introduced in GCC 11.
None of them require Gnulib code changes, so this is just
a documentation change.
limits-h: add BOOL_MAX, BOOL_WIDTH
* doc/posix-headers/limits.texi (limits.h): Document them.
* lib/limits.in.h: Also define CHAR_WIDTH etc. if C2x.
(BOOL_MAX, BOOL_WIDTH): New macros, from C2x.
* m4/limits-h.m4 (gl_LIMITS_H): Also check BOOL_WIDTH.
2021-07-28 Simon Josefsson
maintainer-makefile: Respect cfg.mk setting announcement_Cc_,
reverting most of the previous patch.
* top/maint.mk (announcement_mail_Cc_stable): Rename back to
announcement_Cc_stable.
(announcement_Cc_alpha): Rename back to
announcement_mail_Cc_alpha.
(announcement_Cc_): Renamed from announcement_mail_Cc_.
(announcement_mail_headers_stable)
(announcement_mail_headers_alpha): Use announcement_Cc_ again.
2021-07-28 Simon Josefsson
maintainer-makefile: Fix announcement mail CC's.
* top/maint.mk (announcement_Cc_stable): Rename to
announcement_mail_Cc_stable.
(announcement_Cc_alpha): Rename to announcement_mail_Cc_alpha.
(announcement_mail_headers_stable)
(announcement_mail_headers_alpha): Use announcement_mail_Cc_
instead of announcement_Cc_.
2021-07-25 Bruno Haible
Assume GNU gettext >= 0.17.
* modules/vasprintf (Notice): Remove.
* modules/xvasprintf (Notice): Remove.
* modules/xprintf (Notice): Remove.
* modules/error (Notice): Remove.
* modules/verror (Notice): Remove.
* modules/argp (Notice): Remove.
* modules/propername (Notice): Remove.
* lib/propername.h: Remove outdated comment.
2021-07-19 Simon Josefsson
gendocs.sh: Fix local rendering of HTML manuals.
* build-aux/gendocs.sh (htmlarg): Don't use relative URLs.
2021-07-18 Paul Eggert
explicit_bzero-tests: pacify GCC better
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2021-07/msg00039.html
* tests/test-explicit_bzero.c: Ignore -Wmaybe-uninitialized.
(stackbuf): Remove this static pointer, reverting recent change.
(do_secret_stuff, test_stack): Revert these related changes too.
2021-07-17 Paul Eggert
memrchr-tests: pacify GCC
Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
* tests/test-memrchr.c: Disable -Wmaybe-uninitialized.
explicit_bzero-tests: pacify GCC
Redo to pacify -Wmaybe-uninitialized with
GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
* tests/test-explicit_bzero.c (stackbuf): New static pointer.
(do_secret_stuff): Use it.
(test_stack): Set it to a local buffer.
posixtm: pacify latest GCC
Also, modernize while I’m at it.
* lib/posixtm.c: Include c-ctype.h, idx.h, intprops.h, verify.h
instead of stdlib.h.
(ISDIGIT): Remove. All uses replaced by c_isdigit.
(year, posix_time_parse): Prefer idx_t to size_t. Use assume
instead of abort.
(posixtime): Do not parse twice; once is enough. That way, we
needn’t worry about a bogus warning about strcpy overrunning a
buffer from GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64
when coreutils is configured with --enable-gcc-warnings.
* modules/posixtm (Depends-on): Add c-ctype, intprops, verify.
Remove stpcpy.
2021-07-17 Bruno Haible
Don't use '#pragma weak' for thread functions in Linux/glibc>=2.34.
Suggested by Florian Weimer in
.
* m4/threadlib.m4 (gl_PTHREADLIB_BODY): Set gl_pthread_in_glibc and set
LIBPMULTITHREAD accordingly.
(gl_STDTHREADLIB_BODY): Update comments.
(gl_THREADLIB_BODY): Define USE_POSIX_THREADS_FROM_LIBC.
* lib/glthread/thread.h (c11_threads_in_use): Define to 1 if all POSIX
thread functions are in libc.
* lib/glthread/lock.h (c11_threads_in_use): Likewise.
* lib/glthread/cond.h (c11_threads_in_use): Likewise.
* lib/glthread/tls.h (c11_threads_in_use): Likewise.
2021-07-17 Bruno Haible
Fix cross-compilation test results.
* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, include
before testing __GNU_LIBRARY__.
* m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
2021-07-14 Paul Eggert
regex: modernize to newer regex bugset
Problem reported by Hiroo Hayashi in:
https://lists.gnu.org/r/bug-gnulib/2021-07/msg00024.html
* m4/regex.m4 (gl_REGEX): Allow newer glibc behavior for ()0|\1,
behavior where the regex compiles but does not match.
Test for glibc bug 11053.
* tests/test-regex.c (bug_regex11, main): Add casts needed
for printf portability.
(main): Allow newer glibc behavior for ()0|\1.
regex: fix shell quoting problem in configuration
* m4/regex.m4 (gl_REGEX): Fix quoting problems.
These C programs are put into unquoted here-documents,
so $ and \ need to be quoted.
2021-07-08 Paul Eggert
select: port better to MinGW
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/bug-gnulib/2021-07/msg00017.html
* lib/select.c (rpl_select) [_WIN32 && !__CYGWIN__]:
Pass a SOCKET, not a HANDLE, to FD_ISSET.
2021-07-06 Paul Eggert
year2038: Add --disable-year2038 option
Also, document this stuff better. Suggested by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2021-07/msg00011.html
* doc/year2038.texi: Document --disable-year2038.
* m4/year2038.m4 (gl_YEAR2038_BODY): Support ‘./configure
--disable-year2038’ to disable 64-bit time_t when that is not the
default. Arg is now either empty or nonempty (not a shell
command) and is evaluated at m4 expansion time instead of at
runtime; all callers changed.
doc: clarify which module fixes 32-bit time_t
* doc/posix-headers/time.texi: Make it clear that the 32-bit
time_t problem is addressed by the year2038 module, not
by the time module.
2021-07-01 Paul Eggert
year2038: support glibc 2.34 _TIME_BITS=64
In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit,
defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit.
Apps must define both macros. Gnulib applications that use either
the largefile or the year2038 modules will want this behavior;
largefile because it deals with the off_t and ino_t components of
struct stat already, and so should also deal with time_t.
* NEWS, doc/largefile.texi, doc/posix-headers/time.texi:
Mention this.
* m4/largefile.m4: Override two macros even in Autoconf 2.70 and later.
(_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in
case some other Gnulib macro has #defined it.
(AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs.
Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64.
* m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro.
(gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this
macro is designed to be used directly instead of being
AC_REQUIREd. It takes an argument specifying whether 64-bit is
required. Set _TIME_BITS=64 if this makes a difference in time_t
width when setting _FILE_OFFSET_BITS=64. Do not warn about
32-bit time_t more than once.
* modules/largefile (Files): Add year2038.m4.
(Depends-on): Require gl_YEAR2038_EARLY.
relocatable-prog-wrapper: add m4 files
Add .m4 files needed for standalone relocatable-prog-wrapper, so
that ‘./gnulib-tool --test relocatable-prog-wrapper’ does not fail
with diagnostics like ‘configure.ac:63: error: possibly undefined
macro: gl_FUNC_MALLOC_POSIX’.
* modules/relocatable-prog-wrapper (Files): Add m4/free.m4,
m4/malloc.m4, m4/mempcpy.m4, m4/rawmemchr.m4, m4/realloc.m4.
2021-06-28 Bruno Haible
strerror-override: Fix possible compilation error.
Reported by Thomas Klausner .
* lib/strerror-override.h (GNULIB_defined_strerror_override_macro): New
macro.
* lib/strerror-override.c (strerror_override): Don't define if
GNULIB_defined_strerror_override_macro is set.
2021-06-27 Bruno Haible
environ: Fix wrong autoconf test result in C++ mode.
* m4/environ.m4 (gt_CHECK_VAR_DECL): Use a typedef'ed type, not an
anonymous type.
2021-06-22 Egor Ignatov (tiny change)
regex: fix undefined behavior
Problem reported by Paul Eggert in:
https://lists.gnu.org/r/bug-gnulib/2021-06/msg00115.html
* lib/regexec.c (proceed_next_node):
Don’t insert already-inserted node.
2021-06-21 Eric Blake
sigsegv, sigsegv-tests: Assign my contributions to the FSF.
* m4/sigaltstack.m4: Change copyright notice: Write "Copyright (C) FSF"
instead of "Copyright (C) Eric Blake".
* tests/altstack-util.h: Likewise.
* tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
2021-06-20 Bruno Haible
unistd: Avoid compilation error in C++ mode on Solaris, HP-UX, mingw.
Reported by Eli Zaretskii in
.
* lib/unistd.in.h (swab): Consider different declarations on Solaris,
HP-UX, and old mingw.
2021-06-20 Bruno Haible
Sync with GNU gettext.
* lib/printf-parse.c: Ignore IN_LIBINTL and IN_LIBASPRINTF.
* lib/vasnprintf.c: Ignore IN_LIBINTL.
2021-06-19 Bruno Haible
Sync with GNU gettext.
* lib/tsearch.c: Ignore IN_LIBINTL.
* lib/localename-table.h: Likewise.
* lib/localename.c: Ignore IN_LIBINTL in some places.
2021-06-19 Bruno Haible
unistd: Improve conflict resolution between gnulib and textstyle.h.
* lib/unistd.in.h (GNULIB_overrides_isatty): New macro.
2021-06-19 Bruno Haible
stdio: Improve conflict resolution between gnulib and libintl.h.
* lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf,
GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf,
GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros.
2021-06-19 Bruno Haible
declared.sh: Allow parsing 'extern "C"' lines.
* build-aux/declared.sh: Don't concatenate lines to an 'extern "C" {'
line.
2021-06-19 Bruno Haible
unitypes: Fix trouble caused by installed older versions of unitypes.h.
* modules/unitypes (configure.ac): Define _UC_RESTRICT through config.h.
2021-06-19 Bruno Haible
sigsegv, sigsegv-tests: Assign my contributions to the FSF.
* lib/sigsegv.in.h: Change copyright notice: Write "Copyright (C) FSF"
instead of "Copyright (C) Bruno Haible".
* lib/sigsegv.c: Likewise.
* lib/stackvma.h: Likewise.
* lib/stackvma.c: Likewise.
* m4/sigaltstack.m4: Likewise.
* m4/stack-direction.m4: Likewise.
* tests/altstack-util.h: Likewise.
* tests/mmap-anon-util.h: Likewise.
* tests/test-sigsegv-catch-segv1.c: Likewise.
* tests/test-sigsegv-catch-segv2.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
2021-06-18 Darren Kenny (tiny change)
argp: Avoid possible NULL access in argp_help.
Reported by Coverity. The invocation chain is:
argp_help -> _help -> fill_in_uparams -> validate_uparams.
* lib/argp-help.c (validate_uparams): Don't crash if state == NULL.
2021-06-16 Bruno Haible
tsearch: Relicense under LGPLv2+.
* modules/tsearch (License): Change to LGPLv2+.
* lib/tsearch.c: Update license notice.
2021-06-15 Bruno Haible
pipe-filter-ii tests: Fix long-standing failure on native Windows.
* tests/test-pipe-filter-ii2-main.c: Include binary-io.h.
(main): Avoid NL to CRLF conversion on standard output.
* tests/test-pipe-filter-ii2-child.c: Include , binary-io.h.
(main): Avoid NL to CRLF conversion on standard output.
2021-06-15 Bruno Haible
xnanosleep: Improve module description.
* modules/xnanosleep (Description): Improve.
* lib/xnanosleep.h: Add comment. Make includable from C++.
* lib/xnanosleep.c: Update comment.
2021-06-15 Bruno Haible
xfreopen: Improve module description.
* modules/xfreopen (Description): Improve.
* lib/xfreopen.h: Add comments. Make includable from C++.
* lib/xfreopen.c: Update comment.
2021-06-14 Paul Eggert
idx: new printf/scanf length modifier macro
* lib/idx.h (pIDX): New macro.
2021-06-13 Bruno Haible
Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11).
Reported by Paul Eggert.
* m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
GNULIB_UNISTD_H_GETOPT variable.
* modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
variable.
* modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
processing done by gnulib-tool since 2021-04-11.
* gnulib-tool: Revert last change.
* pygnulib/GLEmiter.py: Likewise.
2021-06-13 Paul Eggert
* lib/stack.h (_GL_STACK_PREFIX): Omit stray semicolon.
getopt-gnu: port back to Solaris 10
* gnulib-tool (func_emit_lib_Makefile_am)
(func_emit_tests_Makefile_am): Don’t substitute things like
$(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT),
as this mishandles unistd and getopt-gnu, which breaks
‘make check’ on Solaris 10 with getopt-gnu.
* pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am):
Likewise, albeit hackier since I did not test this and
so went with a trivial hack instead.
2021-06-13 Bruno Haible
ialloc: Put appropriate license notice in source files.
* lib/ialloc.h: Use LGPLv3+ notice.
* lib/ialloc.c: Likewise.
2021-06-11 Paul Eggert
xalloc: new idx_t-based allocators
This is for code that prefers to use idx_t for sizes.
* lib/basename.c (base_name):
* lib/dfa.c (mbs_to_wchar, state_index, dfaoptimize, dfaanalyze)
(icatalloc, enlist, allocmust, dfamust):
* lib/exclude.c (struct exclude_pattern, free_exclude_segment)
(file_pattern_matches, add_exclude, add_exclude_fp):
* lib/getusershell.c (line_size, readname):
* lib/linebuffer.c (readlinebuffer_delim):
* lib/linebuffer.h (struct linebuffer):
* lib/readtokens.c (readtoken, readtokens):
* lib/readutmp.c (read_utmp):
* lib/savedir.c (streamsavedir):
* lib/stack.h (_GL_STACK_TYPE, _GL_STACK_PREFIX):
* lib/userspec.c (parse_with_separator):
* lib/xgethostname.c (XGETANAME):
Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
* lib/basename.c: Do not include xstrndup.h.
(basename): Simplify by always using memcpy.
* lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc)
(xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]:
New decls.
(x2nrealloc): Now just a decl, as the body is moved into xmalloc.c.
* lib/xmalloc.c: Include ialloc.h.
Rename some local parameters to be consistent with the .h files.
(nonnull): New static function.
(xmalloc, xcalloc): Simplify by using nonnull.
(ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc)
(ximemdup, ximemdup0): New functions.
(x2nrealloc): Moved here from xalloc.h.
* modules/xalloc (Depends-on): Add ialloc.
* modules/dirname (Depends-on): Removbe xstrndup.
* modules/linebuffer (Depends-on): Add idx.
ialloc: new module
* lib/ialloc.c, lib/ialloc.h, modules/ialloc: New files.
exclude: improve wide-character hashing
* lib/exclude.c (string_hasher_ci): Take the modulo at the end
rather than each time a wide character is retrieved; this should
be more efficient and should hash better.
2021-06-11 Bruno Haible
Make message in last commit more precise.
Suggested by Eric Blake.
* gnulib-tool (func_emit_tests_Makefile_am): Add more precision to
'check-notice' message.
2021-06-10 Bruno Haible
Clarify where to report test failures from Gnulib tests.
* gnulib-tool (func_emit_tests_Makefile_am): Emit a dependency of
'check-am' on 'check-notice' that prints a notice.
2021-06-10 Bruno Haible
Clarify that compiler warnings in the Gnulib tests can be ignored.
* gnulib-tool (func_emit_tests_Makefile_am): Emit overrides for CFLAGS
and CXXFLAGS. Emit a dependency of 'all' on 'all-notice' that prints a
notice.
(func_emit_initmacro_start): Add a second argument. If it is true, emit
code to require gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS.
(func_import, func_create_testdir): All callers updated.
* m4/gnulib-common.m4 (gl_CC_ALLOW_WARNINGS, gl_CXX_ALLOW_WARNINGS): New
macros.
2021-06-09 Bruno Haible
sigsegv tests: Hide a null pointer from the compiler's optimizations.
Patch by Paul Eggert.
* tests/test-sigsegv-catch-stackoverflow2.c
(null_pointer_to_volatile_int): New variable.
(main): Use it.
2021-06-07 Bruno Haible
get_ppid_of: Add support for DragonFly BSD.
* lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
2021-06-07 Bruno Haible
sigsegv: Document context type for DragonFly BSD.
* lib/sigsegv.in.h (stackoverflow_context_t): On DragonFly BSD, it is a
pointer to 'struct sigcontext'.
2021-06-07 Bruno Haible
dynarray, scratch_buffer: Fix VPATH builds (regression from yesterday).
* modules/dynarray (configure.ac): Invoke AC_PROG_MKDIR_P.
(Makefile.am): Create malloc/ directory before creating
malloc/dynarray.gl.h and malloc/dynarray-skeleton.gl.h.
* modules/scratch_buffer (configure.ac): Invoke AC_PROG_MKDIR_P.
(Makefile.am): Create malloc/ directory before creating
malloc/scratch_buffer.gl.h.
2021-06-07 Bruno Haible
ptsname_r: Add support for DragonFly BSD 6.0.
* lib/ptsname_r.c (__ptsname_r): Add implementation for DragonFly BSD.
* tests/test-ptsname_r.c (main): Treat Dragonfly BSD like Solaris.
2021-06-07 Bruno Haible
Avoid some test failures on DragonFly BSD 6.0.
* tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that
fail.
* tests/test-c32isalpha.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isupper.c (main): Likewise.
* tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.
2021-06-07 Kamil Dudka
mountlist: recognize fuse.portal as dummy file system
* lib/mountlist.c [ME_DUMMY_0]: Add "fuse.portal" as
a dummy file system (used in flatpak implementations).
2021-06-07 Bruno Haible
host-os: Add support for DragonFly BSD.
* m4/host-os.m4 (gl_HOST_OS): On DragonFly BSD, set
HOST_OPERATING_SYSTEM to "DragonFly BSD", not "Dragonfly".
2021-06-07 Bruno Haible
thread: Fix test link error on DragonFly BSD 6.0.
* lib/glthread/thread.c (gl_thread_create): Moved to here...
* lib/glthread/thread.h (gl_thread_create): ...from here.
(_GLTHREAD_THREAD_INLINE): Remove macro.
Remove _GL_INLINE_HEADER_BEGIN/END invocations.
2021-06-06 Bruno Haible
sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".
Reported by Dmitry V. Levin in
.
* lib/sigsegv.c (sigsegv_handler): Use a different local variable name
than 'sig'.
2021-06-06 Bruno Haible
scratch_buffer: Avoid conflict with prepr. macros owned by the system.
* lib/scratch_buffer.h: Don't include . Define
_GL_LIKELY, _GL_UNLIKELY. Include malloc/scratch_buffer.gl.h instead of
malloc/scratch_buffer.h.
* modules/scratch_buffer (Depends-on): Add builtin-expect.
(Makefile.am): Arrange to create malloc/scratch_buffer.gl.h from
malloc/scratch_buffer.h.
2021-06-06 Bruno Haible
dynarray: Avoid conflict with preprocessor macros owned by the system.
* lib/dynarray.h: Don't include . Define _GL_LIKELY,
_GL_UNLIKELY. Include malloc/dynarray.gl.h instead of malloc/dynarray.h.
Include malloc/dynarray-skeleton.gl.h instead of
malloc/dynarray-skeleton.c.
* modules/dynarray (Depends-on): Add builtin-expect.
(Makefile.am): Arrange to create malloc/dynarray.gl.h from
malloc/dynarray.h and malloc/dynarray-skeleton.gl.h from
malloc/dynarray-skeleton.c.
2021-06-06 Bruno Haible
glob-h: Avoid conflict with preprocessor macros owned by the system.
This fixes a compilation error on DragonFly BSD 6.0.
* lib/glob.in.h: Don't include . Don't define __USE_GNU.
Include glob-libc.gl.h instead of glob-libc.h.
* modules/glob-h (Makefile.am): Arrange to create glob-libc.gl.h from
glob-libc.h.
* lib/libc-config.h: Add comment.
2021-06-06 Dmitry V. Levin
* tests/test-regex.c (tests): Add test cases for *+ and ** regressions
fixed by the previous commit.
* tests/test-regex.c (tests): Remove the comment saying that some tests
are not used. That comment was copied along with tests from glibc
where some of these tests are commented out.
2021-06-06 Egor Ignatov (tiny change)
* lib/regexec.c (set_regs): Pop if CUR_NODE has already been checked
only when we have a fail stack.
2021-06-05 Bruno Haible
lib-symbol-visibility: Make configure check work for newer GCC.
Reported by Ozkan Sezer in
.
* m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each
declaration in the test program.
2021-06-05 Bruno Haible
vasnprintf: Don't leak memory when memory allocation fails.
Found by Coverity. Reported by Mike Fabian in
.
* lib/vasnprintf.c (VASNPRINTF): In places where a local variable points
to heap-allocated storage, free that storage before doing
'goto out_of_memory;'.
2021-06-04 Bruno Haible
gnulib-tool: Stop doing license notice replacements.
* gnulib-tool: Don't document --more-symlinks and --more-hardlinks any
more.
(do_copyrights): Remove variable.
(func_import): Don't perform license updates on imported files any more.
* pygnulib/GLInfo.py: Don't document --more-symlinks any more.
* doc/gnulib-intro.texi (Copyright): Document the new situation.
* doc/gnulib.texi (Module description): Likewise.
* NEWS: Mention the change.
2021-06-04 Bruno Haible
git-merge-changelog: Fix license.
* modules/git-merge-changelog (License): Change back to GPL.
* lib/git-merge-changelog.c: Use a GPLv3+ notice.
2021-06-04 Bruno Haible
Put GPLv3+ notices in source files where appropriate.
* lib/*.{h,c}: Use GPLv3+ notice whenever the module description says
so.
* build-aux/pmccabe.css: Likewise.
2021-06-04 Bruno Haible
Put LGPLv3+ notices in source files where appropriate.
* lib/*.{h,c}: Use LGPLv3+ notice whenever the module description says
so.
2021-06-04 Bruno Haible
Put "LGPLv3+ or GPLv2+" notices in source files where appropriate.
* lib/**.{h,c,gperf}: Use "LGPLv3+ or GPLv2+" notice whenever the module
description says so.
2021-06-04 Bruno Haible
Generate correct license notices in libunistring files.
* lib/gen-uni-tables.c (output_library_license, output_tests_license):
New functions.
(output_predicate, output_category, output_combclass,
output_bidi_category, output_decimal_digit, output_digit,
output_numeric, output_mirror, output_joining_type,
output_joining_group, output_scripts, output_scripts_byname,
output_blocks, output_ident_category, output_lbrk_tables,
output_wbrk_tables, output_gbp_table, output_decomposition_tables,
output_composition_tables, output_simple_mapping, output_casing_rules):
Invoke output_library_license.
(output_predicate_test, output_decimal_digit_test, output_digit_test,
output_numeric_test, output_joining_type_test,
output_joining_group_test, output_gbp_test, output_simple_mapping_test):
Invoke output_tests_license.
* lib/uni*/*.h, lib/uni*/*.gperf: Regenerated.
* tests/uni*/*.h: Likewise.
2021-06-04 Bruno Haible
Generate correct license notices in libunistring files.
* lib/uniname/gen-uninames.lisp (main): Emit a copyright and license
notice.
* lib/uniname/uninames.h: Regenerated.
2021-06-04 Bruno Haible
Put LGPLv2+ notices in source files where appropriate.
* lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
says so.
2021-06-04 Bruno Haible
Put "unlimited" notices in source files where appropriate.
* build-aux/prefix-gnulib-mk: Use "unlimited" notice, since the module
description says so.
2021-06-04 Bruno Haible
Put public domain notices in source files where appropriate.
* lib/{alloca.c,atexit.c,memmove.c}: Use public domain notice.
2021-06-04 Bruno Haible
Revamp check-copyright script.
* check-copyright: Search only the first 50 lines of each file.
Recognize 'LGPLv3+ or GPLv2+', 'unlimited', and 'public domain' license
notices. For files that are part of several modules, consider the
weakest among the licenses. Allocate more room for the first output
column.
2021-06-04 Bruno Haible
gnupload, git-merge-changelog: Fix module description.
* gnulib-tool (func_import, func_create_testdir): Treat
'GPLv2+ build tool' like 'GPLed build tool'.
* pygnulib/GLImport.py (prepare): Likewise.
* modules/gnupload (License): Change to 'GPLv2+ build tool'.
* modules/git-merge-changelog (License): Change to GPLv2+.
2021-06-04 Bruno Haible
New directory with license notices.
* etc/license-notices/*: New files.
2021-05-30 Paul Eggert
reallocarray-tests: port to weird platforms
* tests/test-reallocarray.c (main): Don’t assume that
PTRDIFF_MAX / 2 + 1 <= SIZE_MAX. POSIX allows platforms
where this isn’t true, though I don’t know of any examples.
dfa, etc.: prefer xreallocarray to older name
* lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist):
* lib/readtokens.c (readtokens):
* tests/uninorm/test-u32-normalize-big.c:
(read_normalization_test_file):
Prefer xreallocarray to the equivalent xnrealloc.
The newer name follows the glibc lead of ‘reallocarray’.
2021-05-30 Bruno Haible
Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
* modules/* (License): Change.
* gnulib-tool (func_import, func_create_testdir): Likewise.
2021-05-29 Paul Eggert
sigsegv: Port to Solaris 11
Problem reported by Kiyoshi KANAZAWA in:
https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html
* lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android.
2021-05-24 Bruno Haible
c-stack: Document another restriction.
Triggered by a discussion with Paul Eggert.
* lib/c-stack.h: Mention that ACTION should not use nested functions.
2021-05-22 Bruno Haible
stdio: Fix compilation error on DragonFly BSD.
* lib/stdio.in.h (fcloseall): Treat DragonFly BSD like FreeBSD.
2021-05-22 Larkin Nickle (tiny change)
getprogname: port to Tru64
* lib/getprogname.c: Treat __osf__ like __sgi, except
with /proc/123 instead of /proc/pinfo/123.
2021-05-21 Paul Eggert
sigsegv: don’t assume SIGSTKSZ is a constant
* m4/sigaltstack.m4 (SV_SIGALTSTACK): Don’t attempt to override
SIGSTKSZ. Instead, use an array that is plenty large, while
checking that it’s large enough. Also, be consistent about
putting that array in static storage rather than on the stack.
* tests/altstack-util.h (SIGSTKSZ): Don’t define.
(MYSTACK_SIZE): New macro, used instead of SIGSTKSZ.
(mystack_storage, mystack): Now static.
(prepare_alternate_stack) [SIGSTKSZ]:
Check that MYSTACK_SIZE is large enough.
2021-05-20 Paul Eggert
fstatat: doc improvement
* doc/posix-functions/fstatat.texi (fstatat):
Mention AT_EMPTY_PATH when talking about empty strings.
2021-05-18 Bruno Haible
c-stack: Support catching stack overflow on most platforms without libsigsegv.
* lib/c-stack.c: Remove all Solaris-specific code. Include
always.
* m4/c-stack.m4: Remove all Solaris-specific code.
(gl_C_STACK): Test $with_libsigsegv from module 'sigsegv'.
* modules/c-stack (Files): Remove m4/libsigsegv.m4.
(Depends-on): Add sigsegv. Remove havelib, intprops, inttypes, mempcpy,
sigaction, stdbool.
2021-05-16 Bruno Haible
sigsegv, c-stack: Avoid compilation error with glibc >= 2.34.
* lib/sigsegv.in.h (SIGSTKSZ): On glibc systems, redefine to a suitable
constant.
* m4/sigaltstack.m4 (SV_SIGALTSTACK): Likewise.
* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
2021-05-16 Bruno Haible
sigsegv: Add tests.
* tests/test-sigsegv-catch-segv1.c: New file, from GNU libsigsegv with
modifications.
* tests/test-sigsegv-catch-segv2.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
* tests/altstack-util.h: Likewise.
* tests/mmap-anon-util.h: Likewise.
* modules/sigsegv-tests: New file.
sigsegv: New module.
* lib/sigsegv.in.h: New file, from GNU libsigsegv with modifications.
* lib/sigsegv.c: Likewise.
* lib/stackvma.h: Likewise.
* lib/stackvma.c: Likewise.
* m4/sigaltstack.m4: Likewise.
* m4/stack-direction.m4: Likewise.
* modules/sigsegv: New file.
2021-05-15 Pádraig Brady