]> Savannah Git Hosting - gnulib.git/log
gnulib.git
8 months agoDoc regarding functions introduced in Android API level 35.
Bruno Haible [Wed, 4 Sep 2024 08:21:31 +0000 (10:21 +0200)]
Doc regarding functions introduced in Android API level 35.

* doc/posix-functions/_Fork.texi: Mention the Android API levels.
* doc/glibc-functions/epoll_pwait2.texi: Likewise.
* doc/glibc-functions/strerrorname_np.texi: Likewise.

8 months agotests: Strenghten tests with invalid file descriptor.
Bruno Haible [Tue, 3 Sep 2024 21:00:28 +0000 (23:00 +0200)]
tests: Strenghten tests with invalid file descriptor.

* tests/test-close.c: Include <fcntl.h>.
(main): Check that AT_FDCWD is recognized as an invalid file descriptor.
* tests/test-dup.c: Include <fcntl.h>.
(main): Check that AT_FDCWD is recognized as an invalid file descriptor.
* tests/test-unlockpt.c: Include <fcntl.h>.
(main): Check that AT_FDCWD is recognized as an invalid file descriptor.
* tests/test-fchdir.c (main): Likewise.
* tests/test-fdatasync.c (main): Likewise.
* tests/test-fdopendir.c (main): Likewise.
* tests/test-fsync.c (main): Likewise.
* tests/test-isatty.c (main): Likewise.

8 months agodoc: More details about pthread_setname_np.
Bruno Haible [Tue, 3 Sep 2024 20:25:29 +0000 (22:25 +0200)]
doc: More details about pthread_setname_np.

Reported by Eric Gallager <egall@gwmail.gwu.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00017.html>.

* doc/glibc-functions/pthread_setname_np.texi: Mention the different
signature on macOS.

8 months agosyntax-check: Catch all FSF postal addresses.
Simon Josefsson [Tue, 3 Sep 2024 18:40:51 +0000 (20:40 +0200)]
syntax-check: Catch all FSF postal addresses.

* top/maint.mk (sc_franklin_street): Rename to sc_fsf_postal,
improve regexp.

8 months agounlockpt tests: Avoid test failure on Haiku.
Bruno Haible [Tue, 3 Sep 2024 11:32:40 +0000 (13:32 +0200)]
unlockpt tests: Avoid test failure on Haiku.

* tests/test-unlockpt.c (main): Skip the test on Haiku.
* doc/posix-functions/unlockpt.texi: Update platforms list.

8 months agodoc: Mention a gmtime_r problem.
Bruno Haible [Tue, 3 Sep 2024 09:34:11 +0000 (11:34 +0200)]
doc: Mention a gmtime_r problem.

* doc/posix-functions/gmtime_r.texi: Mention "UTC" vs. "GMT".

8 months agovma-prot tests: Strengthen test.
Bruno Haible [Mon, 2 Sep 2024 11:49:05 +0000 (13:49 +0200)]
vma-prot tests: Strengthen test.

Found by Coverity.

* tests/test-vma-prot.c (main): Fix typo.

8 months agosyntax-check: Catch obsolete Franklin Street usages.
Simon Josefsson [Mon, 2 Sep 2024 10:46:38 +0000 (12:46 +0200)]
syntax-check: Catch obsolete Franklin Street usages.

* top/maint.mk (sc_franklin_street): New function.

8 months agoerror, getprogname: Stricter dependency conditions.
Bruno Haible [Mon, 2 Sep 2024 08:42:53 +0000 (10:42 +0200)]
error, getprogname: Stricter dependency conditions.

* modules/error (Depends-on): Add dependency condition.
* modules/getprogname (Depends-on): Make dependency condition stricter.
(configure.ac): Require AC_CANONICAL_HOST.

8 months agoutime, futimens tests: Avoid test failure on Haiku.
Bruno Haible [Mon, 2 Sep 2024 07:27:04 +0000 (09:27 +0200)]
utime, futimens tests: Avoid test failure on Haiku.

* tests/test-utimens-common.h (checkable_atime): On Haiku, return false.

8 months agostrtold: Work around a Haiku bug.
Bruno Haible [Sun, 1 Sep 2024 21:25:42 +0000 (23:25 +0200)]
strtold: Work around a Haiku bug.

* lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 for 'long double'
parsing on Haiku.
* doc/posix-functions/strtold.texi: Mention the bug.

8 months agomath: Remove workaround for an older Haiku bug.
Bruno Haible [Sun, 1 Sep 2024 16:09:28 +0000 (18:09 +0200)]
math: Remove workaround for an older Haiku bug.

* lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Don't override on Haiku.
* doc/posix-headers/math.texi: Update.

8 months agoAvoid using postal address in license
Simon Josefsson [Sun, 1 Sep 2024 13:05:24 +0000 (15:05 +0200)]
Avoid using postal address in license

* lib/dfa.h, lib/dfa.c: Update license header.
* lib/localeinfo.h, lib/localeinfo.c: Likewise.
* tests/test-dfa-match-aux.c: Likewise.

8 months agoFix mbscasestr test failure on native Windows with MSVC.
Bruno Haible [Sun, 1 Sep 2024 11:09:59 +0000 (13:09 +0200)]
Fix mbscasestr test failure on native Windows with MSVC.

* lib/c32to-impl.h (FUNC): On native Windows, ignore the system's
towlower/towupper function entirely.
* tests/test-c32tolower.c (main): On native Windows, reenable test that
previously failed.
* tests/test-c32toupper.c (main): Likewise. Disable two other tests on
native Windows.
* doc/posix-functions/towlower.texi: Mention bug in the native Windows
UTF-8 locale.
* doc/posix-functions/towupper.texi: Likewise.

8 months agoFix quoting of $LOCALE_EN_UTF8 (regression yesterday).
Bruno Haible [Sun, 1 Sep 2024 10:42:30 +0000 (12:42 +0200)]
Fix quoting of $LOCALE_EN_UTF8 (regression yesterday).

* m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Properly quote $LOCALE_EN_UTF8.
* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
* m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
* m4/mbrtoc16.m4 (gl_MBRTOC16_NULL_DESTINATION): Likewise.
* m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_NULL_ARG1,
gl_MBRTOWC_NULL_ARG2, gl_MBRTOWC_RETVAL, gl_MBRTOWC_STORES_INCOMPLETE):
Likewise.
* m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.

8 months agodoc: Mention how to obtain UTF-8 locales.
Bruno Haible [Sun, 1 Sep 2024 09:21:43 +0000 (11:21 +0200)]
doc: Mention how to obtain UTF-8 locales.

* doc/posix-functions/setlocale.texi: Mention the names of UTF-8 locales
and the needed compiler flags.

8 months agodoc: Fix typo.
Collin Funk [Sun, 1 Sep 2024 05:36:31 +0000 (22:36 -0700)]
doc: Fix typo.

* doc/pastposix-functions/siginterrupt.texi (siginterrupt): Fix typo.

