提交 2e04ce09 编写于 作者: M Mark Adler

Make sure that O_EXCL is used portably.

上级 e3ba2a10
...@@ -196,8 +196,11 @@ local gzFile gz_open(path, fd, mode) ...@@ -196,8 +196,11 @@ local gzFile gz_open(path, fd, mode)
#endif #endif
(state->mode == GZ_READ ? (state->mode == GZ_READ ?
O_RDONLY : O_RDONLY :
(O_WRONLY | O_CREAT | (exclusive ? O_EXCL : 0) | ( (O_WRONLY | O_CREAT |
state->mode == GZ_WRITE ? #ifdef O_EXCL
(exclusive ? O_EXCL : 0) |
#endif
(state->mode == GZ_WRITE ?
O_TRUNC : O_TRUNC :
O_APPEND))), O_APPEND))),
0666); 0666);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册