[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vasnwprintf-posix: Work around two musl libc bugs
From: |
Bruno Haible |
Subject: |
vasnwprintf-posix: Work around two musl libc bugs |
Date: |
Mon, 12 Jun 2023 19:14:32 +0200 |
The attached three patches fix
1) a few wrong cross-compilation guesses,
2) a test-vasnwprintf-posix failure on Alpine Linux 3.18 (musl libc 1.2.4):
FAIL: test-vasnwprintf-posix
============================
../../gltests/test-vasnwprintf-posix.c:3999: assertion 'result != NULL' failed
Aborted
FAIL test-vasnwprintf-posix (exit status: 134)
3) another failure of test-vasnwprintf-posix on Alpine Linux 3.18 (musl libc
1.2.4), once the previous one is fixed:
FAIL: test-vasnwprintf-posix
============================
../../gltests/test-vasnwprintf-posix.c:4074: assertion 'result != NULL' failed
Aborted
FAIL test-vasnwprintf-posix (exit status: 134)
These two failures occurred in with musl libc 1.2.4 but not with
musl libc 1.2.3 because in 1.2.4 HAVE_WORKING_SWPRINTF gets defined
to 1 and thus the vasnwprintf implementation is based on swprintf rather
than snprintf. In other words, The vasnwprintf implementation now takes
a different code path, one that is sensitive to all kinds of swprintf
bugs.
2023-06-12 Bruno Haible <bruno@clisp.org>
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.
2023-06-12 Bruno Haible <bruno@clisp.org>
vasnwprintf-posix: Work around a musl libc bug.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether swprintf
in the C locale is free of encoding errors, and set
NEED_WPRINTF_DIRECTIVE_C if not.
* doc/posix-functions/swprintf.texi: Clarify the list of platforms for
the %c problem.
2023-06-12 Bruno Haible <bruno@clisp.org>
vasnwprintf: Fix some cross-compilation results.
* m4/printf.m4 (gl_SWPRINTF_WORKS): Fix cross-compilation result for
musl.
(gl_SWPRINTF_DIRECTIVE_LA): Fix cross-compilation result for Android.
0001-vasnwprintf-Fix-some-cross-compilation-results.patch
Description: Text Data
0002-vasnwprintf-posix-Work-around-a-musl-libc-bug.patch
Description: Text Data
0003-vasnwprintf-posix-Work-around-another-musl-libc-bug.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- vasnwprintf-posix: Work around two musl libc bugs,
Bruno Haible <=