8 months agoStrengthen LC_CTYPE configure tests on OpenBSD, Android, Haiku.
Bruno Haible [Sat, 31 Aug 2024 23:57:29 +0000 (01:57 +0200)]
Strengthen LC_CTYPE configure tests on OpenBSD, Android, Haiku.

* m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Require gt_LOCALE_EN_UTF8 instead of
gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
* m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
gl_MBRTOWC_NULL_ARG1, gl_MBRTOWC_NULL_ARG2, gl_MBRTOWC_RETVAL,
gl_MBRTOWC_STORES_INCOMPLETE): Likewise.
* m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
* m4/mbrtoc16.m4 (gl_MBRTOC16_NULL_DESTINATION): Require
gt_LOCALE_EN_UTF8 instead of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8
instead of LOCALE_FR_UTF8. Update cross-compilation guess.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* modules/btowc (Files): Add m4/locale-en.m4.
* modules/c32isalnum (Files): Likewise.
* modules/c32isalpha (Files): Likewise.
* modules/c32isblank (Files): Likewise.
* modules/c32iscntrl (Files): Likewise.
* modules/c32isdigit (Files): Likewise.
* modules/c32isgraph (Files): Likewise.
* modules/c32islower (Files): Likewise.
* modules/c32isprint (Files): Likewise.
* modules/c32ispunct (Files): Likewise.
* modules/c32isspace (Files): Likewise.
* modules/c32isupper (Files): Likewise.
* modules/c32isxdigit (Files): Likewise.
* modules/c32rtomb (Files): Likewise.
* modules/c32tob (Files): Likewise.
* modules/c32tolower (Files): Likewise.
* modules/c32toupper (Files): Likewise.
* modules/c32width (Files): Likewise.
* modules/iswdigit (Files): Likewise.
* modules/mbrtoc16 (Files): Likewise.
* modules/mbrtoc32 (Files): Likewise.
* modules/mbsnrtowcs (Files): Likewise.
* modules/mbsrtowcs (Files): Likewise.
* modules/wcrtomb (Files): Likewise.
* modules/wcsnrtombs (Files): Likewise.
* modules/wcsrtombs (Files): Likewise.
* modules/wctob (Files): Likewise.
* modules/mbrlen (Files): Add m4/locale-en.m4. Remove m4/locale-fr.m4.
* modules/mbrtowc (Files): Likewise.
* modules/stdlib (Files): Likewise.

8 months agoUpdate users.txt.
Colin Watson [Sat, 31 Aug 2024 21:34:30 +0000 (22:34 +0100)]
Update users.txt.

* users.txt: Add libpipeline.

Copyright-paperwork-exempt: Yes

8 months agotests: Avoid some test failures on Android.
Bruno Haible [Sat, 31 Aug 2024 22:13:49 +0000 (00:13 +0200)]
tests: Avoid some test failures on Android.

* tests/test-c32isalpha.c (main): Disable tests that fail on Android.
* tests/test-c32iscntrl.c (main): Likewise.
* tests/test-c32isgraph.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isprint.c (main): Likewise.
* tests/test-c32ispunct.c (main): Likewise.
* tests/test-c32toupper.c (main): Likewise.

8 months agotests: Avoid some test failures on OpenBSD 7.5.
Bruno Haible [Sat, 31 Aug 2024 22:13:39 +0000 (00:13 +0200)]
tests: Avoid some test failures on OpenBSD 7.5.

* tests/test-c32isalpha.c (main): Disable tests that fail on
OpenBSD 7.5.
* tests/test-c32iscntrl.c (main): Likewise.
* tests/test-c32isgraph.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isprint.c (main): Likewise.
* tests/test-c32ispunct.c (main): Likewise.
* tests/test-c32toupper.c (main): Likewise.

8 months agoiswxdigit: Work around OpenBSD, Android, Haiku bug.
Bruno Haible [Sat, 31 Aug 2024 22:12:54 +0000 (00:12 +0200)]
iswxdigit: Work around OpenBSD, Android, Haiku bug.

* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Require gt_LOCALE_EN_UTF8 instead
of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
Update cross-compilation guess.
* modules/iswxdigit (Files): Add m4/locale-en.m4. Remove m4/locale-fr.m4.
* doc/posix-functions/iswxdigit.texi: Update list of platforms.

8 months agoiswdigit: Work around OpenBSD, Android, Haiku bug.
Bruno Haible [Sat, 31 Aug 2024 22:11:12 +0000 (00:11 +0200)]
iswdigit: Work around OpenBSD, Android, Haiku bug.

* m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Require gt_LOCALE_EN_UTF8 instead
of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
Update cross-compilation guess.
* modules/iswdigit (Files): Add m4/locale-en.m4.
* doc/posix-functions/iswdigit.texi: Update list of platforms.

8 months agotests: Strengthen LC_CTYPE tests on OpenBSD, Android, Haiku.
Bruno Haible [Sat, 31 Aug 2024 17:22:37 +0000 (19:22 +0200)]
tests: Strengthen LC_CTYPE tests on OpenBSD, Android, Haiku.

