summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2009-03-09merge revision(s) 21913:shyouhei
* io.c (io_getpartial): fflush after read for updating pos in FILE. not portable, I guess. [ruby-core:21561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08* io.c (rb_open_file, rb_io_s_sysopen): fmode should be unsigned int.knu
fixed [ruby-dev:34979] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-06Merge changes from ruby_1_8 to reduce warnings and potentially improveknu
security. * mkconfig.rb: hide build path from rbconfig.rb. * util.c (ruby_strtod, dtoa): initialize more variables for error handling. * io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique), (path2class, path2module): constified. * pack.c (pack_unpack), process.c (rb_syswait): suppress warnings. * suppress warnings on cygwin, mingw and mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21Merge from ruby_1_8.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15* rubyio.h (rb_io_t): renamed from OpenFile.nobu
* ruby.h (struct RHash), file.c, gc.c, io.c, ext/dl/dl.c, ext/io/wait/wait.c, ext/pty/pty.c, ext/readline/readline.c, ext/socket/socket.c: ditto. * win32/win32.h: removed workaround for OpenFile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* enum.c (enum_find, enum_reject): Return an enumerator if noknu
block is given. * io.c (rb_io_each_line, rb_io_each_byte, rb_io_s_foreach, argf_each_line, argf_each_byte): Ditto. * string.c (str_gsub): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28* io.c (rb_open_file): should check NUL in path.matz
<http://www.rubyist.net/~matz/20080125.html#c01>. * io.c (rb_io_s_popen): ditto. * io.c (rb_io_reopen): ditto. * io.c (next_argv): ditto. * io.c (rb_io_s_foreach): ditto. * io.c (rb_io_s_readlines): ditto. * io.c (rb_io_s_read): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-21* io.c (rb_io_mode_flags, rb_io_mode_modenum): Ignore encodingknu
options for forward compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* io.c (fptr_finalize): clear errno first. [ruby-talk:284492]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-25* io.c (rb_io_tell, rb_io_seek): check errno too. [ruby-dev:32093]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04* error.c (rb_notimplement), io.c (pipe_open): removed definitenobu
articles and UNIX manual section from messages. [ruby-dev:30690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04* io.c (pipe_open): refined the message of NotImplementedError.nobu
[ruby-dev:30685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04* io.c (pipe_open): raise NotImplementedError for command "-" onnobu
platforms where fork(2) is not available. [ruby-dev:30681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-24* node.h (struct rb_thread.locals): explicit as struct.nobu
[ruby-core:10585] * eval.c, node.h (enum rb_thread_status, struct rb_thread, rb_curr_thread, rb_main_thread): prefixed. [ruby-core:10586] * file.c (chompdirsep): made an unprefixed name static. * io.c (io_fread): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-13* io.c (rb_f_syscall): Fix buffer overflow with syscallknu
arguments. [ruby-bugs:PR#8541] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03* io.c (ruby_dup): start GC on ENOMEM as well.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03Revert r11453matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03* io.c (ruby_dup): start GC on ENOMEM as well.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-04* io.c (pipe_open): command name should not contain null bytes.matz
[ruby-dev:29421] * process.c (proc_spawn): ditto. * process.c (proc_spawn_n): ditto. * process.c (rb_f_system): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10850 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