On Tue, Apr 17, 2012 at 10:54:40PM -0400, Rich Felker wrote: > I tried it with glibc, and realized it's invoking undefined behavior > by writing to the temp file with byte-oriented fwrite then performing > fwscanf (wide) to read from it. I'll send a new version (along with a > heapload of tests) in a little bit. Here's the new version, fixed to write temp files without violating the rule that you can't mix byte and wide io. I've committed to musl a number of fixes based on early results of these tests. Rich