path: root/ext/zlib
diff options
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 01:25:47 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 01:25:47 +0000
commit8229b9dd3f57a965872734f2b97f98a512979560 (patch)
tree411479a6c212056c5fca699fbc0eee9cca07fce5 /ext/zlib
parent7f654692260c710406eed0c8e993eb1b79efa1d9 (diff)
* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
1st, to change the mode of an IO is very sensitive problem, so the maintainer of this library should judge it. 2nd, usually is not called directly. #initialize is called via .open, and in the method the I/O is opened in binary mode, so there is no problem without changing the mode in #initialize. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
1 files changed, 0 insertions, 8 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 073883b..a235cbb 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -10,7 +10,6 @@
#include <zlib.h>
#include <time.h>
#include <ruby/io.h>
-#include <fcntl.h>
# include <valgrind/memcheck.h>
@@ -3426,13 +3425,6 @@ rb_gzreader_initialize(int argc, VALUE *argv, VALUE obj)
Data_Get_Struct(obj, struct gzfile, gz);
rb_scan_args(argc, argv, "1:", &io, &opt);
-#ifdef O_BINARY
- if (BUILTIN_TYPE(io) == T_FILE) {
- rb_io_t *fptr;
- GetOpenFile(io, fptr);
- setmode(fptr->fd, O_BINARY);
- }
/* this is undocumented feature of zlib */
err = inflateInit2(&gz->, -MAX_WBITS);