- S_IRGRP and S_IROTH should be defined in sys/stat.h rather than fcntl.h
- Old MinGW64 on Ubuntu 14.04 appears not to have S_IRGRP and S_IROTH
- MinGW64 has __WIN32 defined but does not have _MSC_VER defined
Note that 'perror' moves from stdio.h to stdlib.h, and 'rename' moves
from stdio.h to io.h. Also, standard C includes move from the compiler
to the Windows SDK, which changes the base path for the include files.
This moves the compatibility include files from include to
include/compat so we can use the awful MS C compiler
<../include/> trick to emulate the GNU #include_next extension.
This also removes a few old compat files we do not need anymore.