Solaris 中的 SH_DENY* 等效项

发布于 2024-11-14 07:12:15 字数 646 浏览 4 评论 0原文

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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吾性傲以野 2024-11-21 07:12:15

我认为Solaris,像其他unix一样,总是_SH_DENYNO。您需要显式锁定文件,请尝试 lockffcntl

I think solaris, like other unix, is always _SH_DENYNO. You need explicit locking of files, try lockf or fcntl.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文