Solaris equivalent to fcntl.h and share.h
I am porting a big C++ project from Windows/VS to Solaris/Eclipse/gcc. The Windows code uses _SH_DENYNO etc which are in a Microsoft file share.h. The same file on the Sun at /usr/include/sys does not contain these, nor does any other I can find.
I suppose they have another name in Solaris. Can someone tell me where to find their equivalent? The windows versions have these values:
#define _SH_DENYRW 0x10 /* deny read/write mode */
#define _SH_DENYWR 0x20 /* deny write mode */
#define _SH_DENYRD 0x30 /* deny read mode */
#define _SH_DENYNO 0x40 /* deny none mode */
#define _SH_SECURE 0x80 /* secure mode */
Do the Solaris versions have the same values?
(Sorry about the big font, it insisted)
I think solaris, like other unix, is always _SH_DENYNO. You need explicit locking of files, try lockf or fcntl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With