I assume that's to patch up the test suite? That should be addressed in a different way; it doesn't belong in a public header and besides, S_READ and S_IWRITE are obsolete BSD-isms anyway. I think the reason we use them is that Windows doesn't have S_IRUSR and S_IWUSR.

See #821 - once it checks out on Windows, I'll land it in master. Can you rebase and remove this afterwards?