Update fmemopen from NetBSD.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Mon, 12 Sep 2011 02:33:22 +0000 (19:33 -0700)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Mon, 12 Sep 2011 02:33:22 +0000 (19:33 -0700)
commit395d17df7d6f2dcc98f215833bcec79ceed9897d
tree51a4cb35bd936d034e91da554d3a7fd31a45d1e5
parent06e7871fb5988f83aa0dd5709f56dae95f820e1d
Update fmemopen from NetBSD.

NetBSD's version of fmemopen() was more correct than our own wrt error
handling and handling seeks at the tail of buffers. We now pass the ATF
fmemopen test set, with the exception of test08; that problem is related to
malloc return for SIZE_MAX requests.

Changes:
* Modified NetBSD's fmemopen to work with our libc's private FILE struct
* Modified fmemopen_read() to use bcopy() rather than a byte-at-a-time loop
lib/libc/stdio/fmemopen.c