projects
/
platform
/
upstream
/
zlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3ba2a1
)
Make sure that O_EXCL is used portably.
author
Mark Adler
<madler@alumni.caltech.edu>
Sun, 4 Mar 2012 19:26:25 +0000
(11:26 -0800)
committer
Mark Adler
<madler@alumni.caltech.edu>
Sun, 4 Mar 2012 19:26:25 +0000
(11:26 -0800)
gzlib.c
patch
|
blob
|
history
diff --git
a/gzlib.c
b/gzlib.c
index
fec7fbf
..
4732fcc
100644
(file)
--- a/
gzlib.c
+++ b/
gzlib.c
@@
-196,10
+196,13
@@
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_TRUNC :
- O_APPEND))),
+ (O_WRONLY | O_CREAT |
+#ifdef O_EXCL
+ (exclusive ? O_EXCL : 0) |
+#endif
+ (state->mode == GZ_WRITE ?
+ O_TRUNC :
+ O_APPEND))),
0666);
if (state->fd == -1) {
free(state->path);