I don't know enough about windows libc's to evaluate the correctness of this change.  Can you cite a resource justifying why this is win32 only?  The rest of the changes are great, assuming the tests pass.