|
2d422a55
|
2023-06-30T22:54:12
|
|
quotearg: Overcome wchar_t limitations.
* lib/quotearg.c: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
(quotearg_buffer_restyled): Use mbrtoc32, c32isprint instead of mbrtowc,
iswprint.
* modules/quotearg (Files): Remove m4/mbstate_t.m4, m4/mbrtowc.m4
(redundant).
(Depends-on): Add uchar, mbrtoc32, c32isprint. Remove wchar, wctype-h,
mbrtowc.
(Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/quotearg-tests (Makefile.am): Link test-quotearg with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/quotearg-simple (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/quotearg-simple-tests (Makefile.am): Link test-quotearg-simple
with $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/acl (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/acl-tests (Makefile.am): Link test-set-mode-acl and
test-copy-acl with $(LIBUNISTRING) $(LIBC32CONV).
* modules/copy-file (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/copy-file-tests (Makefile.am): Link test-copy-file with
$(LIBUNISTRING) $(LIBC32CONV).
--
* modules/argmatch (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/argmatch-tests (Makefile.am): Link test-argmatch with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/backup-rename (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/backupfile (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/human (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/sh-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/sh-quote-tests (Makefile.am): Link test-sh-quote with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/system-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/system-quote-tests (Makefile.am): Link test-system-quote-main
with $(LIBUNISTRING) $(LIBC32CONV).
* modules/csharpcomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/csharpexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/javacomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/javaexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/string-desc-quotearg (Link): New section.
* modules/string-desc-quotearg-tests (Makefile.am): Link
test-string-desc-quotearg with $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/xmemcoll (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
--
* modules/closeout (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/readtokens-tests (Makefile.am): Link test-readtokens with
$(LIBUNISTRING) $(LIBC32CONV).
--
* modules/closein (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/closein-tests (Makefile.am): Link test-closein with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/yesno-tests (Makefile.am): Link test-yesno with
$(LIBUNISTRING) $(LIBC32CONV).
|
|
2dfd7cc0
|
2023-06-30T22:48:12
|
|
Accommodate a difference between mbrtowc and mbrtoc32.
* lib/mbiter.h (mbiter_multi_next): Handle the mbrtoc32 return value
(size_t)(-3).
* lib/mbuiter.h (mbuiter_multi_next): Likewise.
* lib/mbfile.h (mbfile_multi_getc): Likewise.
|
|
bbda4be5
|
2023-06-29T17:31:55
|
|
libtextstyle-optional: Update to gettext 0.21.
* lib/textstyle.in.h: Declare all functions that exist in textstyle.h
from gettext-0.21, independently of iconv.
|
|
51077970
|
2023-06-29T19:02:43
|
|
libtextstyle-optional: Update to gettext 0.22.
* lib/textstyle.in.h: Declare all functions that were added in
textstyle.h from gettext-0.22.
|
|
5ae6f38b
|
2023-06-28T18:28:23
|
|
mbrtoc16: New module.
* lib/uchar.in.h (mbrtoc16): New declaration.
* lib/mbrtoc16.c: New file.
* m4/mbrtoc16.m4: New file, based on m4/mbrtoc32.m4.
* modules/mbrtoc16: New file.
* m4/uchar_h.m4 (gl_UCHAR_H): Test whether mbrtoc16 is declared.
(gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBRTOC16.
(gl_UCHAR_H_DEFAULTS): Initialize HAVE_MBRTOC16, REPLACE_MBRTOC16.
* modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC16,
HAVE_MBRTOC16, REPLACE_MBRTOC16.
* doc/posix-functions/mbrtoc16.texi: Mention the mbrtoc16 module and the
mbsinit related limitation.
* doc/posix-functions/mbsinit.texi: Mention the mbrtoc16 related
limitation.
|
|
efea5d92
|
2023-06-28T15:27:18
|
|
c32*: Update comment.
* lib/c32is-impl.h (FUNC): Add comment regarding Android.
* lib/c32to-impl.h (FUNC): Likewise.
* lib/c32width.c (c32width): Likewise.
|
|
c39d83dd
|
2023-06-27T11:28:26
|
|
c32*: Optionally enforce ISO C 23 semantics of char32_t.
* lib/lc-charset-unicode.h: New file.
* lib/lc-charset-unicode.c: New file.
* modules/uchar-c23: New file.
* lib/uchar.in.h (char32_t): Add comment.
* lib/mbrtoc32.c: Include lc-charset-unicode.h.
(mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke
locale_encoding_to_unicode.
* lib/btoc32.c: Include lc-charset-unicode.h.
(btoc32): If char32_t is Unicode and wchar_t is not, invoke
locale_encoding_to_unicode.
* lib/c32rtomb.c: Include lc-charset-unicode.h.
(c32rtomb): If char32_t is Unicode and wchar_t is not, invoke
unicode_to_locale_encoding.
* lib/c32tob.c: Include lc-charset-unicode.h.
(c32tob): If char32_t is Unicode and wchar_t is not, invoke
unicode_to_locale_encoding.
* lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't
use mbsnrtowcs.
* lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use
mbsrtowcs.
* lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't
use wcsnrtombs.
* lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use
wcsrtombs.
* lib/c32is-impl.h: Include lc-charset-unicode.h.
(FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
* lib/c32to-impl.h: Include lc-charset-unicode.h.
(FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
* lib/c32width.c: Include lc-charset-unicode.h.
(c32width): If char32_t is Unicode and wchar_t is not, use uc_width.
* tests/test-mbrtoc32.c: Include <wchar.h>.
(main): Skip GB18030 tests on NetBSD and Solaris. If
GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values.
* tests/test-mbrtoc32-w32.c: Include <wchar.h>.
(test_one_locale): Simplify.
* tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32rtomb.sh: Update.
* tests/test-mbsnrtoc32s.c: Include <wchar.h>.
(main): Skip GB18030 tests on NetBSD and Solaris.
* tests/test-mbsrtoc32s.c: Include <wchar.h>.
(main): Skip GB18030 tests on NetBSD and Solaris.
* tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isalnum.sh: Update.
* tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32isalpha.sh: Update.
* tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isblank.sh: Update.
* tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32iscntrl.sh: Update.
* tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isdigit.sh: Update.
* tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32isgraph.sh: Update.
* tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32islower.sh: Update.
* tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32isprint.sh: Update.
* tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32ispunct.sh: Update.
* tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isspace.sh: Update.
* tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isupper.sh: Update.
* tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32isxdigit.sh: Update.
* tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and
Solaris.
* tests/test-c32tolower.sh: Update.
* tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and
Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
Solaris.
* tests/test-c32toupper.sh: Update.
* modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/btoc32 (Link): New section.
* modules/btoc32-tests (Makefile.am): Link test-btoc32 with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32rtomb (Link): New section.
* modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32tob (Link): New section.
* modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
* modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32snrtombs (Link): New section.
* modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32srtombs (Link): New section.
* modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32stombs (Link): New section.
* modules/c32stombs-tests (Makefile.am): Link test-c32stombs with
$(LIBUNISTRING) $(LIBC32CONV).
* modules/c32isalnum (Link): Add $(LIBC32CONV).
* modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
$(LIBC32CONV).
* modules/c32isalpha (Link): Add $(LIBC32CONV).
* modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
$(LIBC32CONV).
* modules/c32isblank (Link): Add $(LIBC32CONV).
* modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
$(LIBC32CONV).
* modules/c32iscntrl (Link): Add $(LIBC32CONV).
* modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
$(LIBC32CONV).
* modules/c32isdigit (Link): Add $(LIBC32CONV).
* modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
$(LIBC32CONV).
* modules/c32isgraph (Link): Add $(LIBC32CONV).
* modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
$(LIBC32CONV).
* modules/c32islower (Link): Add $(LIBC32CONV).
* modules/c32islower-tests (Makefile.am): Link test-c32islower with
$(LIBC32CONV).
* modules/c32isprint (Link): Add $(LIBC32CONV).
* modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
$(LIBC32CONV).
* modules/c32ispunct (Link): Add $(LIBC32CONV).
* modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
$(LIBC32CONV).
* modules/c32isspace (Link): Add $(LIBC32CONV).
* modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
$(LIBC32CONV).
* modules/c32isupper (Link): Add $(LIBC32CONV).
* modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
$(LIBC32CONV).
* modules/c32isxdigit (Link): Add $(LIBC32CONV).
* modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
$(LIBC32CONV).
* modules/c32tolower (Link): Add $(LIBC32CONV).
* modules/c32tolower-tests (Makefile.am): Link test-c32tolower with
$(LIBC32CONV).
* modules/c32toupper (Link): Add $(LIBC32CONV).
* modules/c32toupper-tests (Makefile.am): Link test-c32toupper with
$(LIBC32CONV).
* modules/c32width (Link): Add $(LIBC32CONV).
* modules/c32width-tests (Makefile.am): Link test-c32width with
$(LIBC32CONV).
* modules/c32swidth (Link): Add $(LIBC32CONV).
* modules/c32swidth-tests (Makefile.am): Link test-c32swidth with
$(LIBC32CONV).
* modules/mbchar (Link): Add $(LIBC32CONV).
* modules/mbiter (Link): Add $(LIBC32CONV).
* modules/mbuiter (Link): Add $(LIBC32CONV).
* modules/mbfile (Link): Add $(LIBC32CONV).
* modules/mbmemcasecmp (Link): Add $(LIBC32CONV).
* modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with
$(LIBC32CONV).
* modules/mbscasecmp (Link): Add $(LIBC32CONV).
* modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with
$(LIBC32CONV).
* modules/mbscasestr (Link): Add $(LIBC32CONV).
* modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1,
test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV).
* modules/mbschr (Link): Add $(LIBC32CONV).
* modules/mbschr-tests (Makefile.am): Link test-mbschr with
$(LIBC32CONV).
* modules/mbscspn (Link): Add $(LIBC32CONV).
* modules/mbscspn-tests (Makefile.am): Link test-mbscspn with
$(LIBC32CONV).
* modules/mbslen (Link): Add $(LIBC32CONV).
* modules/mbsncasecmp (Link): Add $(LIBC32CONV).
* modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with
$(LIBC32CONV).
* modules/mbsnlen (Link): Add $(LIBC32CONV).
* modules/mbspbrk (Link): Add $(LIBC32CONV).
* modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with
$(LIBC32CONV).
* modules/mbspcasecmp (Link): Add $(LIBC32CONV).
* modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with
$(LIBC32CONV).
* modules/mbsrchr (Link): Add $(LIBC32CONV).
* modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with
$(LIBC32CONV).
* modules/mbssep (Link): Add $(LIBC32CONV).
* modules/mbsspn (Link): Add $(LIBC32CONV).
* modules/mbsspn-tests (Makefile.am): Link test-mbsspn with
$(LIBC32CONV).
* modules/mbsstr (Link): Add $(LIBC32CONV).
* modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2,
test-mbsstr3 with $(LIBC32CONV).
* modules/mbstok_r (Link): Add $(LIBC32CONV).
* modules/propername (Link): Add $(LIBC32CONV).
* modules/regex-quote (Link): Add $(LIBC32CONV).
* modules/regex-quote-tests (Makefile.am): Link test-regex-quote with
$(LIBC32CONV).
* modules/trim (Link): Add $(LIBC32CONV).
* modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV).
* modules/exclude (Link): Add $(LIBC32CONV).
* modules/exclude-tests (Makefile.am): Link test-exclude with
$(LIBC32CONV).
* doc/posix-headers/uchar.texi: Mention the uchar-c23 module.
* doc/posix-functions/mbrtoc32.texi: Likewise.
* doc/strings.texi (The char32_t type): Likewise.
|
|
f4015ac6
|
2023-06-25T20:18:41
|
|
thread: Avoid compiler warnings on Solaris.
* lib/glthread/thread.h: Include <stdint.h>.
(gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
intptr_t.
* modules/thread (Depends-on): Add stdint.
|
|
4c5d2bd3
|
2023-06-25T19:11:26
|
|
strerrorname_np: Add support for Solaris 11.4/sparc.
* lib/strerrorname_np.c (strerrorname_np): Consider ECKSUM, EFRAGS.
Allow ENOANO to be overloaded to another value.
* tests/test-strerrorname_np.c (main): Likewise.
|
|
bc90b15d
|
2023-06-25T10:29:47
|
|
exclude: Complete last change.
* lib/exclude.c: Include <uchar.h> instead of <wctype.h>.
|
|
4f74b9c9
|
2023-06-24T17:40:12
|
|
mbchar, mbiter, mbuiter: Overcome wchar_t limitations.
* lib/mbchar.h: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
(struct mbchar): Use char32_t instead of wchar_t.
(mb_casecmp, mb_caseequal): Use c32tolower instead of towlower.
(mb_isalnum): Use c32isalnum instead of iswalnum.
(mb_isalpha): Use c32isalpha instead of iswalpha.
(mb_isblank): Use c32isblank instead of iswblank.
(mb_iscntrl): Use c32iscntrl instead of iswcntrl.
(mb_isdigit): Use c32isdigit instead of iswdigit.
(mb_isgraph): Use c32isgraph instead of iswgraph.
(mb_islower): Use c32islower instead of iswlower.
(mb_isprint): Use c32isprint instead of iswprint.
(mb_ispunct): Use c32ispunct instead of iswpunct.
(mb_isspace): Use c32isspace instead of iswspace.
(mb_isupper): Use c32isupper instead of iswupper.
(mb_isxdigit): Use c32isxdigit instead of iswxdigit.
(mb_width_aux): Use c32width, c32iscntrl instead of wcwidth, iswcntrl.
* lib/mbiter.h: Include <uchar.h> instead of <wchar.h>.
(mbiter_multi_next): Use mbrtoc32 instead of mbrtowc.
* lib/mbuiter.h: Include <uchar.h> instead of <wchar.h>.
(mbuiter_multi_next): Use mbrtoc32 instead of mbrtowc.
* lib/mbfile.h (mbfile_multi_getc): Use mbrtoc32 instead of mbrtowc.
* lib/mbscasestr.c (knuth_morris_pratt_multibyte, mbscasestr): Use
c32tolower instead of towlower.
* lib/exclude.c (string_hasher_ci): Use char32_t, c32tolower instead of
wchar_t, towlower.
* modules/mbchar (Depends-on): Add uchar, c32isalnum, c32isalpha,
c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
c32ispunct, c32isspace, c32isupper, c32isxdigit, c32tolower, c32width.
Remove wchar, wctype-h, iswblank, iswdigit, iswxdigit, wcwidth.
* modules/mbiter (Depends-on): Add mbrtoc32, uchar. Remove mbrtowc,
wchar.
* modules/mbuiter (Depends-on): Likewise.
* modules/mbscasestr (Depends-on): Add c32tolower.
* modules/exclude (Depends-on): Add c32tolower.
* doc/strings.texi (C strings): Fix typo.
|
|
6032b8a7
|
2023-06-15T12:22:33
|
|
* lib/limits.in.h: Fix comment typo.
|
|
94a7cdb7
|
2023-06-12T18:39:49
|
|
vasnwprintf-posix: Work around another musl libc bug.
* m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LC): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it, and set
NEED_WPRINTF_DIRECTIVE_LC if the %lc test failed.
* lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_LC is set, do
the processing for %lc and %ls ourselves.
(local_wcslen): Update condition.
* doc/posix-functions/swprintf.texi: Mention the %lc problem.
|
|
e21309c2
|
2023-06-12T00:42:05
|
|
javacomp-script, javacomp: Silence javac warnings regarding [options].
* m4/javacomp.m4 (gt_JAVACOMP): Use option '-Xlint:-options' by default
and omit it only when it does not work.
* lib/javacomp.c (compile_using_javac): Add nowarn_option parameter.
(is_envjavac_usable): Add nowarn_option_out parameter. Use option
'-Xlint:-options' by default and omit it only when it does not work.
(is_javac_usable): Likewise.
(compile_java_class): Store the nowarn_option returned from
is_envjavac_usable and use it when invoking compile_using_envjavac.
Store the nowarn_option returned from is_javac_usable and use it when
invoking compile_using_javac.
|
|
66f9edfa
|
2023-06-11T03:13:29
|
|
javacomp-script, javacomp: Add support for javac versions > 11.
Reported by Adrian Bunk <bunk-gnu@fs.tum.de> in
<https://savannah.gnu.org/bugs/?63385>.
* m4/javacomp.m4 (gt_JAVACOMP): When the java version is > 11, use that
version as target_version, not 11. When the java version is > 17, don't
warn. Remove goodcode, failcode variables. Don't bail out if the
source-version argument or the target-version argument is in the range
12..99. Use a heuristic that works with javac versions 11..20 at least.
Update comments.
* lib/javacomp.h (compile_java_class): State that source-version and
target-version may be larger than 11.
* lib/javacomp.c (default_target_version): Accommodate versions up to
99.
(SOURCE_VERSION_BOUND): Increase to 94.
(source_version_index): Accept versions up to 99.
(get_goodcode_snippet, get_failcode_snippet): Remove functions.
(TARGET_VERSION_BOUND): Increase to 94.
(target_version_index): Accept versions up to 99.
(corresponding_classfile_version): Remove function.
(execute_and_read_line): New function, based on lib/javaversion.c.
(get_compiler_version): New function.
(is_envjavac_usable): Add parameters source_option_out,
target_option_out. Use a heuristic that works with javac versions 11..20
at least. Call cleanup_temp_dir.
(is_javac_usable): Likewise.
(compile_java_class): Update.
|
|
16047d4c
|
2023-06-11T03:13:24
|
|
javacomp-script, javacomp: Remove support for javac versions < 1.6.
* m4/javacomp.m4 (gt_JAVACOMP): State that the minimum source_version
and the minimum target_version are 1.6. Map smaller values to 1.6.
Complain if the java version is < 1.6. Use 1.6 as default, instead of
1.1. Don't bother trying the -target option alone.
* lib/javacomp.h (compile_java_class): State that the minimum
source_version and the minimum target_version are 1.6.
* lib/javacomp.c (default_target_version): Complain if the java version
is < 1.6. Use 1.6 as default, instead of 1.1.
(SOURCE_VERSION_BOUND, source_version_index, get_goodcode_snippet,
get_failcode_snippet): Adjust to the new minimum source_version = 1.6.
(TARGET_VERSION_BOUND, target_version_index,
corresponding_classfile_version): Adjust to the new minimum
target_version = 1.6.
(get_source_version_for_javac): Remove function.
(is_envjavac_usable): Remove source_version_for_javac parameter. Don't
bother trying the -target option alone.
(is_javac_usable): Likewise.
(compile_java_class): Map source_version < 1.6 to 1.6. Map
target_version < 1.6 to 1.6. Use source_version instead of calling
get_source_version_for_javac.
|
|
9c0ea2fc
|
2023-06-11T03:08:53
|
|
javacomp: Simplify after gcj support was removed.
* m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java.
* lib/javacomp.c (compile_java_class): Remove local variables
no_assert_option, fsource_option, ftarget_option.
|
|
810aaf10
|
2023-06-09T20:45:45
|
|
Correction of a spelling fix.
* lib/argp.h: Change "passed into" to "passed to".
|
|
f324566f
|
2023-06-09T11:13:19
|
|
xalloc-die: omit /*extern*/
* lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
It complicates syntax checking; see:
https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
Plus, it’s inconsistent style: the other function declarations in
xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
it’s just noise, as is the case here.)
|
|
37812c9a
|
2023-06-09T17:08:14
|
|
javaversion: Update comments.
* lib/javaversion.h (javaexec_version): Document the possible results up
to OpenJDK 20.
|
|
b82e7832
|
2023-06-09T16:11:23
|
|
javacomp: Remove support for 'jikes'.
* lib/javacomp.c (compile_using_jikes, is_jikes_present): Remove
functions.
(compile_java_class): Remove jikes related code.
|
|
3eae7148
|
2023-06-09T15:45:25
|
|
javacomp: Remove support for 'gcj'.
* lib/javacomp.h: Update comment.
* lib/javacomp.c (compile_using_gcj, is_envjavac_gcj, is_envjavac_gcj43,
is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
is_envjavac_oldgcj_14_13_usable, is_gcj_present, is_gcj_43,
is_gcj43_usable, is_oldgcj_14_14_usable, is_oldgcj_14_13_usable): Remove
functions.
(is_envjavac_usable): Renamed from is_envjavac_nongcj_usable.
(compile_java_class): Remove gcj related code.
|
|
0dee6d96
|
2023-06-09T15:17:53
|
|
javaexec: Remove support for 'gij'.
* lib/javaexec.c (execute_java_class): Don't test for gij.
|
|
e6295ce4
|
2023-06-09T14:57:07
|
|
javaexec: Remove support for 'jview'.
* lib/javaexec.c (execute_java_class): Don't test for jview.
|
|
295cc7fb
|
2023-06-08T14:53:51
|
|
Spelling fixes
Most of these were reported by Josh Soref <jsoref@gmail.com> in:
https://lists.gnu.org/r/bug-gnulib/2023-06/msg00057.html
except that some are omitted because the original is OK (e.g.,
"obsolescent"), and some are omitted because they are upstream
files and I've fixed them upstream or have filed bug reports,
and I made a few nearby corrections to grammar.
|
|
0e263670
|
2023-06-06T18:42:56
|
|
propername: pacify po_check
Problem reported by Bruno Haible <https://bugs.gnu.org/63933>.
* lib/propername.h: Change comment.
|
|
5d7b6c88
|
2023-06-05T15:45:25
|
|
posix_spawn-internal: Fix a warning (regression 2022-11-20).
* lib/spawni.c: Don't use this particular #pragma for gcc < 4.2.
|
|
3266c08a
|
2023-06-05T15:13:53
|
|
file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12).
* lib/file-has-acl.c (XATTR_NAME_POSIX_ACL_ACCESS,
XATTR_NAME_POSIX_ACL_DEFAULT): Add fallback definitions.
|
|
dc1b410b
|
2023-06-05T11:15:37
|
|
Fix bugs on mingw when module dirfd is in use (regression 2023-04-26).
* lib/getcwd.c: When GNULIB_defined_DIR, revert to the system's
definitions of opendir, closedir, readdir, rewinddir.
* lib/mountlist.c: When GNULIB_defined_DIR, revert to the system's
definitions of opendir, closedir, readdir.
* lib/scandir.c: Likewise.
* lib/glob.c: Fix comment. When GNULIB_defined_DIR, don't undefine
opendir, closedir.
|
|
4b11de31
|
2023-06-04T19:27:48
|
|
error: Fix support for library namespacing (regression 2023-05-27).
* lib/error.in.h (error): If error is defined as a macro, define a
static inline function _gl_inline_error that invokes it, and let the
new error macro invoke that function.
(error_at_line): If error_at_line is defined as a macro, define a static
inline function _gl_inline_error_at_line that invokes it, and let the
new error_at_line macro invoke that function.
|
|
8ef49279
|
2023-06-04T16:41:47
|
|
terminfo, termcap: Fix "discards 'const' qualifier" warnings.
* lib/tparm.c (tparm): Change type of 'fmt'. New local variable 'fmtp'.
|
|
9e13c0d5
|
2023-06-04T10:50:29
|
|
uniname/uniname: Fix -Wformat-signedness warning.
* lib/uniname/uniname.c (unicode_character_name): Use %u instead of %d
in format string.
|
|
39167e40
|
2023-06-04T10:45:00
|
|
uniname/uniname: Improve comments.
* lib/uniname/uniname.c (unicode_character_name): Fix comments.
|
|
3c23d340
|
2023-06-03T13:07:31
|
|
classpath, csharpexec: Avoid "candidate for attribute 'malloc'" warning.
* lib/classpath.h (set_classpath): Mark with attribute 'malloc'.
|
|
45d46e56
|
2023-06-03T12:31:21
|
|
propername-lite: Improve documentation.
* lib/propername.h: Describe functional differences between
proper_name_lite and proper_name_utf8.
|
|
11e2d84d
|
2023-06-03T11:59:59
|
|
error: Improve comments.
* lib/error.in.h (__gl_error_call): Add more comments.
|
|
cfd41b3a
|
2023-06-02T22:30:52
|
|
error: do not evaluate status twice
Do this in a different way, so that the status is evaluated
once even when not optimizing and when using GCC.
* lib/error.in.h (__gl_error_call1) [__GNUC__]: New macro.
(__gl_error_call) [__GNUC__]: Use it.
|
|
3f478b6c
|
2023-06-02T14:02:53
|
|
propername-lite: new module
propername_lite acts like propername_utf8 but needs less
infrastructure, e.g., it does not worry about memory allocation.
* MODULES.html.sh (func_all_modules): Mention it.
* lib/propername.h (proper_name_lite): New decl.
* lib/propername-lite.c, modules/propername-lite: New files.
* pygnulib/GLEmiter.py (GLEmiter.po_Makevars):
Treat proper_name_lite like proper_name_utf8.
|
|
7368e128
|
2023-06-02T20:11:53
|
|
openmp-init: Silence "no previous prototype for 'openmp_init'" warning.
* lib/omp.in.h: Test _OPENMP.
* lib/omp-init.c: Include <omp.h> always.
* modules/openmp-init (Include): Allow <omp.h> to be included always.
|
|
0245de5e
|
2023-06-02T20:11:49
|
|
term-style-control: Silence -Wshadow warning.
* lib/term-style-control.c (continuing_signal_handler): Rename
parameter.
|
|
beee06c7
|
2023-06-02T20:11:45
|
|
pipe-filter-gi, pipe-filter-ii: Silence -Wunused-macro warning.
* lib/pipe-filter-aux.c: Remove many unnecessary includes.
(_): Remove macro.
|
|
333fa52f
|
2023-06-02T20:11:57
|
|
javacomp: Silence -Wanalyzer-possible-null-argument warning.
* lib/javacomp.c: Include verify.h.
(is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_13_usable,
is_envjavac_nongcj_usable, compile_java_class): Assert that the
xasprintf results are non-NULL. This is possible since all involved
format strings are valid and don't use %ls, and all argument strings
are small compared to INT_MAX.
* modules/javacomp (Depends-on): Add verify.
|
|
fce9817d
|
2023-06-02T20:11:41
|
|
striconveha: Don't crash if malloc() returns NULL.
* lib/striconveha.c (mem_iconveha, str_iconveha): Check malloca() return
value.
|
|
6c9b59a9
|
2023-06-02T20:11:36
|
|
setenv: Don't crash if malloc() returns NULL.
* lib/setenv.c (rpl_setenv): Check malloca() return value.
|
|
26a63175
|
2023-06-02T20:02:45
|
|
error: Avoid implicit-fallthrough warnings with -O0 (regr. 2023-05-30).
* lib/error.in.h (__gl_error_call): Parenthesize status. When not
optimizing, expand to code without compound statements.
|
|
eaafa288
|
2023-06-01T16:18:02
|
|
getprogname: Add support for ASCII-compatible environments in z/OS.
Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00198.html>.
* lib/getprogname.c (getprogname): On z/OS, when compiling for an
ASCII-compatible environment, convert the result from EBCDIC to ASCII.
|
|
267296e6
|
2023-05-30T21:26:19
|
|
readline: fix memory leak in replacement readline.
* lib/readline.c (readline): Free memory after getline failure.
Copyright-paperwork-exempt: true
|
|
8bcd2873
|
2023-05-30T15:12:43
|
|
error: fix typo in previous patch
* lib/error.in.h (error): Fix __VA_ARGS__ typo noted by
Bruno Haible.
|
|
47811d1a
|
2023-05-30T14:38:41
|
|
error: don’t call ‘exit’
Let the underlying functions call ‘exit’, instead of having the
Gnulib replacement macros do it. Use ‘unreachable’ to tell the
compiler that those functions exit when the status is nonzero.
This saves a function call.
* lib/error.in.h: Include stddef.h, not stdlib.h.
(__gl_error_call): Rely on the function to exit, using
‘unreachable’ to tell the compiler that the function does not return.
* modules/error (Depends-on): Add stddef.
|
|
8b21ff25
|
2023-05-30T12:49:20
|
|
error: don’t evaluate status arg twice
This avoids potential issues if the first argument has a side effect.
* lib/error.in.h (__gl_error_call): New macro, which evaluates its
status arg only once, by using a statement expression if GNU C -
the only platform we need to worry about pacifying - and by simply
calling ‘error’ otherwise.
(error, error_at_line): Use it.
|
|
2bd4c8dc
|
2023-05-28T09:41:08
|
|
file-has-acl: avoid warning from bleeding-edge GCC
* lib/file-has-acl.c: Include attribute.h.
(have_xattr): Declare with ATTRIBUTE_PURE,
to avoid new warning from GCC14-to-be.
* modules/file-has-acl (Depends-on): Add attribute.
Spotted while building coreutils with this:
gcc version 14.0.0 20230526 (experimental)
|
|
4f7dce3f
|
2023-05-28T15:18:06
|
|
error: Avoid -Wint-in-bool-context warning.
Reported by Pádraig Brady in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00178.html>.
* lib/error.in.h (error, error_at_line): Use 'status != 0', since status
is expected to be an int, not a bool value.
|
|
752f97e9
|
2023-05-27T22:39:59
|
|
error: Support the compiler's control flow analysis better.
* lib/error.in.h: Remove @PRAGMA_SYSTEM_HEADER@. Include <stdlib.h>.
(error): Define as a macro that explicitly invokes exit().
(error_at_line): Likewise.
* lib/error.c (_GL_NO_INLINE_ERROR): Define before including error.h.
* modules/error-h (configure.ac): Don't invoke gl_CONDITIONAL_HEADER.
(Makefile.am): Generate error.h always. Don't substitute
PRAGMA_SYSTEM_HEADER.
* m4/error_h.m4 (gl_ERROR_H): Set COMPILE_ERROR_C instead of
GL_GENERATE_ERROR_H.
* modules/error (configure.ac, Depends-on): Test COMPILE_ERROR_C instead
of GL_GENERATE_ERROR_H.
* lib/copy-file.c: Revert the last change.
|
|
4ca39f72
|
2023-05-27T00:18:57
|
|
flexmember: Make it easier to use.
* lib/flexmember.h (FLEXNSIZEOF): New macro.
* lib/hamt.c (alloc_bucket, alloc_subtrie): Fix FLEXSIZEOF invocation.
Use FLEXNSIZEOF instead of FLEXSIZEOF.
* lib/ssfmalloc.h (init_small_block_page_pool): Use FLEXNSIZEOF instead
of FLEXSIZEOF.
|
|
f6edb0f1
|
2023-05-26T21:37:42
|
|
diffseq: Silence another gcc warning.
* lib/diffseq.h (compareseq): Move into the scope of the '#pragma GCC
diagnostic'.
|
|
3c28d025
|
2023-05-26T19:27:09
|
|
copy-file: Silence gcc warnings.
* lib/copy-file.c: Add #pragma GCC diagnostic.
|
|
b9e4387a
|
2023-05-26T14:39:01
|
|
diffseq: Silence gcc warning.
* lib/diffseq.h: Add #pragma GCC diagnostic.
|
|
67617718
|
2023-05-24T10:17:30
|
|
asyncsafe-spin, simple-atomic: Don't use -mcpu-v9 on NetBSD/sparc.
Reported by Brandon Applegate in
<https://lists.gnu.org/archive/html/bug-gettext/2023-05/msg00042.html>.
* lib/asyncsafe-spin.c: Limit the SPARC workaround to Solaris.
* lib/simple-atomic.c: Likewise.
* m4/sparcv8+.m4 (gl_SPARC_V8PLUS): Likewise.
|
|
dd477fa7
|
2023-05-23T12:56:40
|
|
nstrftime: wmemmove → __wmemmove in glibc part
https://sourceware.org/pipermail/libc-alpha/2023-May/148435.html
* lib/nstrftime.c (__strftime_internal) [COMPILE_WIDE]:
Use __wmemmove, not wmemmove, to keep in better sync with draft glibc.
|
|
37bf5023
|
2023-05-22T14:32:42
|
|
git-merge-changelog: Code style changes.
* lib/git-merge-changelog.c: Don't make side effects to variables
inside parenthesized expressions. Write (size_t)(-1), for consistency
with gl_list.h.
(compute_mapping): Rename variable in2 to jrev.
|
|
ff86bf89
|
2023-05-21T13:45:12
|
|
git-merge-changelog: port to size_t padding
* lib/git-merge-changelog (entry_hashcode):
As a nicety, Prefer SIZE_WIDTH to computing it ourselves.
|
|
a8921605
|
2023-05-21T13:25:25
|
|
git-merge-changelog: prefer idx_t
* lib/git-merge-changelog.c: Include idx.h.
(struct entry, entry_create, entry_hashcode)
(struct changelog_file, read_changelog_file)
(entries_mapping_get, entries_mapping_reverse_get)
(compute_mapping, struct edit, struct differences)
(compute_differences, find_paragraph_end)
(try_split_merged_entry, struct conflict, conflict_write, main):
Prefer idx_t to ptrdiff_t and size_t when the value is a
nonnegative index or size. Change a few for-loops so that
the index never goes negative.
* modules/git-merge-changelog (Depends-on): Add idx.
|
|
729b3812
|
2023-05-21T13:05:30
|
|
git-merge-changelog: ssize_t → ptrdiff_t
Prefer ptrdiff_t to ssize_t, as per
<https://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html>.
* lib/git-merge-changelog.c (struct entries_mapping)
(entries_mapping_get, entries_mapping_reverse_get)
(compute_mapping, struct edit, struct differences, OFFSET)
(OFFSET_MAX, EXTRA_CONTEXT_FIELDS, compute_differences, main):
Use ptrdiff_t, not ssize_t.
* modules/git-merge-changelog (Depends-on): Add stdint for PTRDIFF_MAX.
|
|
6712fec8
|
2023-05-21T11:38:50
|
|
git-merge-changelog: port to ssize_t padding
* lib/git-merge-changelog.c (OFFSET_MAX): New macro, as a nicety.
|
|
c8310c06
|
2023-05-20T15:24:05
|
|
regex: use limits-h SSIZE_MAX
|
|
a6502064
|
2023-05-20T15:23:16
|
|
getndelim2: use limits-h SSIZE_MAX
|
|
d4187a39
|
2023-05-20T15:22:32
|
|
getdelim: use limits-h SSIZE_MAX
|
|
1e473cf8
|
2023-05-20T15:21:40
|
|
careadlinkat: use limits-h SSIZE_MAX
This also adds a dependency of relocatable-prog-wrapper on
limits-h, since relocatable-prog-wrapper also contains
lib/careadlinkat.c.
|
|
dfc6fd49
|
2023-05-20T15:20:14
|
|
areadlinkat-with-size: use limits-h SSIZE_MAX
|
|
a0653041
|
2023-05-20T13:48:00
|
|
limits-h: other modules can rely on SSIZE_MAX
* lib/areadlink-with-size.c (SSIZE_MAX):
Do not define.
* modules/areadlink-with-size (Depends-on):
Add limits-h.
|
|
7f4a234f
|
2023-05-20T13:46:19
|
|
limits-h: define SSIZE_MAX
* doc/posix-headers/limits.texi (limits.h): Document this.
* lib/limits.in.h (SSIZE_MAX): Define if not already defined.
* m4/limits-h.m4 (gl_LIMITS_H): Also generate limits.h
if <limits.h> does not define SSIZE_MAX.
|
|
f29bafbc
|
2023-05-20T12:11:54
|
|
diffseq: backward compatibility for OFFSET_MAX
* lib/diffseq.h (OFFSET_MAX): Define only if not already defined.
|
|
ac021656
|
2023-05-19T23:55:34
|
|
careadlinkat: Silence gcc warning for GCC ≥ 12.
* lib/careadlinkat.c: For GCC 12 or newer, use
"#pragma GCC diagnostic ignored" to silence the warning.
|
|
e2bd7103
|
2023-05-19T10:34:44
|
|
modechange: pacify gcc -Wsuggest-attribute=pure
* lib/modechange.h (mode_adjust): Add _GL_ATTRIBUTE_PURE
suggested with GCC 12 with -flto.
|
|
5d2fe247
|
2023-05-19T08:57:29
|
|
diffseq: don’t assume integers lack padding
* NEWS: Mention this.
* lib/diffseq.h (OFFSET_MAX): Don’t define;
this is now the user’s responsibility.
* lib/fstrcmp.c (OFFSET_MAX): Define to PTRDIFF_MAX.
|
|
dab152a4
|
2023-05-19T00:45:50
|
|
getndelim2: Silence gcc warning.
* lib/getndelim2.c: Add #pragma GCC diagnostic.
(IF_LINT): Remove macro.
(getndelim2): Remove use of IF_LINT.
|
|
2f782579
|
2023-05-19T00:45:46
|
|
canonicalize: Silence gcc warning.
* lib/canonicalize.c: Add #pragma GCC diagnostic.
(IF_LINT): Remove macro.
(canonicalize_filename_mode_stk): Remove use of IF_LINT.
|
|
52cd8f06
|
2023-05-18T22:58:23
|
|
vasnprintf, c-vasnprintf: Silence gcc warning.
* lib/vasnprintf.c: Add #pragma GCC diagnostic.
|
|
2e99a1af
|
2023-05-18T22:46:47
|
|
nstrftime: Silence gcc warning.
* lib/nstrftime.c: Add #pragma GCC diagnostic.
|
|
85a42d4d
|
2023-05-18T22:37:20
|
|
astrxfrm: Silence gcc warning.
* lib/astrxfrm.c: Add #pragma GCC diagnostic.
|
|
a6548695
|
2023-05-18T22:51:17
|
|
vasnprintf, c-vasnprintf: Silence gcc warnings.
* lib/vasnprintf.c (scale10_round_decimal_decoded): Remove memory==NULL
test.
(scale10_round_decimal_long_double, scale10_round_decimal_double): Test
for memory==NULL here. Remove use of IF_LINT.
|
|
bcab9f79
|
2023-05-18T22:40:12
|
|
bitset: Silence gcc warning.
* lib/bitset/list.c (lbitset_copy_): Remove redundant test from the
loop's first iteration.
|
|
54504760
|
2023-05-18T22:48:54
|
|
stack: Silence gcc warning in tests.
* lib/stack.h (init, destroy, empty, current_base, push, pop, discard,
top, size): Mark as possibly unused.
|
|
136942a5
|
2023-05-18T22:45:45
|
|
hamt: Silence gcc warning.
* lib/hamt.c (init_element): Mark as possibly unused.
|
|
1b63db98
|
2023-05-18T22:43:14
|
|
get-rusage-data: Silence gcc warning.
* lib/get-rusage-data.c (get_rusage_data_via_iterator): Mark as possibly
unused.
|
|
f8940f48
|
2023-05-18T18:01:06
|
|
astrxfrm: Fix use-after-free bug.
* lib/astrxfrm.c (astrxfrm): Don't use memcpy after realloc succeeded.
|
|
2c6e9dfc
|
2023-05-18T15:39:19
|
|
uchar: Fix error when <uchar.h> is included twice.
* lib/uchar.in.h: Fix double-inclusion guard.
|
|
29bf76b3
|
2023-05-17T12:38:28
|
|
stdckdint: use in parse-datetime
* lib/parse-datetime.y (apply_relative_time, zone, date)
(iso_8601_date, relunit, relunit_snumber, time_zone_hhmm)
(to_tm_year, yylex, parse_datetime_body):
Prefer ckd_add to INT_ADD_WRAPV etc., and include stdckdint.h.
* modules/parse-datetime (Depends-on): Add stdckdint.
|
|
d959e39c
|
2023-05-17T12:24:07
|
|
stdckdint: use in more modules
* lib/nstrftime.c (__strftime_internal):
* lib/timespec-add.c (timespec_add):
* lib/timespec-sub.c (timespec_sub):
* lib/xstrtol.c (bkm_scale):
Prefer ckd_add to INT_ADD_WRAPV etc., and include stdckdint.h.
* modules/nstrftime, modules/timespec-add, modules/timespec-sub:
* modules/xstrtol:
(Depends-on): Add stdckdint.
|
|
0a4e0cab
|
2023-05-17T10:27:40
|
|
nstrftime: suggest to glibc how to avoid alloca
* lib/nstrftime.c (widen) [COMPILE_WIDE]: Remove.
(__strftime_internal) [COMPILE_WIDE): Instead of converting the
multibyte time zone abbreviation into a potentially unbounded
alloca buffer, convert it directly into the output buffer.
Although this code is not used in Gnulib, this can help the glibc
developers avoid the problem on the glibc side.
|
|
f3059fb8
|
2023-05-15T18:33:47
|
|
sigsegv: Add tentative support for Hurd/x86_64.
Based on explanations by Sergey Bugaev <bugaevc@gmail.com>.
* lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386-old.h.
|
|
73571693
|
2023-05-15T08:40:27
|
|
file-has-acl: improve port to Fedora 39
Problem reported by Ondrej Valousek in:
https://lists.gnu.org/r/bug-gnulib/2023-05/msg00078.html
* lib/file-has-acl.c: Include minmax.h.
[USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]: Include stdckdint.h.
(file_has_acl) [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]:
If the file has NFSv4 ACLs, ignore any POSIX ACLs, for Fedora 39.
Return a bit faster when listxattr returns 0.
Don’t loop forever if an attacker is fiddling with ACLs.
* modules/file-has-acl (Depends-on): Add minmax, stdckdint.
|
|
3a70af21
|
2023-05-15T14:36:17
|
|
gettimeofday, pthread-*, thread, thrd: Don't omit intended initializers.
* lib/gettimeofday.c (gettimeofday): List the initializers of both
tv_sec and tv_usec.
* lib/glthread/thread.c (gl_thread_self): List the initializers of both
tv_sec and tv_nsec.
* lib/pthread-cond.c (pthread_cond_wait): Likewise.
* lib/thrd.c (rpl_thrd_current): Likewise.
* lib/pthread-rwlock.c (MIN): New macro.
(pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): List the
initializers of both tv_sec and tv_nsec. Don't modify the duration after
having initialized it.
* lib/pthread_mutex_timedlock.c (MIN): New macro.
(pthread_mutex_timedlock): List the initializers of both tv_sec and
tv_nsec. Don't modify the duration after having initialized it.
|
|
ebd843b3
|
2023-05-15T11:19:16
|
|
select: Fix compilation error (regression from yesterday).
* lib/select.c (rpl_select): Revert last change.
|
|
c013d710
|
2023-05-15T11:13:08
|
|
poll: Fix syntax error (regression from yesterday).
* lib/poll.c (poll): Remove semicolon inside braces.
|
|
88811b7d
|
2023-05-14T23:27:51
|
|
timespec: fill in other members
This problem was found when compiling GNU Emacs with
--enable-gcc-warnings on a platform where tv_sec is 64 bits and
tv_nsec is 32 bits, and struct timespec has padding. GCC
-Wuse-of-uninitialized-value complained when a struct timespec
initialized only via assigning to tv_sec and tv_nsec was copied
via assignment (this was in lib/timespec.h’s make_timespec).
Although behavior is well-defined on this platform, the warning is
annoying and the behavior might not be well-defined on theoretical
platforms where struct timespec has other members. To work around
this, initialize all the struct’s members.
* lib/getsockopt.c (rpl_getsockopt):
* lib/gettime.c (gettime):
* lib/gettimeofday.c (gettimeofday):
* lib/glthread/thread.c (gl_thread_self):
* lib/nanosleep.c (nanosleep):
* lib/parse-datetime.y (digits_to_date_time, set_hhmmss)
(signed_seconds, unsigned_seconds, yylex, parse_datetime_body):
* lib/poll.c (poll):
* lib/pselect.c (pselect):
* lib/pthread-cond.c (endlessly, pthread_cond_timedwait):
* lib/pthread-rwlock.c (pthread_rwlock_timedrdlock)
(pthread_rwlock_timedwrlock):
* lib/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
* lib/select.c (rpl_select):
* lib/settime.c (settime):
* lib/stat-time.h (get_stat_atime, get_stat_ctime)
(get_stat_mtime, get_stat_birthtime):
* lib/thrd.c (rpl_thrd_current):
* lib/timespec.h (make_timespec):
* lib/timespec_getres.c (timespec_getres):
* lib/utimecmp.c (utimecmpat):
* lib/utimens.c (fdutimens):
When filling in a struct timespec or similar time-related structure
that might be copied elsewhere, also assign to any storage other
than tv_sec and tv_nsec, to avoid undefined behavior on (likely
theoretical) platforms where struct timespec has other members,
and also to avoid warnings from GCC and/or valgrind.
|
|
76402405
|
2023-05-13T21:47:10
|
|
stdio: use _GL_ATTRIBUTE_MALLOC
* lib/stdio.in.h (fdopen, fopen, popen, tmpfile): Declare with
_GL_ATTRIBUTE_MALLOC, for consistency with glibc, and so that
building the fopen module with ‘gcc -O2 -Wsuggest-attribute=malloc
-Wsystem-headers -Werror’ does not fail with “stdio.h: In function
‘rpl_fopen’: stdio.h:970:1: error: function might be candidate for
attribute ‘malloc’ [-Werror=suggest-attribute=malloc]”, a problem
I noticed on both Fedora 38 and Ubuntu 23.04.
sigsegv: Add tentative support for Hurd/x86_64. Reported by
Samuel Thibault <samuel.thibault@ens-lyon.org>.
|
|
acb36717
|
2023-05-12T21:28:47
|
|
sigsegv: Add tentative support for Hurd/x86_64.
Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
* lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h.
|
|
f01d8792
|
2023-05-12T12:23:49
|
|
file-has-acl: don’t access freed storage
Fix typo in previous patch, by not accessing freed storage
in the unusual case where the statck buffer is not large enough.
|
|
b851a965
|
2023-05-12T11:56:17
|
|
file-has-acl: port to Fedora 39
Fedora 39 getxattr with XATTR_NAME_POSIX_ACL_ACCESS either
succeeds or fails with ENODATA, so it is no longer possible to
detect from its failure that the filesystem might support NFSv4 ACLs.
Problem reported by Ondrej Valousek in:
https://lists.gnu.org/r/bug-gnulib/2023-04/msg00228.html
Instead, use listxattr to determine whether NFSv4 ACLs are in play.
This typically saves syscalls anyway.
* lib/file-has-acl.c: In #if, use (HAVE_LINUX_XATTR_H &&
HAVE_LISTXATTR) instead of GETXATTR_WITH_POSIX_ACLS.
The following changes apply when (USE_ACL && HAVE_LINUX_XATTR_H &&
HAVE_LISTXATTR):
Include minmax.h.
(have_xattr): New function.
(file_has_acl): Try listxattr first; typically this means we need
to do no other syscall. Call getxattr only if there are NFSv4
ACLs but not POSIX ACLs.
* m4/acl.m4 (gl_FILE_HAS_ACL): Simplify by merely testing for
linux/xattr.h and listxattr. All uses changed.
|