make vfprintf set stream orientation even for zero-length output
authorRich Felker <dalias@aerifal.cx>
Thu, 30 Aug 2018 03:53:45 +0000 (23:53 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 30 Aug 2018 03:53:45 +0000 (23:53 -0400)
commita43a7b215cf7b71d1371c63927c17bae7177aa95
treec3766205559ed56d7f281a584a4be39cac13dc64
parentf1791f42ef6d22e68dfc1ee45c0a478b156ce46d
make vfprintf set stream orientation even for zero-length output

if no output is produced, no underlying fwrite will ever be called,
but byte-oriented printf functions are still required to set the
orientation of the stream to byte-oriented. call __towrite explicitly
if the FILE is not already in write mode.
src/stdio/vfprintf.c