This is needed to bootstrap llvm-tblgen on Linux since LLVM calls
::open(...) which does not work if open is a statement macro.
Also stop defining O_SHLOCK/O_EXLOCK and update the only bootstrap tools
user of those flags to deal with missing definitions.
Split out from D31057