diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 09:58:41 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 09:58:41 +0000 |
commit | b2acbb2c67e8d9dc5eaf4823f5e547c57832c443 (patch) | |
tree | 98db89de12857609052bbb8282450a85bbea2f62 /io.c | |
parent | 9a421e5b7ee330db3eb93affad9ba910dddc8f11 (diff) | |
download | ruby-b2acbb2c67e8d9dc5eaf4823f5e547c57832c443.tar.gz |
* {bcc,win}32/Makefile.sub (config.h): define ssize_t.
* io.c (copy_stream_body): some platform don't have O_NOCTTY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -6587,7 +6587,11 @@ copy_stream_body(VALUE arg) src_fptr = 0; FilePathValue(stp->src); src_path = StringValueCStr(stp->src); +#ifdef O_NOCTTY src_fd = rb_sysopen_internal(src_path, O_RDONLY|O_NOCTTY, 0); +#else + src_fd = rb_sysopen_internal(src_path, O_RDONLY, 0); +#endif if (src_fd == -1) { rb_sys_fail(src_path); } stp->close_src = 1; } @@ -6603,7 +6607,11 @@ copy_stream_body(VALUE arg) dst_fptr = 0; FilePathValue(stp->dst); dst_path = StringValueCStr(stp->dst); +#ifdef O_NOCTTY dst_fd = rb_sysopen_internal(dst_path, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY, 0600); +#else + dst_fd = rb_sysopen_internal(dst_path, O_WRONLY|O_CREAT|O_TRUNC, 0600); +#endif if (dst_fd == -1) { rb_sys_fail(dst_path); } stp->close_dst = 1; } |