Make sure that O_EXCL is used portably.
This commit is contained in:
parent
e3ba2a10ca
commit
2e04ce0915
7
gzlib.c
7
gzlib.c
@ -196,8 +196,11 @@ local gzFile gz_open(path, fd, mode)
|
||||
#endif
|
||||
(state->mode == GZ_READ ?
|
||||
O_RDONLY :
|
||||
(O_WRONLY | O_CREAT | (exclusive ? O_EXCL : 0) | (
|
||||
state->mode == GZ_WRITE ?
|
||||
(O_WRONLY | O_CREAT |
|
||||
#ifdef O_EXCL
|
||||
(exclusive ? O_EXCL : 0) |
|
||||
#endif
|
||||
(state->mode == GZ_WRITE ?
|
||||
O_TRUNC :
|
||||
O_APPEND))),
|
||||
0666);
|
||||
|
Loading…
Reference in New Issue
Block a user