Rich Felker wrote:
> considering printf broken, and replacing printf
> because of this, is a big issue. Replacing printf is non-trivial
There is also another test that causes musl's printf to be overridden:
checking whether printf supports the 'ls' directive... no
The test program exited with code 8, meaning that this test (from m4/printf.m4)
failed:
/* Test whether precisions in %ls are supported as specified in ISO C 99
section 7.19.6.1:
"If a precision is specified, no more than that many bytes are written
(including shift sequences, if any), and the array shall contain a
null wide character if, to equal the multibyte character sequence
length given by the precision, the function would need to access a
wide character one past the end of the array."
This test fails on Solaris 10. */
{
static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
buf[0] = '\0';
if (sprintf (buf, "%.2ls", wstring) < 0
|| strcmp (buf, "ab") != 0)
result |= 8;
}
Bruno