summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-08 05:29:37 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-08 05:29:37 +0000
commitaf328b152b68bb21549e52df230b17a8672795c3 (patch)
tree8a63998435ddc0a3367124967bf063f01e7cfbb9 /ext
parent41e41d34d14ef3595a54148368b89b6c75d0fe4d (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dbm/dbm.c6
-rw-r--r--ext/gdbm/gdbm.c4
-rw-r--r--ext/sdbm/init.c4
-rw-r--r--ext/socket/socket.c1
4 files changed, 7 insertions, 8 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index b156479..830a616 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -76,14 +76,14 @@ fdbm_s_open(argc, argv, klass)
dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
}
if (!dbm) {
- mode = 0666;
- dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, mode);
+ dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, 0);
}
if (!dbm) {
- dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, mode);
+ dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
}
if (!dbm) {
+ printf("mode: %o\n", mode);
if (mode == -1) return Qnil;
rb_sys_fail(RSTRING(file)->ptr);
}
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index da57a79..d84c7be 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -72,10 +72,10 @@ fgdbm_s_open(argc, argv, klass)
O_RDWR|O_CREAT, mode, MY_FATAL_FUNC);
if (!dbm)
dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
- O_RDWR, mode, MY_FATAL_FUNC);
+ O_RDWR, 0, MY_FATAL_FUNC);
if (!dbm)
dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
- O_RDONLY, mode, MY_FATAL_FUNC);
+ O_RDONLY, 0, MY_FATAL_FUNC);
if (!dbm) {
if (mode == -1) return Qnil;
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index f6dd73b..87136e9 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -70,9 +70,9 @@ fsdbm_s_open(argc, argv, klass)
if (mode >= 0)
dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
if (!dbm)
- dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR, mode);
+ dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR, 0);
if (!dbm)
- dbm = sdbm_open(RSTRING(file)->ptr, O_RDONLY, mode);
+ dbm = sdbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
if (!dbm) {
if (mode == -1) return Qnil;
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index c9df07c..b815c3f 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -768,7 +768,6 @@ ruby_connect(fd, sockaddr, len, socks)
}
}
#ifdef HAVE_FCNTL
- mode &= ~NONBLOCKING;
fcntl(fd, F_SETFL, mode);
#endif
return status;