fprintf() crashes on wide-oriented stream.
Takashi Yano
takashi.yano@nifty.ne.jp
Thu Sep 28 03:58:27 GMT 2023
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 <takashi.yano@nifty.ne.jp>
More information about the Newlib
mailing list