* m4/locale-en.m4: New file, based on m4/locale-fr.m4.
* m4/locale-ar.m4 (gt_LOCALE_AR): Update comments.
* m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
* m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
* m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
* modules/btoc32-tests (Files): Add m4/locale-en.m4.
(configure.ac): Invoke gt_LOCALE_EN_UTF8.
(Makefile.am): Set LOCALE_EN_UTF8 in TESTS_ENVIRONMENT.
* modules/btowc-tests: Likewise.
* modules/c32isalnum-tests: Likewise.
* modules/c32isalpha-tests: Likewise.
* modules/c32isblank-tests: Likewise.
* modules/c32iscntrl-tests: Likewise.
* modules/c32isdigit-tests: Likewise.
* modules/c32isgraph-tests: Likewise.
* modules/c32islower-tests: Likewise.
* modules/c32isprint-tests: Likewise.
* modules/c32ispunct-tests: Likewise.
* modules/c32isspace-tests: Likewise.
* modules/c32isupper-tests: Likewise.
* modules/c32isxdigit-tests: Likewise.
* modules/c32rtomb-tests: Likewise.
* modules/c32snrtombs-tests: Likewise.
* modules/c32srtombs-tests: Likewise.
* modules/c32stombs-tests: Likewise.
* modules/c32tolower-tests: Likewise.
* modules/c32toupper-tests: Likewise.
* modules/fnmatch-tests: Likewise.
* modules/iswdigit-tests: Likewise.
* modules/iswxdigit-tests: Likewise.
* modules/mbmemcasecmp-tests: Likewise.
* modules/mbmemcasecoll-tests: Likewise.
* modules/mbrlen-tests: Likewise.
* modules/mbrtoc16-tests: Likewise.
* modules/mbrtoc32-tests: Likewise.
* modules/mbrtowc-tests: Likewise.
* modules/mbscasestr-tests: Likewise.
* modules/mbscspn-tests: Likewise.
* modules/mbsinit-tests: Likewise.
* modules/mbslen-tests: Likewise.
* modules/mbsnlen-tests: Likewise.
* modules/mbsnrtoc32s-tests: Likewise.
* modules/mbsnrtowcs-tests: Likewise.
* modules/mbspbrk-tests: Likewise.
* modules/mbsrtoc32s-tests: Likewise.
* modules/mbsrtowcs-tests: Likewise.
* modules/mbsspn-tests: Likewise.
* modules/mbsstr-tests: Likewise.
* modules/mbstoc32s-tests: Likewise.
* modules/mbstowcs-tests: Likewise.
* modules/mcel-tests: Likewise.
* modules/trim-tests: Likewise.
* modules/unicodeio-tests: Likewise.
* modules/wcrtomb-tests: Likewise.
* modules/wcsnrtombs-tests: Likewise.
* modules/wcsrtombs-tests: Likewise.
* tests/test-btoc32-3.sh: If LOCALE_FR_UTF8 is 'none', try
LOCALE_EN_UTF8 instead.
* tests/test-btowc-3.sh: Likewise.
* tests/test-c32isalnum.sh: Likewise.
* tests/test-c32isalpha.sh: Likewise.
* tests/test-c32isblank.sh: Likewise.
* tests/test-c32iscntrl.sh: Likewise.
* tests/test-c32isdigit.sh: Likewise.
* tests/test-c32isgraph.sh: Likewise.
* tests/test-c32islower.sh: Likewise.
* tests/test-c32isprint.sh: Likewise.
* tests/test-c32ispunct.sh: Likewise.
* tests/test-c32isspace.sh: Likewise.
* tests/test-c32isupper.sh: Likewise.
* tests/test-c32isxdigit.sh: Likewise.
* tests/test-c32rtomb.sh: Likewise.
* tests/test-c32snrtombs-3.sh: Likewise.
* tests/test-c32srtombs-3.sh: Likewise.
* tests/test-c32stombs-3.sh: Likewise.
* tests/test-c32tolower.sh: Likewise.
* tests/test-c32toupper.sh: Likewise.
* tests/test-fnmatch-3.sh: Likewise.
* tests/test-iswdigit.sh: Likewise.
* tests/test-iswxdigit.sh: Likewise.
* tests/test-mbmemcasecmp-3.sh: Likewise.
* tests/test-mbmemcasecoll-3.sh: Likewise.
* tests/test-mbrlen-3.sh: Likewise.
* tests/test-mbrtoc16-3.sh: Likewise.
* tests/test-mbrtoc32-3.sh: Likewise.
* tests/test-mbrtowc-3.sh: Likewise.
* tests/test-mbscasestr2.sh: Likewise.
* tests/test-mbscspn.sh: Likewise.
* tests/test-mbsinit.sh: Likewise.
* tests/test-mbslen.sh: Likewise.
* tests/test-mbsnlen.sh: Likewise.
* tests/test-mbsnrtoc32s-3.sh: Likewise.
* tests/test-mbsnrtowcs-3.sh: Likewise.
* tests/test-mbspbrk.sh: Likewise.
* tests/test-mbsrtoc32s-3.sh: Likewise.
* tests/test-mbsrtowcs-3.sh: Likewise.
* tests/test-mbsspn.sh: Likewise.
* tests/test-mbsstr2.sh: Likewise.
* tests/test-mbstoc32s-3.sh: Likewise.
* tests/test-mbstowcs-3.sh: Likewise.
* tests/test-mcel-3.sh: Likewise.
* tests/test-trim2.sh: Likewise.
* tests/test-unicodeio2.sh: Likewise.
* tests/test-wcrtomb.sh: Likewise.
* tests/test-wcsnrtombs-3.sh: Likewise.
* tests/test-wcsrtombs-3.sh: Likewise.

8 months agotrim, unicodeio tests: Fix module description.
Bruno Haible [Sat, 31 Aug 2024 16:23:33 +0000 (18:23 +0200)]
trim, unicodeio tests: Fix module description.

* modules/trim-tests (configure.ac): Invoke the respective gt_LOCALE_*
macros.
* modules/unicodeio-tests (Makefile.am): Augment TESTS_ENVIRONMENT.

8 months agombrtoc32: Fix a cross-compilation guess.
Bruno Haible [Sat, 31 Aug 2024 11:57:39 +0000 (13:57 +0200)]
mbrtoc32: Fix a cross-compilation guess.

* m4/mbrtoc32.m4 (gl_MBRTOC32_UTF8_LOCALE): Guess no on Cygwin.

8 months agomkfifoat: Work around a Haiku bug.
Bruno Haible [Fri, 30 Aug 2024 23:28:32 +0000 (01:28 +0200)]
mkfifoat: Work around a Haiku bug.

* lib/mknodat.c (rpl_mknodat): On Haiku, handle S_IFIFO explicitly.
* doc/posix-functions/mknodat.texi: Mention the S_IFIFO flag bug.

8 months agodoc: Mention an mknod bug.
Bruno Haible [Fri, 30 Aug 2024 23:20:50 +0000 (01:20 +0200)]
doc: Mention an mknod bug.

* doc/posix-functions/mknod.texi: Mention the S_IFIFO flag bug.

8 months agoposix_openpt tests: Fix test failure on Haiku.
Bruno Haible [Fri, 30 Aug 2024 21:48:44 +0000 (23:48 +0200)]
posix_openpt tests: Fix test failure on Haiku.

* tests/test-posix_openpt.c (main): On Haiku, create a child process and
call setsid().

8 months agoTrivial relicensing of macro-only modules, part 3.
Bruno Haible [Fri, 30 Aug 2024 16:08:10 +0000 (18:08 +0200)]
Trivial relicensing of macro-only modules, part 3.

* modules/config-h (License): Change to unlimited.
* modules/host-os (License): Likewise.
* modules/no-c++ (License): Likewise.
* modules/openmp (License): Likewise.
* modules/longlong (License): Change to LGPLv2+.
* modules/va-args (License): Likewise.

8 months agoTrivial relicensing of macro-only modules, part 2.
Bruno Haible [Fri, 30 Aug 2024 16:02:52 +0000 (18:02 +0200)]
Trivial relicensing of macro-only modules, part 2.

* modules/bison (License): Change to unlimited.
* modules/perl (License): Likewise.

8 months agoTrivial relicensing of macro-only modules, part 1.
Bruno Haible [Fri, 30 Aug 2024 15:59:13 +0000 (17:59 +0200)]
Trivial relicensing of macro-only modules, part 1.

* modules/link-follow (License): Change to unlimited.
* modules/rmdir-errno (License): Likewise.
* modules/unlink-busy (License): Likewise.
* modules/uptime (License): Likewise.
* modules/winsz-termios (License): Likewise.

