Re: fprintf() crashes on wide-oriented stream.

Takashi Yano <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Tue, 26 Sep 2023 12:41:47 +0900
Takashi Yano wrote:
> With this patch, __sfputs_r/__sprint_r is split into two versions, one
> is for vfprintf which does not handle wide string, and the other (newly
> introduced __sfputws_r/__swprin_r) is for vfwprintf which handles wide
> string. Please note that fprintf gets working for wide orient stream
> just like BSD libc, which behaves differently from GNU libc.

I confirmed musl libc also behaves as BSD libc.

In the GNU libc (glibc), fprintf() returns -1 with no errno set if the
stream is wide-oriented.

-- 
Takashi Yano <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.