summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)Author
2011-12-09* file.c (file_path_convert): don't convert it when the path string isnaruse
ascii only. [ruby-core:41556] [Bug #5733] tests are contributed by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-01* file.c (file_expand_path): reset coderange after expanding path.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-29* process.c (ruby_setsid): use rb_cloexec_open.akr
(rb_daemon): ditto. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/io/console/console.c (console_dev): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-26* file.c (rb_file_join): honor input encodings than ASCII-8BIT.nobu
[ruby-core:40338] [Bug #5483] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-22* include/ruby/intern.h (rb_fd_set_cloexec): declared.akr
* io.c (rb_fd_set_cloexec): new function. (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag. (rb_sysopen_internal): ditto. (rb_pipe): ditto. (io_reopen): ditto. (io_cntl): ditto. * process.c (rb_f_exec): change the default :close_others option to true. (rb_f_system): ditto. (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set close-on-exec flag. (ruby_setsid): ditto. (rb_daemon): ditto. * thread_pthread.c (rb_thread_create_timer_thread): call rb_fd_set_cloexec to set close-on-exec flag. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. * ext/socket/init.c (rsock_socket): ditto. (rsock_s_accept_nonblock): ditto. (rsock_s_accept): ditto. * ext/socket/socket.c (rsock_sock_s_socketpair): ditto. * ext/socket/ancdata.c (discard_cmsg): ditto. (make_io_for_unix_rights): ditto. * ext/socket/unixsocket.c (unix_recv_io): ditto. * ext/io/console/console.c (console_dev): ditto. [ruby-core:38140] [Feature #5041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20* include/ruby/intern.h (rb_update_max_fd): declaration moved fromakr
internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* internal.h: declare internal functions here.akr
* node.h: declare NODE dependent internal functions here. * iseq.h: declare rb_iseq_t dependent internal functions here. * vm_core.h: declare rb_thread_t dependent internal functions here. * bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y, proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c, thread.c, time.c, transcode.c, variable.c, vm.c, tool/compile_prelude.rb: don't declare internal functions declared in above headers. include above headers if required. Note that rb_thread_mark() was declared as void rb_thread_mark(rb_thread_t *th) in cont.c but defined as void rb_thread_mark(void *ptr) in vm.c. Now it is declared as the later in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16* fix for build on solaris 10.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-15* file.c (rb_stat_rdev): use DEVT2NUM.naruse
* file.c (rb_stat_rdev_major): ditto. * file.c (rb_stat_rdev_minor): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26* file.c (rb_file_truncate): fix function.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-11* file.c (rb_group_member): kill 256K of stack usage.kosaki
the patch was written by Eric Wong. [ruby-core:35699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-20* file.c (rb_file_flock): use rb_thread_io_blocking_region for thenobu
time being. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 * file.c (w32_io_info): get rid of too huge alloca().kosaki
[Bug #4313] [ruby-core:34830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26* file.c (file_expand_path): get rid of warnings caused bynobu
-Wdeclaration-after-statement on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-13* file.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06fix typoskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-20NTFS's ctime is creation time! [ruby-core:33269]naruse
Note that UFS2, HFS+, ZFS, and ext4 also have birth time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11* file.c (file_expand_path): use cygwin_conv_path on cygwin 1.7 ornobu
later. * ruby.c (push_include_cygwin): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-15* file.c (NUM2DEVT, DEVT2NUM, PRI_DEVT_PREFIX): fallback tonobu
unsigned int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-15* configure.in (dev_t): use RUBY_REPLACE_TYPE.nobu
* file.c (rb_stat_inspect): use PRI_DEVT_PREFIX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-14Refix for r29493; it is unsigned.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13* file.c (DEVT2NUM): added. Size of dev_t is depend on thenaruse
environment even if POSIX defines dev_t as unsigned integer. For example, OpenVMS, 64bit Solaris 9, and NetBSD 6 defines dev_t as 64bit unsigned integer. * file.c (rb_stat_dev): use DEVT2NUM. * file.c (rb_stat_dev_major): dev_t is not long. major(3)'s return value is int. * file.c (rb_stat_dev_minor): dev_t is not long. minor(3)'s return value is int. * configure.in: check size of dev_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-04* file.c (rb_file_s_readlink): symlink target should be innobu
filesystem encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29* file.c (rb_get_path_check): clarify error message fornobu
ASCII-incompatible path name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-27* file.c (null_device): move from io.c.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06* file.c (realpath_rec): rb_str_modify depends on the length, sonobu
resize instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04* file.c (realpath_rec): call rb_str_modify before rb_str_set_len.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02* file.c (file_expand_path): wrong condition. [ruby-core:31591]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 * file.c (file_expand_path): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29* file.c (file_expand_path): home directory must be absolute.nobu
[ruby-core:31537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29* file.c (file_expand_path): should check if could find user.nobu
[ruby-core:31538] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28* file.c (rb_file_s_basename): pass baselen to rmext.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27* class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:naruse
clean unused-value warnings. * cont.c, process.c, vm_exec.h: clean cast warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu
add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07* file.c (ruby_find_basename): set correct baselen.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07* file.c (ruby_find_basename): should initialize f.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-02* io.c (argf_inplace_mode_set): prohibits an assignment of a taintedusa
value. * file.c (ruby_find_basename, ruby_find_extname): split from rb_file_s_basename() and rb_file_s_extname(). * util.c (ruby_add_suffix): support arbitrary length of the suffix to get rid of the potential buffer overflow. reported by tarui. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29* file.c (rb_realpath_internal, realpath_rec): skip UNC share rootusa
on DOSISH platforms. http://pc12.2ch.net/test/read.cgi/tech/1272248179/600 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-17* file.c (rb_str_encode_ospath): when the encoding of the parameterusa
is ASCII-8BIT, should recognize as filesystem encoding, and convert to UTF-8 on Windows. * file.c (realpath_rec): should convert to ospath encoding before calling lstat(). * file.c (rb_realpath_internal): resolved string should take over the encoding of base string. * transcode.c (rb_str_encode): should return new string always. fixed #3444. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-04* file.c (rb_f_test): 'W' should test writable by real uid/git,nobu
not world writable. [ruby-core:30587] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31* file.c (file_expand_path): Refix r28102: this breaksnaruse
r28039. test for [ruby-dev:41429] is added. [ruby-core:30516] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-30* file.c (file_expand_path): check if expanded dname encoding isnobu
compatible with fname, not just copying. [ruby-core:30516] * test/ruby/test_beginendblock.rb (test_endblockwarn): needs encoding comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-30* file.c (rb_file_directory_p): update rdoc. a patch from Ilkkamame
Laukkanen. [ruby-core:30016] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29* removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27* file.c (rb_home_dir): set filesystem encoding.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27* file.c (file_expand_path): set encoding as the same of fnamenaruse
when _result_ is not filesystem encoding. [ruby-dev:41429] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27* file.c (file_expand_path): use rb_enc_associate_index andnaruse
rb_filesystem_encindex. Strings related FileSystem should have filesystem_encoding. * file.c (SET_EXTERNAL_ENCODING): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-26* file.c (file_expand_path): revert a part of r22392. it's commit miss.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* enum.c: Documentation: small fixesmarcandre
* file.c: ditto * io.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17* hash.c: Documentation: change => in call-seq to ->.marcandre
* enum.c: Documentation: whitespace fix for r27865 * error.c: ditto * file.c: ditto * io.c: ditto * load.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e