boost::filesystem throws errno.h's EIO (code 5) when I try to delete a readonly file under my mingw implementation. I was expecting it to throw EACCESS (code 13, if memory serves me right).

It surprises me mingw's errno.h being erroneous. But after reading the header's author comment, then again maybe not.

Anyways, I need to do #define so that I can meet that error code 5 with a proper name. The code needs to be portable. What should I catter for? Implementation + Operating System or just Operating System?