Don't use the mode_t type - the official windows sdk doesn't have that type.
(Mingw headers does have such a typedef though.) The umask function returns
int on windows, in both header variants.
Thus just use auto to deduce the umask return type automatically.
Please add a comment on this line: // int on Windows, mode_t on POSIX.
Otherwise someone'll just change it back in the future.