summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2007-05-22merge -r 12143:12147shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@12314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-13* io.c (rb_f_syscall): Fix buffer overflow with syscallshyouhei
arguments. [ruby-bugs:PR#8541] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@11716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-31* removed svn:keywords for compatibility.shugo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@11599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-31* ruby.h: use ifdef (or defined) for macro constants that may ormatz
may not be defined to shut up gcc's -Wundef warnings. [ruby-core:08447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-28* io.c (io_close): always calls "close" method of the receiver.matz
[ruby-core:6911] [ruby-core:8112] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-26* io.c (pipe_open): avoid closing uninitialized file descriptors.matz
a patch from <tommy at tmtm.org> [ruby-dev:28600] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-22avoid useless fcntl in rb_io_set_nonblock.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-22* rubyio.h (rb_io_set_nonblock): declared.akr
* io.c (rb_io_set_nonblock): new function. (io_getpartial): nonblocking read support. (io_read_nonblock): new method: IO#read_nonblock. (io_write_nonblock): new method: IO#write_nonblock. * ext/socket/socket.c (sock_connect_nonblock): new method: Socket#connect_nonblock. (sock_accept_nonblock): new method: Socket#accept_nonblock. (sock_recvfrom_nonblock): new method: Socket#recvfrom_nonblock. [ruby-core:7917] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-13update readpartial doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-09note EAGAIN on readpartial document.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-28doc update. [ruby-talk:186294]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-14* io.c (argf_forward): should not use frame->argv.matz
[ruby-core:07358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-13* io.c (READ_DATA_PENDING, READ_DATA_PENDING_COUNT): definedakr
for DragonFly BSD 1.4.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-13Tue Jan 11 15:00:00 2006 Ville Mattila <mulperi@iki.fi>akr
* io.c (READ_PENDING*): Support solaris 64-bit enviroments. Solaris defines a opaque FILE struct when compiling 64 bit binaries. This means that we dont have access to _ptr etc. members anymore. The solution by Steven Lumos is to define FILE64 that has needed members available. I've modified the origanal patch a bit so that it compiles both with gcc and now free sun studio 11 compiler and both amd64 and sparc. NOTE! We have to 64 bit solaris FILE structure time to time otherwise we'll get breakage. [ruby-core:7106] Fri Jan 6 10:16:20 2006 Steven Lumos <steven@lumos.us> * io.c (READ_DATA_PENDING): defined for 64bit Solaris on SPARC. [ruby-core:7057] (READ_DATA_PENDING_COUNT): ditto. (READ_DATA_PENDING_PTR): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-19* io.c (rb_f_backquote): fix a GC problem onakr
IA64 with gcc 4.0.3 20051216 (prerelease) -O3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12precedes registering global VALUE variables before initializing it.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12* ext/digest/digest.c (rb_digest_base_s_digest): add volatile tomatz
protect temporary context object. [ruby-dev:27979] * ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should be called before actual variable initialization. [ruby-dev:27986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-24* configure.in, io.c: use sys/syscall.h if syscall.h is not available.nobu
[ruby-core:06247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-13* io.c, pack.c, ext/syck/rubyext.c, ext/syck/syck.h, missing/isinf.c:nobu
get rid of warnings. fixed: [ruby-core:06247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-27* io.c (read_buffered_data): check if reached EOF. fixed: [ruby-dev:27334]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-27* io.c: fixed rdoc. [ruby-Bugs:2523]ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-20* io.c: PIPE_BUF is not defined on BeOS. use _POSIX_PIPE_BUF instead.ocean
[ruby-dev:27185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19* io.c (io_close): call rb_io_close() directly if io is a T_FILEmatz
object. [ruby-dev:27156] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18* file.c (rb_thread_flock): wrap the flock system call byakr
TRAP_BEG/TRAP_END to enable signals. [ruby-dev:27122] * ext/socket/socket.c (bsock_send): wrap the sendto and send system call by TRAP_BEG/TRAP_END to enable signals when writing to a socket which is full. [ruby-dev:27132] * io.c (rb_io_syswrite): wrap the write system call by TRAP_BEG/TRAP_END to enable signals when writing to a pipe which is full. [ruby-dev:27134] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18* io.c (io_fwrite): wrap the write system call by TRAP_BEG/TRAP_END toakr
enable signals when writing to a pipe which is full. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-17* lib/cgi.rb (CGI::Cookie): should handle multiple values for amatz
cookie name. [ruby-talk:156140] * string.c (rb_str_substr): should propagate taintness even for empty strings. [ruby-dev:27121] * string.c (rb_str_aref): should infect result if range argument is tainted. [ruby-dev:27121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-05document a blocking behavior of IO#eof?.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-25* io.c: check HAVE_SYS_IOCTL_H before including the header.matz
[ruby-dev:26610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20* io.c (S_ISREG): need to define S_ISREG before it is used first.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20don't use S_ISDIR.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20* io.c (wsplit_p): patch for the environment whereocean
fcntl(F_GETFL, O_NONBLOCK) is not supported. in that case, set FMODE_WSPLIT without fcntl check. [ruby-dev:26566] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20* io.c (rb_io_ctl): update FMODE_WSPLIT_INITIALIZED and FMODE_WSPLITakr
by F_SETFL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19* io.c (rb_io_inspect): replace sprintf() with "%s" format allmatz
over the place by snprintf() to avoid integer overflow. * sample/svr.rb: service can be stopped by ill-behaved client; use tsvr.rb instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-18* rubyio.h (FMODE_WSPLIT, FMODE_WSPLIT_INITIALIZED): new constant.akr
* io.c (wsplit_p): new function. (io_fflush): split writing data by PIPE_BUF if wsplit_p is true in multi-threaded mode. (io_fwrite): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-12* io.c (rb_io_eof, remain_size, read_all, io_read, appendline)akr
(swallow, rb_io_each_byte, rb_io_getc): revert previous change. * io.c (rb_io_eof, io_fread, appendline, swallow, rb_io_each_byte) (rb_io_getc, rb_getc): call clearerr before getc to avoid stdio incompatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-12* io.c (rb_io_eof, remain_size, read_all, io_read, appendline)akr
(swallow, rb_io_each_byte, rb_io_getc): don't rely EOF flag. [ruby-talk:141527] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-28* exception error messages updated. [ruby-core:04497]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-25fix some documents.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-24fix IO#read docment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-12* io.c (io_fread): don't warn nonblocking behavior by default.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-08* io.c (io_fread): warn nonblocking behavior.akr
(io_readpartial): new method IO#readpartial. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-25* stable version 1.8.2 released.matz
* lib/fileutils.rb (mkdir, mkdir_p): should ensure directory permission. (backportted from HEAD, 1.47) * lib/fileutils.rb (traverse, remove_dir): untaint trasted objects. (backportted from HEAD, 1.46) * io.c: cancel io_reopen() change on Dec. 24th. * dln.c: use <dlfcn.h> for NetBSD. [ruby-dev:25313] * io.c (rb_f_select): [ruby-dev:25312] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* io.c (io_reopen, rb_io_reopen): prohibit to change access mode fornobu
special IO ports. [ruby-dev:25225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* io.c (io_reopen): restore exact mode. fixed: [ruby-core:04003]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* io.c (io_reopen): readable flag was left unset for read-only IO.nobu
fixed: [ruby-core:04003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-22* io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.nobu
fixed: [ruby-dev:25273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21* io.c (io_reopen): keep duplex pipe in correct mode for exceptionnobu
safeness. fixed: [ruby-dev:25152] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20* io.c (io_fwrite): workaround for MSVCRT's bug.usa
fixed: [ruby-core:03982] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20* io.c (rb_io_eof): check if closed before clearerr().nobu
fixed: [ruby-dev:25251] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-10* io.c (io_reopen): [ruby-dev:25150]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e