There are at least two programs I know of which expect these to be defined as above, they are python and git, there may well be others we haven't noticed. We patch python, but git is not so easily patched.
Could you give an example, why a program must stick to fixed values and cannot use the defined masks, like S_IFDIR, and macros, like S_ISDIR()?
Pozdrawiam KMK