Solaris 中的 SH_DENY* 等效项
Solaris 相当于 fcntl.h 和 share.h
我正在将一个大型 C++ 项目从 Windows/VS 移植到 Solaris/Eclipse/gcc。 Windows 代码使用 Microsoft 文件 share.h 中的 _SH_DENYNO
等。 Sun 上 /usr/include/sys
上的同一文件不包含这些文件,我也找不到任何其他文件。
我想他们在 Solaris 中有另一个名字。有人可以告诉我在哪里可以找到相应的内容吗? Windows 版本具有以下值:
#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 */
Solaris 版本是否具有相同的值?
(抱歉,字体太大了,它坚持)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为Solaris,像其他unix一样,总是
_SH_DENYNO
。您需要显式锁定文件,请尝试lockf
或fcntl
。I think solaris, like other unix, is always
_SH_DENYNO
. You need explicit locking of files, trylockf
orfcntl
.