8 months agodoc: Correct statement about license of m4/*.m4 files.
Bruno Haible [Fri, 30 Aug 2024 12:10:46 +0000 (14:10 +0200)]
doc: Correct statement about license of m4/*.m4 files.

* doc/gnulib-intro.texi (Copyright): For m4/*.m4 files, list also the
"GPL with Autoconf exception" as a possible license notice.

8 months agosigsegv: Clarify license of the *.m4 files.
Bruno Haible [Fri, 30 Aug 2024 11:41:14 +0000 (13:41 +0200)]
sigsegv: Clarify license of the *.m4 files.

* m4/sigaltstack.m4: In the license notice, clarify which version of the
GPL is meant.
* m4/stack-direction.m4: Likewise.

8 months agolibsigsegv: Relicense under GPLv2+.
Bruno Haible [Fri, 30 Aug 2024 10:44:03 +0000 (12:44 +0200)]
libsigsegv: Relicense under GPLv2+.

* modules/libsigsegv (License): Change to GPLv2+.

8 months agovma-prot: Add tests.
Bruno Haible [Thu, 29 Aug 2024 20:52:02 +0000 (22:52 +0200)]
vma-prot: Add tests.

* tests/test-vma-prot.c: New file.
* modules/vma-prot-tests: New file.

8 months agovma-prot: New module.
Bruno Haible [Thu, 29 Aug 2024 20:48:52 +0000 (22:48 +0200)]
vma-prot: New module.

* lib/vma-prot.h: New file.
* lib/vma-prot.c: New file.
* modules/vma-prot: New file.

8 months agovma-iter: Relicense under GPLv2+.
Bruno Haible [Thu, 29 Aug 2024 16:58:55 +0000 (18:58 +0200)]
vma-iter: Relicense under GPLv2+.

* modules/vma-iter (License): Change to GPLv2+.
* lib/vma-iter.h: Update license notice.
* lib/vma-iter.c: Likewise.

8 months agognulib-tool.py: Allow verifying license compatibility with GPLv2+.
Bruno Haible [Thu, 29 Aug 2024 16:32:35 +0000 (18:32 +0200)]
gnulib-tool.py: Allow verifying license compatibility with GPLv2+.

* pygnulib/GLInfo.py (GLInfo.usage): Document the --gpl option.
* pygnulib/main.py (main): Accept a --gpl option. Pass it to the
GLConfig.
* pygnulib/GLConfig.py (GLConfig): Add 'gpl' field and constructor
argument. Add getGPL, setGPL, resetGPL methods.
* m4/gnulib-tool.m4 (gl_GPL): New macro.
* doc/gnulib-tool.texi (Modified imports): Document the gl_GPL macro.
* pygnulib/GLImport.py (GLImport.__init__): Look for gl_GPL invocations
in gnulib-cache.m4.
(GLImport.actioncmd): Output --gpl option when option --gpl was given.
(GLImport.gnulib_cache): Emit a gl_GPL invocation when option --gpl was
given.
(GLImport.prepare): Do license compatibility checking when option --gpl
was given.
* pygnulib/GLModuleSystem.py: Update a comment.

8 months agognulib-tool: Fix description of --lgpl option (missed on 2021-06-04).
Bruno Haible [Thu, 29 Aug 2024 15:49:33 +0000 (17:49 +0200)]
gnulib-tool: Fix description of --lgpl option (missed on 2021-06-04).

* gnulib-tool.sh (func_usage): Remove "Also modify license template"
sentence.
* pygnulib/GLInfo.py (GLInfo.usage): Likewise.

8 months agoobstack-printf-gnu: Fix mistake (reported by check-AC_LIBOBJ).
Bruno Haible [Thu, 29 Aug 2024 14:07:24 +0000 (16:07 +0200)]
obstack-printf-gnu: Fix mistake (reported by check-AC_LIBOBJ).

* modules/obstack-printf-gnu (Files): Add lib/obstack_printf.c.

8 months agolibgmp-mpq: Add tests.
Marc Nieper-Wißkirchen [Thu, 29 Aug 2024 09:15:11 +0000 (11:15 +0200)]
libgmp-mpq: Add tests.

* modules/libgmp-mpq-tests: New file.
* tests/test-libgmp-mpq.c: New file.

8 months agolibgmp-mpq: New module.
Marc Nieper-Wißkirchen [Thu, 29 Aug 2024 09:10:21 +0000 (11:10 +0200)]
libgmp-mpq: New module.

* MODULES.html.sh: Mention libgmp-mpz and
libgmp-mpq.
* config/srclist.txt: Mention mini-mpq.c and mini-mpq.h.
* lib/mini-mpq-gnulib.c: New file.
* lib/mini-mpq.c: New upstream source file from
https://gmplib.org/repo/gmp/raw-file/tip/mini-gmp/mini-mpq.c.
* lib/mini-mpq.h: New upstream source file from
https://gmplib.org/repo/gmp/raw-file/tip/mini-gmp/mini-mpq.h.
* modules/libgmp-mpq: New module.
* modules/libgmp-mpz: Conditionally include mini-mpq.h in gmp.h.
* modules/libgmp: Add libgmp-mpq dependency.

8 months agoavoid GCC -Wmaybe-uninitialized false positives with LTO
Pádraig Brady [Wed, 28 Aug 2024 11:10:43 +0000 (12:10 +0100)]
avoid GCC -Wmaybe-uninitialized false positives with LTO

Avoids false warnings with GCC 14.2.1 with -flto

* lib/canonicalize.c: Initialize END_IDX.
* lib/getndelim2.c: Initialize C.

8 months agothreads-h: Don't override the C++ keyword 'thread_local'.
Bruno Haible [Wed, 28 Aug 2024 15:03:39 +0000 (17:03 +0200)]
threads-h: Don't override the C++ keyword 'thread_local'.

* lib/threads.in.h (thread_local): Don't define as a macro in C++ 11
or newer.

8 months agoautoupdate
Karl Berry [Wed, 28 Aug 2024 15:01:35 +0000 (08:01 -0700)]
autoupdate

8 months agolibgmp-mpz: New module, renamed from libgmp.
Bruno Haible [Wed, 28 Aug 2024 12:16:08 +0000 (14:16 +0200)]
libgmp-mpz: New module, renamed from libgmp.

* modules/libgmp-mpz: Renamed from modules/libgmp.
* modules/libgmp: New file.
* modules/libgmp-mpz-tests: Renamed from modules/libgmp-tests.
* tests/test-libgmp-mpz.c: Renamed from tests/test-libgmp.c.

8 months agodoc: Add more details about O_EXEC and O_SEARCH.
Bruno Haible [Wed, 28 Aug 2024 09:03:34 +0000 (11:03 +0200)]
doc: Add more details about O_EXEC and O_SEARCH.

* doc/posix-headers/fcntl.texi: Add platforms list and revisit note
about O_EXEC and O_SEARCH.

8 months agomcel: Fix compilation error with MSVC.
Bruno Haible [Tue, 27 Aug 2024 22:34:53 +0000 (00:34 +0200)]
mcel: Fix compilation error with MSVC.

* modules/builtin-expect (Description): Improve.
* m4/builtin-expect.m4: Improve comment.
* modules/mcel (Depends-on): Add builtin-expect.

8 months agosavewd: port to native MS-Windows
Paul Eggert [Tue, 27 Aug 2024 21:39:59 +0000 (14:39 -0700)]
savewd: port to native MS-Windows

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00187.html
* lib/savewd.c (fork) [_WIN32 && !__CYGWIN]: New macro.
(savewd_save): Don’t fork on MS-Windows, or if O_SEARCH != O_RDONLY.

8 months agobcopy: Deprecate module.
Bruno Haible [Tue, 27 Aug 2024 21:11:26 +0000 (23:11 +0200)]
bcopy: Deprecate module.

* modules/bcopy (Status, Notice): Mark as deprecated.
* doc/pastposix-functions/bcopy.texi: Mention that this module does not
declare bcopy().

8 months agosimple-atomic: Fix a clang warning on native Windows.
Bruno Haible [Tue, 27 Aug 2024 21:01:33 +0000 (23:01 +0200)]
simple-atomic: Fix a clang warning on native Windows.

* lib/simple-atomic.c (atomic_compare_and_swap_ptr): Add a cast.

8 months agowrite-any-file: Don't reference an undefined function on native Windows.
Bruno Haible [Tue, 27 Aug 2024 20:50:05 +0000 (22:50 +0200)]
write-any-file: Don't reference an undefined function on native Windows.

* m4/write-any-file.m4 (): Remove test for <priv.h>, obsolete since
2009-05-03. Test for geteuid.
* lib/write-any-file.c (geteuid): Define a fallback.

8 months agomkdir-p: Don't reference an undefined function on native Windows.
Bruno Haible [Tue, 27 Aug 2024 20:28:36 +0000 (22:28 +0200)]
mkdir-p: Don't reference an undefined function on native Windows.

* m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Test whether fchown exists.
* lib/dirchownmod.c (fchown): Define to a fallback if the system does
not have fchown.
(dirchownmod): Test HAVE_FCHOWN.

8 months agogetusershell: Don't completely ignore lines that contain a comment.
Bruno Haible [Tue, 27 Aug 2024 20:17:18 +0000 (22:17 +0200)]
getusershell: Don't completely ignore lines that contain a comment.

* lib/getusershell.c (getusershell): Truncate the line where a comment
starts, instead of ignoring the line entirely.

8 months agofts: Don't assume that a pointer is as wide as a 'long'.
Bruno Haible [Tue, 27 Aug 2024 20:08:00 +0000 (22:08 +0200)]
fts: Don't assume that a pointer is as wide as a 'long'.

* lib/fts.c (fts_sort): Cast pointers to 'uintptr_t', not to 'long'.

8 months agomkdir: Fix for use of posixcheck module on native Windows.
Bruno Haible [Tue, 27 Aug 2024 20:00:54 +0000 (22:00 +0200)]
mkdir: Fix for use of posixcheck module on native Windows.

* lib/sys_stat.in.h (mkdir): Give priority to the native Windows
definition over the GNULIB_POSIXCHECK redefinition.

8 months agowindows-spawn: Fix clang warning.
Bruno Haible [Tue, 27 Aug 2024 19:43:36 +0000 (21:43 +0200)]
windows-spawn: Fix clang warning.

* lib/windows-spawn.c (convert_CreateProcess_error): Remove unreachable
'break;' statements.

8 months agoImprove support for clang on Windows.
Bruno Haible [Tue, 27 Aug 2024 19:40:15 +0000 (21:40 +0200)]
Improve support for clang on Windows.

* lib/c++defs.h (_GL_CXXALIASWARN_2): Treat clang like gcc 4.2.
* lib/stdio.in.h (fwrite, fwrite_unlocked): Likewise.
* lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Likewise.
* lib/libc-config.h (__GNUC_PREREQ): Override glibc's definition to
handle clang in disguise.

8 months agoExplicitly exclude clang when we test for a GCC version >= 4.3.
Bruno Haible [Tue, 27 Aug 2024 14:20:16 +0000 (16:20 +0200)]
Explicitly exclude clang when we test for a GCC version >= 4.3.

Rationale: clang can disguise as any possible GCC version.

* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): When testing __GNUC__,
exclude clang.
* lib/_Noreturn.h (_Noreturn): Likewise.
* lib/aligned-malloc.h (aligned_free, aligned_malloc): Likewise.
* lib/base32.h: Likewise.
* lib/base64.h: Likewise.
* lib/dfa.c (FALLTHROUGH): Likewise.
* lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, opendir, fdopendir): Likewise.
* lib/intprops-internal.h: Likewise.
* lib/jit/cache.h (clear_cache): Likewise.
* lib/malloc.in.h (memalign): Likewise.
* lib/mcel.h: Likewise.
* lib/regex.h: Likewise.
* lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE): Likewise.
* lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC, fdopen, fopen, popen, tmpfile):
Likewise.
* lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, aligned_alloc, calloc,
canonicalize_file_name, malloc, realloc): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_DEALLOC, strdup, strndup): Likewise.
* lib/verify.h: Likewise.
* lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC, wcsdup): Likewise.
* lib/xalloc-oversized.h (xalloc_oversized): Likewise.
* lib/fenv-private.h (_FPU_GETCW, _FPU_SETCW, _FPU_GETFPSR,
_FPU_SETFPSR): When testing __GNUC__, exclude clang. Use different
builtins for clang.
* lib/hamt.h (GL_HAMT_THREAD_SAFE): When testing __GNUC__, exclude
clang. Enable for clang >= 4.
* lib/astrxfrm.c: Use _GL_GNUC_PREREQ.
* lib/readutmp.c: Likewise.
* lib/strftime.c: Likewise.
* tests/test-asyncsafe-linked_list-strong.c: Likewise.
* tests/test-asyncsafe-linked_list-weak.c: Likewise.
* tests/test-c-strtod-mt.c: Likewise.
* tests/test-c-strtof-mt.c: Likewise.
* tests/test-c-strtold-mt.c: Likewise.
* tests/test-gmtime_r-mt.c: Likewise.
* tests/test-intprops.c: Likewise.
* tests/test-limits-h.c: Likewise.
* tests/test-localtime_r-mt.c: Likewise.
* tests/test-memrchr.c: Likewise.
* tests/test-nl_langinfo-mt.c: Likewise.
* tests/test-setlocale_null-mt-all.c: Likewise.
* tests/test-setlocale_null-mt-one.c: Likewise.
* tests/test-statat.c: Likewise.
* tests/test-xvasprintf.c: Likewise.

8 months agodoc: Update about psignal.
Bruno Haible [Tue, 27 Aug 2024 16:45:22 +0000 (18:45 +0200)]
doc: Update about psignal.

Reported by Eric Gallager <egall@gwmail.gwu.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00177.html>.

* doc/posix-functions/psignal.texi: Mention the Solaris problem and the
first parameter type.

8 months agoreadutmp: In systemd mode, show sessions of type "web".
Bruno Haible [Tue, 27 Aug 2024 09:46:33 +0000 (11:46 +0200)]
readutmp: In systemd mode, show sessions of type "web".

Reported by Allison Karlitskaya <allison.karlitskaya@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00160.html>.

* lib/readutmp.c (read_utmp_from_systemd): For a systemd session of type
"web", add a single USER_PROCESS entry.

8 months agoFix a test failure from a clang that masquerades as gcc 13.
Bruno Haible [Mon, 26 Aug 2024 22:49:07 +0000 (00:49 +0200)]
Fix a test failure from a clang that masquerades as gcc 13.

* tests/test-fenv-except-trapping-2.c (main): Skip the '4' test on
clang, since clang 17 still generates buggy comparisons, like gcc
versions < 8.

8 months agoFix some of the warnings from a clang that masquerades as gcc 13.
Bruno Haible [Mon, 26 Aug 2024 22:19:14 +0000 (00:19 +0200)]
Fix some of the warnings from a clang that masquerades as gcc 13.

* lib/c-stack.c: Use _GL_GNUC_PREREQ to test for the gcc version.
* lib/canonicalize.c: Likewise.
* lib/diffseq.h: Likewise.
* lib/file-has-acl.c: Likewise.
* lib/freopen-safer.c: Likewise.
* lib/getndelim2.c: Likewise.
* lib/mini-gmp-gnulib.c: Likewise.
* lib/propername.c: Likewise.
* lib/quotearg.c: Likewise.
* lib/savedir.c: Likewise.
* lib/vasnprintf.c: Likewise.
* tests/test-argmatch.c: Likewise.
* tests/test-dup2.c: Likewise.
* tests/test-explicit_bzero.c: Likewise.
* tests/test-fcntl.c: Likewise.
* tests/test-fopen.h: Likewise.
* tests/test-getdtablesize.c: Likewise.
* tests/test-getgroups.c: Likewise.
* tests/test-listen.c: Likewise.
* tests/test-localename.c: Likewise.
* tests/test-memset_explicit.c: Likewise.
* tests/test-open.h: Likewise.
* tests/test-perror2.c: Likewise.
* tests/test-select.h: Likewise.
* lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD): Don't use
gnu_printf with clang.
* lib/string-buffer.h: Likewise.
* lib/textstyle.in.h: Likewise.

8 months agorelocatable-prog: Fix config.libpath failure (regression 2024-08-24).
Bruno Haible [Mon, 26 Aug 2024 19:29:03 +0000 (21:29 +0200)]
relocatable-prog: Fix config.libpath failure (regression 2024-08-24).

* build-aux/config.libpath: Expect 2 arguments, not 1.

8 months agoFix compilation errors with clang that masquerades as gcc 13.
Bruno Haible [Mon, 26 Aug 2024 19:13:50 +0000 (21:13 +0200)]
Fix compilation errors with clang that masquerades as gcc 13.

Reported by Sam James and Paul Eggert.

* m4/gnulib-common.m4 (gl_COMMON_BODY): For _GL_GNUC_PREREQ, ignore the
values of __GNUC__ and __GNUC_MINOR__ defined by clang.
* lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Don't treat
clang like GCC.
* lib/wchar.in.h (wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr): Disable
the _GL_CXXALIASWARN1 and _GL_CXXALIASWARN invocations for masquerading
clang++.

8 months agodiffseq: don’t worry about clang
Paul Eggert [Sun, 25 Aug 2024 22:18:45 +0000 (15:18 -0700)]
diffseq: don’t worry about clang

* lib/diffseq.h: Stop worrying about __clang__ for pragmas.
This basically reverts the previous change to this file.
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00145.html

8 months agocopy-file: Add functions for copying non-confidential files.
Bruno Haible [Sat, 24 Aug 2024 18:52:28 +0000 (20:52 +0200)]
copy-file: Add functions for copying non-confidential files.

Reported by Patrice Dumas <pertusus@free.fr> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00142.html>.

* lib/copy-file.h (copy_file_to, xcopy_file_to): New declarations.
* lib/copy-file.c (copy_file_internal): New function, extracted from
qcopy_file_preserving.
(qcopy_file_preserving): Invoke it.
(copy_file_to): New function.
(handle_error_code): New function, extracted from xcopy_file_preserving.
(xcopy_file_preserving): Invoke it.
(xcopy_file_to): New function.

8 months agocopy-file: First step towards more consistent function names.
Bruno Haible [Sat, 24 Aug 2024 15:59:26 +0000 (17:59 +0200)]
copy-file: First step towards more consistent function names.

* lib/copy-file.h (xcopy_file_preserving): New declaration.
(copy_file_preserving): Mark deprecated.
* lib/copy-file.c (xcopy_file_preserving): Renamed from
copy_file_preserving.
(copy_file_preserving): New function.
* tests/test-copy-file.c (main): Test xcopy_file_preserving instead of
copy_file_preserving.

8 months agoacl: First step towards more consistent function names.
Bruno Haible [Sat, 24 Aug 2024 15:58:48 +0000 (17:58 +0200)]
acl: First step towards more consistent function names.

* lib/acl.h (xset_acl): New declaration.
(set_acl): Mark deprecated.
(xcopy_acl): New declaration.
(copy_acl): Mark deprecated.
* lib/set-acl.c (xset_acl): Renamed from set_acl.
(set_acl): New function.
* lib/copy-acl.c (xcopy_acl): Renamed from copy_acl.
(copy_acl): New function.
* tests/test-set-mode-acl.c (main): Test xset_acl instead of set_acl.
* tests/test-copy-acl.c (main): Test xcopy_acl instead of copy_acl.

8 months agodiffseq: port to clang 18.1.6 in ‘patch’
Paul Eggert [Sat, 24 Aug 2024 15:22:47 +0000 (08:22 -0700)]
diffseq: port to clang 18.1.6 in ‘patch’

* lib/diffseq.h: Omit the pragmas if __clang__.

8 months agorelocatable-prog: Add support for 32-bit build on FreeBSD/powerpc64.
Bruno Haible [Sat, 24 Aug 2024 14:33:05 +0000 (16:33 +0200)]
relocatable-prog: Add support for 32-bit build on FreeBSD/powerpc64.

Reference: <https://savannah.gnu.org/patch/?10469>.

* build-aux/config.libpath: Accept a second argument. Use it on
FreeBSD/powerpc64.
(func_usage): Document it.
* m4/relocatable.m4 (AC_LIB_LIBPATH): Require gl_HOST_CPU_C_ABI_32BIT.
Pass HOST_CPU_C_ABI_32BIT to the config.libpath script.
* modules/relocatable-prog (Files): Add m4/host-cpu-c-abi.m4.

8 months agodiffseq: port to GCC 14.2.1 in ‘patch’
Paul Eggert [Fri, 23 Aug 2024 20:50:32 +0000 (13:50 -0700)]
diffseq: port to GCC 14.2.1 in ‘patch’

* lib/diffseq.h: Also suppress -Wanalyzer-use-of-uninitialized-value.
This fixes an unwanted diagnostic when compiling GNU ‘patch’
with gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-1) x86-64.

8 months agohost-cpu-c-abi: Update comment, working around FreeBSD breakage.
Bruno Haible [Fri, 23 Aug 2024 17:01:55 +0000 (19:01 +0200)]
host-cpu-c-abi: Update comment, working around FreeBSD breakage.

* m4/host-cpu-c-abi.m4: For powerpc64, recommend to test
__BIG_ENDIAN__ or __LITTLE_ENDIAN__, not _BIG_ENDIAN or _LITTLE_ENDIAN,
as FreeBSD 14 breaks the latter.

8 months agomcel: port to uClibc-ng
Paul Eggert [Thu, 22 Aug 2024 06:00:38 +0000 (23:00 -0700)]
mcel: port to uClibc-ng

Problem reported by Waldemar Brodkorb in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00130.html
* lib/mcel.h (mcel_scan): Don’t treat uClibc-ng like glibc.

8 months agostdio: Fix compilation error in C++ mode on Linux/riscv64 with musl.
Bruno Haible [Wed, 21 Aug 2024 21:22:26 +0000 (23:22 +0200)]
stdio: Fix compilation error in C++ mode on Linux/riscv64 with musl.

* lib/stdio.in.h (fpurge): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

8 months agohasmntopt: Add tests.
Bruno Haible [Mon, 19 Aug 2024 14:21:27 +0000 (16:21 +0200)]
hasmntopt: Add tests.

* tests/test-hasmntopt.c: New file.
* modules/hasmntopt-tests: New file.

8 months agohasmntopt: New module.
Bruno Haible [Mon, 19 Aug 2024 14:20:08 +0000 (16:20 +0200)]
hasmntopt: New module.

* lib/mntent.in.h: Add config.h check.
(hasmntopt): New declaration.
* lib/hasmntopt.c: New file, based on glibc/misc/mntent_r.c.
* m4/hasmntopt.m4: New file.
* m4/mntent_h.m4 (gl_MNTENT_H): Test whether hasmntopt is declared.
(gl_MNTENT_H_REQUIRE_DEFAULTS): Initialize GNULIB_HASMNTOPT.
(gl_MNTENT_H_DEFAULTS): Initialize HAVE_HASMNTOPT, HAVE_SETMNTENT,
REPLACE_HASMNTOPT.
* modules/mntent (Depends-on): Add snippet/arg-nonnull, snippet/c++defs,
snippet/warn-on-use.
(Makefile.am): Insert c++defs.h, arg-nonnull.h, warn-on-use.h into
mntent.h. Substitute GNULIB_HASMNTOPT, HAVE_HASMNTOPT, HAVE_SETMNTENT,
REPLACE_HASMNTOPT.
* modules/hasmntopt: New file.
* doc/glibc-functions/hasmntopt.texi: Mention the new module and the
musl bug.
* doc/glibc-functions/setmntent.texi: Update info about Android.
* doc/glibc-functions/getmntent_r.texi: Likewise.
* doc/glibc-functions/endmntent.texi: Likewise.

8 months agomntent: New module.
Bruno Haible [Mon, 19 Aug 2024 11:46:02 +0000 (13:46 +0200)]
mntent: New module.

* lib/mntent.in.h: New file.
* m4/mntent_h.m4: New file.
* modules/mntent: New file.
* doc/glibc-headers/mntent.texi: Mention the new module.
* top/maint.mk (gl_prefer_angle_bracket_headers_): Add mntent.h.
* doc/gnulib-tool.texi (Style of #include statements): Add mntent.h to
the list.

8 months agoonce: Fix pthread-rwlock crashes with clang (regr. 2024-08-07).
Bruno Haible [Sat, 17 Aug 2024 13:07:59 +0000 (15:07 +0200)]
once: Fix pthread-rwlock crashes with clang (regr. 2024-08-07).

* lib/glthread/once.h: Don't mark pthread_rwlock_init,
pthread_rwlockattr_init as weak if we are overriding them.

8 months agopty tests: Add C tests.
Collin Funk [Sat, 17 Aug 2024 04:22:31 +0000 (21:22 -0700)]
pty tests: Add C tests.

* modules/pty-tests (Files): Add tests/test-pty.c.
(Makefile.am): Add the new program.
* tests/test-pty.c: New file.

8 months agopty: Define 'struct winsize' on all platforms.
Collin Funk [Sat, 17 Aug 2024 04:19:46 +0000 (21:19 -0700)]
pty: Define 'struct winsize' on all platforms.

* modules/pty (Depends-on): Add termios.
* lib/pty.in.h: Make comments more accurate.
(struct winsize): Remove forward declaration.

8 months agogitsub.sh: For a submodule, merge from the right remote branch.
Bruno Haible [Fri, 16 Aug 2024 20:07:19 +0000 (22:07 +0200)]
gitsub.sh: For a submodule, merge from the right remote branch.

Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> at
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00101.html>.

* top/gitsub.sh (func_upgrade): For a submodule, use 'git branch' to
determine the branch to merge from, instead of assuming that it is
always the 'master' branch.

8 months agognulib-tool.py: Correct the result of --extract-dependents.
Bruno Haible [Fri, 16 Aug 2024 16:24:54 +0000 (18:24 +0200)]
gnulib-tool.py: Correct the result of --extract-dependents.

* pygnulib/GLModuleSystem.py (GLModule.getDependents): Add the current
module's test module, if that exists.

8 months agognulib-tool.py: Don't treat 'valgrind-tests' as a tests module.
Bruno Haible [Fri, 16 Aug 2024 15:57:02 +0000 (17:57 +0200)]
gnulib-tool.py: Don't treat 'valgrind-tests' as a tests module.

Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-08/msg00093.html>.

* pygnulib/GLModuleSystem.py (_isTestsModuleName): New function.
(GLModuleSystem.list, GLModule.isNonTests, GLModule.getApplicability,
GLModule.getDependencies, GLModule.getAutomakeSnippet_Unconditional,
GLModule.getLicense): Use it.

8 months agotermios: Tweak doc.
Bruno Haible [Fri, 16 Aug 2024 01:14:18 +0000 (03:14 +0200)]
termios: Tweak doc.

* doc/posix-headers/termios.texi: Update list of platforms.

8 months agoAdd ChangeLog entry for last commit.
Paul Eggert [Thu, 15 Aug 2024 04:01:18 +0000 (06:01 +0200)]
Add ChangeLog entry for last commit.

8 months agoverror: allow library name-spacing of verror
Paul Eggert [Thu, 15 Aug 2024 03:04:42 +0000 (20:04 -0700)]
verror: allow library name-spacing of verror

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2024-08/msg00085.html
* lib/error.c (verror, verror_at_line) [!_LIBC]: #undef only if
the corresponding GNULIB_defined_... macros are defined.
* lib/error.in.h (verror, verror_with_line):
Don't define as macros if they are already defined, or if
_GL_NO_INLINE_ERROR is defined.  This may lose some niceties with GCC
warnings, but the code’s valid.

8 months agoerror: merge from glibc and with verror
Paul Eggert [Thu, 15 Aug 2024 01:03:54 +0000 (18:03 -0700)]
error: merge from glibc and with verror

* lib/error.c: Merge changes since 2018 from glibc.
----- The following changes are taken from glibc:
(__error_internal, __error_at_line_internal): New functions,
with most of the old error and error_at_line_internal but
with va_list and with a new trailing mode_args,
for wide character mode.
(error_tail): Add trailing arg.
(error_tail, __error_internal, __error_at_line_internal):
Redo _LIBC implementation with respect to cancelation.
[_LIBC]: Include <libc-lock.h>, not <bits/libc-lock.h>.
----- The following changes are specific to Gnulib:
(__error_internal, __error_at_line_internal, error_tail) [!_LIBC]:
Use macros to define away the new trailing arg, and to name
the internal functions to verror and verror_at_line.
(verror, verror_at_line) [!_LIBC]: Undef so that we omit
the __gl_error_call business when defining these functions.
* lib/error.in.h: Include stdarg.h.
(verror, verror_at_line): New decls and macros.
* m4/error_h.m4 ([gl_ERROR_H]): Always compile error.c if
the verror module is also present.
* modules/verror (Files, lib_SOURCES):
Remove lib/verror.h, lib/verror.c.
(Depends-on): Remove stdio, xvasprintf.
(configure.ac-early): Define gl_HAVE_MODULE_VERROR so that
the error module compiles error.c.  Not sure if this is the
standard way to do this, but it seems to work.
* modules/verror (Include), tests/test-verror.c:
Include error.h, not verror.h.

8 months agoerror: it’s cold
Paul Eggert [Wed, 14 Aug 2024 21:06:05 +0000 (14:06 -0700)]
error: it’s cold

This mimics what glibc is doing nowadays.
* lib/error.in.h (error, error_at_line):
* lib/verror.h (verror, verror_at_line):
Declare with _GL_ATTRIBUTE_CODE.

8 months agopthread-rwlock-extra-tests: Exclude this test from packages by default.
Bruno Haible [Wed, 14 Aug 2024 14:43:34 +0000 (16:43 +0200)]
pthread-rwlock-extra-tests: Exclude this test from packages by default.

* tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Add comment.
* modules/pthread-rwlock-extra-tests (Status): Mark as longrunning-test.

8 months agotests: Fix link errors (regression 2024-08-12).
Bruno Haible [Wed, 14 Aug 2024 14:14:27 +0000 (16:14 +0200)]
tests: Fix link errors (regression 2024-08-12).

* modules/chown-tests (Makefile.am): Link test-chown with LIBINTL.
* modules/lchown-tests (Makefile.am): Link test-lchown with LIBINTL.
* modules/stat-time-tests (Makefile.am): Link test-stat-time with
LIBINTL.

8 months agombrtoc16: Fix compilation error on Haiku.
Bruno Haible [Tue, 13 Aug 2024 06:38:22 +0000 (08:38 +0200)]
mbrtoc16: Fix compilation error on Haiku.

* lib/uchar.in.h (mbrtoc16): Fix typo.

8 months agotermios tests: Check for struct winsize.
Collin Funk [Tue, 13 Aug 2024 03:11:19 +0000 (20:11 -0700)]
termios tests: Check for struct winsize.

* tests/test-termios.c (t2): Make sure inclusion of termios.h allows use
of struct winsize.

8 months agotermios: Define struct winsize on all platforms.
Collin Funk [Tue, 13 Aug 2024 03:09:01 +0000 (20:09 -0700)]
termios: Define struct winsize on all platforms.

* doc/posix-headers/termios.texi (termios.h): Mention struct winsize is
defined in <sys/ioctl.h> on glibc.
* lib/termios.in.h (struct winsize): Define or include.
* m4/termios_h.m4 (gl_TERMIOS_H): Check for a definition of struct
winsize.
* modules/termios (Makefile.am): Replace AC_SUBST variables.

8 months agoerrno tests: Avoid test failure on Haiku.
Bruno Haible [Mon, 12 Aug 2024 15:15:10 +0000 (17:15 +0200)]
errno tests: Avoid test failure on Haiku.

* doc/posix-headers/errno.texi: Mention the Haiku problem.
* tests/test-errno.c: On Haiku, don't check that the error numbers are
positive.

8 months agoerrno: Ensure ESOCKTNOSUPPORT gets defined.
Bruno Haible [Mon, 12 Aug 2024 15:11:35 +0000 (17:11 +0200)]
errno: Ensure ESOCKTNOSUPPORT gets defined.

* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also whether ESOCKTNOSUPPORT
is defined.
* lib/errno.in.h (ESOCKTNOSUPPORT, GNULIB_defined_ESOCKTNOSUPPORT): New
macros.
* lib/strerror-override.h (strerror_override): Declare also if
GNULIB_defined_ESOCKTNOSUPPORT is defined.
* lib/strerror-override.c (strerror_override): Handle ESOCKTNOSUPPORT.
* lib/strerrorname_np.c (strerrorname_np): Move ESOCKTNOSUPPORT code to
the POSIX section.
* doc/posix-headers/errno.texi: Document the Haiku problem.

8 months agofdutimensat, utimensat tests: Fix test failures on Cygwin.
Bruno Haible [Mon, 12 Aug 2024 14:15:50 +0000 (16:15 +0200)]
fdutimensat, utimensat tests: Fix test failures on Cygwin.

* tests/nap.h: Include concat-filename.h, xgetcwd.h.
(nap_file): New variable.
(nap_get_stat, clear_temp_file): Use nap_file, not TEMPFILE.
(nap): Initialize nap_file.
* modules/chown-tests (Depends-on): Add xconcat-filename, xgetcwd.
* modules/fchownat-tests (Depends-on): Likewise.
* modules/fdutimensat-tests (Depends-on): Likewise.
* modules/futimens-tests (Depends-on): Likewise.
* modules/lchown-tests (Depends-on): Likewise.
* modules/stat-time-tests (Depends-on): Likewise.
* modules/utime-tests (Depends-on): Likewise.
* modules/utimens-tests (Depends-on): Likewise.
* modules/utimensat-tests (Depends-on): Likewise.

8 months agopthread-rwlock: Attempt harder to avoid test failure on macOS.
Bruno Haible [Mon, 12 Aug 2024 12:56:46 +0000 (14:56 +0200)]
pthread-rwlock: Attempt harder to avoid test failure on macOS.

* tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the
minimum interval to 200 ms on macOS.

8 months agopthread-rwlock: Attempt harder to avoid test failure on macOS.
Bruno Haible [Mon, 12 Aug 2024 12:18:02 +0000 (14:18 +0200)]
pthread-rwlock: Attempt harder to avoid test failure on macOS.

* tests/test-pthread-rwlock-waitqueue.c (STEP_INTERVAL): Bump the
minimum interval to 100 ms on macOS.