<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/stdio, branch v0.7.8</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>fix printf("%.9g", 1.1) and similar not dropping trailing zeros</title>
<updated>2011-04-12T15:50:52+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-12T15:50:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e514228043c2618f925bcfe8db71b0ff4e2b2113'/>
<id>e514228043c2618f925bcfe8db71b0ff4e2b2113</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix fputwc return value</title>
<updated>2011-04-11T05:52:23+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-11T05:52:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=52458cfa8c79a9eacb81e151e15cdeff04b75d37'/>
<id>52458cfa8c79a9eacb81e151e15cdeff04b75d37</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>work around a nasty bug in linux readv syscall</title>
<updated>2011-04-09T05:17:55+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-09T05:17:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2cff36a84f268c09f4c9dc5a1340652c8e298dc0'/>
<id>2cff36a84f268c09f4c9dc5a1340652c8e298dc0</id>
<content type='text'>
according to posix, readv "shall be equivalent to read(), except..."
that it places the data into the buffers specified by the iov array.
however on linux, when reading from a terminal, each iov element
behaves almost like a separate read. this means that if the first iov
exactly satisfied the request (e.g. a length-one read of '\n') and the
second iov is nonzero length, the syscall will block again after
getting the blank line from the terminal until another line is read.
simply put, entering a single blank line becomes impossible.

the solution, fortunately, is simple. whenever the buffer size is
nonzero, reduce the length of the requested read by one byte and let
the last byte go through the buffer. this way, readv will already be
in the second (and last) iov, and won't re-block on the second iov.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
according to posix, readv "shall be equivalent to read(), except..."
that it places the data into the buffers specified by the iov array.
however on linux, when reading from a terminal, each iov element
behaves almost like a separate read. this means that if the first iov
exactly satisfied the request (e.g. a length-one read of '\n') and the
second iov is nonzero length, the syscall will block again after
getting the blank line from the terminal until another line is read.
simply put, entering a single blank line becomes impossible.

the solution, fortunately, is simple. whenever the buffer size is
nonzero, reduce the length of the requested read by one byte and let
the last byte go through the buffer. this way, readv will already be
in the second (and last) iov, and won't re-block on the second iov.
</pre>
</div>
</content>
</entry>
<entry>
<title>add more legacy functions: setlinebuf and setbuffer</title>
<updated>2011-04-05T16:25:31+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-05T16:25:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e72180083e4b0203d1883b6054198decdb60071c'/>
<id>e72180083e4b0203d1883b6054198decdb60071c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix overflow in printf %N$ argument handling</title>
<updated>2011-04-05T13:24:03+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-05T13:24:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2f3d02cd83a46244c3f5a6fec851d7eded1376f4'/>
<id>2f3d02cd83a46244c3f5a6fec851d7eded1376f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix various floating point rounding and formatting errors in *printf</title>
<updated>2011-04-05T13:16:40+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-05T13:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f9569662c08d371b85c77f025dd5c6e00b4a4c8b'/>
<id>f9569662c08d371b85c77f025dd5c6e00b4a4c8b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify vdprintf implementation greatly based on recent vfprintf changes</title>
<updated>2011-04-04T20:30:39+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-04T20:30:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=98c5583ad5d633166e28034c0a3544ad48b532b6'/>
<id>98c5583ad5d633166e28034c0a3544ad48b532b6</id>
<content type='text'>
since vfprintf will provide a temporary buffer in the case where the
target FILE has a zero buffer size, don't bother setting up a real
buffer for vdprintf. this also allows us to skip the call to fflush
since we know everything will be written out before vfprintf returns.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since vfprintf will provide a temporary buffer in the case where the
target FILE has a zero buffer size, don't bother setting up a real
buffer for vdprintf. this also allows us to skip the call to fflush
since we know everything will be written out before vfprintf returns.
</pre>
</div>
</content>
</entry>
<entry>
<title>use a local temp buffer for unbuffered streams in vfprintf</title>
<updated>2011-04-04T20:24:49+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-04T20:24:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=bd57e2b43a5b56c00a82adbde0e33e5820c81164'/>
<id>bd57e2b43a5b56c00a82adbde0e33e5820c81164</id>
<content type='text'>
this change makes it so most calls to fprintf(stderr, ...) will result
in a single writev syscall, as opposed to roughly 2*N syscalls (and
possibly more) where N is the number of format specifiers. in
principle we could use a much larger buffer, but it's best not to
increase the stack requirements too much. most messages are under 80
chars.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this change makes it so most calls to fprintf(stderr, ...) will result
in a single writev syscall, as opposed to roughly 2*N syscalls (and
possibly more) where N is the number of format specifiers. in
principle we could use a much larger buffer, but it's best not to
increase the stack requirements too much. most messages are under 80
chars.
</pre>
</div>
</content>
</entry>
<entry>
<title>don't disable seeking after first seek failure</title>
<updated>2011-04-02T17:55:54+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-02T17:55:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=8de03e1a90e60f62806c488cfa4985f99e869f87'/>
<id>8de03e1a90e60f62806c488cfa4985f99e869f87</id>
<content type='text'>
this could cause problems if the application uses dup2(fd,fileno(f))
to redirect, and the old fd was not seekable but the new fd is.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this could cause problems if the application uses dup2(fd,fileno(f))
to redirect, and the old fd was not seekable but the new fd is.
</pre>
</div>
</content>
</entry>
<entry>
<title>apparently fseek should not set the error flag on failed seek</title>
<updated>2011-04-02T17:54:55+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-02T17:54:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=9a909fcd915c65628931dcf6e7b34f261e39e3a3'/>
<id>9a909fcd915c65628931dcf6e7b34f261e39e3a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
