This was done from reading the Linux man page for open(2). I did not performed experiments on Linux to see how is this implementation is compatible with it.
As I understand, it was asked for by samba devs/porters.
Test program is available at https://gist.github.com/35e8084c99fcc9a2af0b1ae79dd845d7