aboutsummaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gzlib.c b/gzlib.c
index fec7fbf..4732fcc 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -196,10 +196,13 @@ local gzFile gz_open(path, fd, mode)
196#endif 196#endif
197 (state->mode == GZ_READ ? 197 (state->mode == GZ_READ ?
198 O_RDONLY : 198 O_RDONLY :
199 (O_WRONLY | O_CREAT | (exclusive ? O_EXCL : 0) | ( 199 (O_WRONLY | O_CREAT |
200 state->mode == GZ_WRITE ? 200#ifdef O_EXCL
201 O_TRUNC : 201 (exclusive ? O_EXCL : 0) |
202 O_APPEND))), 202#endif
203 (state->mode == GZ_WRITE ?
204 O_TRUNC :
205 O_APPEND))),
203 0666); 206 0666);
204 if (state->fd == -1) { 207 if (state->fd == -1) {
205 free(state->path); 208 free(state->path);