Questions
On windows try adding the underscore (_S_ISREG). In MinGW's lib the S_ISREG macro is also accessible in
_S_ISREG
S_ISREG
Maybe you should just check your configuration macros.