Repetition.  Would it be better, on MinGW, to simply have some pertinent header (of ours) <code>
#ifndef S_IRGRP
# define S_IRGRP 0
#endif </code> and similar for S_IROTH ?  This would save lots of tedious repetition of #if-ery.