summaryrefslogtreecommitdiff
path: root/file.c
Commit message (Collapse)AuthorAgeFilesLines
* merge revision(s) 15477:shyouhei2008-06-151-1/+1
| | | | | | | | * configure.in (ftruncate): check if available. * file.c (rb_file_truncate): check if ftruncate instead of truncate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (isdirsep): backslash is valid path separator on cygwin too.nobu2008-05-171-7/+6
| | | | | | | backported from 1.8 HEAD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_expand_path): fix for short file name on Cygwin.nobu2008-05-171-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (OpenFile): prevent conflict on Windows.nobu2008-05-171-2/+4
| | | | | | | * file.c (USE_NTFS): fixed merge miss. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_expand_path): rb_str_set_len is not backported.nobu2008-05-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_expand_path): support for alternative data streamnobu2008-05-171-31/+185
| | | | | | | | | | | and ignored trailing garbages of NTFS. * file.c (rb_file_s_basename): ditto. * file.c (rb_file_s_extname): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (group_member): check if presents.shyouhei2007-09-071-0/+2
| | | | | | | | * configure.in (XCFLAGS): add _GNU_SOURCE on linux. * file.c (group_member): use system routine if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_rename): deleted code to get rid of a bug ofshyouhei2007-08-221-11/+7
| | | | | | | | | | | | | | | | | | | | | old Cygwin. * file.c (rb_file_truncate): added prototype of GetLastError() on cygwin. [ruby-dev:31239] * intern.h (is_ruby_native_thread): prototype. * missing/strftime.c (strftime): fix printf format and actual arguments. * ext/Win32API/Win32API.c (Win32API_initialize): ditto. * ext/tk/tcltklib.c (ip_finalize): ditto. * ext/dl/ptr.c (rb_dlptr_inspect): ditto. [ruby-dev:31268] * ext/dl/sym.c (rb_dlsym_inspect): ditto. * ext/socket/getnameinfo.c: include stdio.h always. * ext/win32ole/win32ole.c (ole_hresult2msg, folevariable_name, folevariable_ole_type, folevariable_ole_type_detail, folevariable_value, folemethod_visible): missing return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge -c 12127shyouhei2007-05-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_utime): allow nil to set the current time.knu2007-03-041-9/+15
| | | | | | | | * lib/fileutils.rb (touch): ditto, and added :mtime and :nocreate options. fixed: [ruby-talk:219037] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@11987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_find_file): should not call fpath_check() with NULL.usa2007-01-091-1/+3
| | | | | | | fixed: [ruby-core:09867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (test_grpowned, rb_stat_grpowned): should honormatz2006-11-221-4/+4
| | | | | | | supplementary group IDs. [ruby-core:09546] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_path_end): skip root directory. fixed: [ruby-core:08913]nobu2006-09-251-4/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (path_check_0, fpath_check): disable path check on cygwin.nobu2006-09-071-3/+11
| | | | | | | [ruby-talk:213074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (path_check_0): check if sticky bit is set on parentnobu2006-09-041-8/+6
| | | | | | | directories for executable path. fixed: [ruby-dev:29415] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix documentation submitted by Rick Ohnemus. ruby-Bugs-5529. [ruby-core:08725]drbrain2006-08-271-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_rename): use errno if set properly.nobu2006-08-191-1/+7
| | | | | | | fixed: [ruby-dev:29293] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_stat_[rRwWxX]): check for super user.nobu2006-08-171-1/+27
| | | | | | | fixed: [ruby-core:08616] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h: export classes/modules to implement sandbox.matz2006-07-201-2/+2
| | | | | | | [ruby-core:08283] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (cygwin_flock): save old errno.eban2006-02-061-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_thread_flock): ERROR_NOT_LOCKED is not an error on Cygwin.eban2006-02-061-3/+17
| | | | | | | In such situation, flock() should return 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, dln.c, file.c, intern.h, missing.h (eaccess): usenobu2006-01-251-0/+2
| | | | | | | system routine if provided. fixed: [ruby-core:07195] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_chmod): avoid warning where sizeof(int) !=ocean2006-01-131-2/+2
| | | | | | | sizeof(void*). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (eaccess): workaround for VC++8 runtime.usa2005-12-291-0/+3
| | | | | | | * win32/win32.c (ioinfo): VC++8 support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* (rb_f_test): fix document. [ruby-dev:28087]akr2005-12-211-1/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (w32_io_info): should return handle because FileIndex isocean2005-12-211-14/+16
| | | | | | | valid only while file is open. [ruby-dev:28088] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (w32_io_info): CreateFile failed on Win9x if file was alreadyocean2005-11-231-1/+2
| | | | | | | | opened. (FILE_SHARE_READ was needed, but actually I don't understand the flags of CreateFile well...) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (w32_io_info): should not call GetFileInformationByHandleocean2005-11-231-16/+19
| | | | | | | | | | | for pipe. * file.c (w32_io_info): checks return value from rb_w32_get_osfhandle. * file.c (w32_io_info): now can identify directory on WinNT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * intern.h, file.c: failed to compile on windows.ocean2005-11-231-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (test_identical): test if two files are identical.nobu2005-11-221-9/+94
| | | | | | | | | | * file.c (rb_f_test): support DOSISH systems where st_ino is not reliable. fixed: [ruby-core:06672] * win32.h, win32.c (rb_w32_osid): check the running platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_basename): skip slashes just after UNC top slashes.usa2005-11-221-1/+3
| | | | | | | | * test/ruby/test_path.rb (test_dirname, test_basename): follow new spec. and add new tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin butnobu2005-11-211-3/+3
| | | | | | | DOSISH is not. fixed: [ruby-dev:27797] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without pathnobu2005-11-211-3/+26
| | | | | | | should not be splitted. fixed: [ruby-dev:27776] [ruby-dev:27786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_dirname): should use skipprefix for UNC path.usa2005-11-181-1/+1
| | | | | | | pointed out by nobu ([ruby-dev:27744]). fixed: [ruby-core:5076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_s_dirname): added checks for some patterns with driveusa2005-11-181-2/+9
| | | | | | | | | | letter. fixed: [ruby-dev:27738] * test/ruby/test_path.rb (test_dirname): added tests for above patterns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_readlink): ERANGE will occur only on GPFS.nobu2005-11-141-6/+4
| | | | | | | [ruby-dev:27699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: undef HAVE_LINK on BeOS. (link(2) always returnsocean2005-11-101-0/+32
| | | | | | | | | | | | | | EINVAL, and this causes error in test/fileutils.) * file.c: overwride chown(2) and fchown(2) on BeOS. (these functions should not change user/group id if -1 is passed as corresponding argument, and this causes error in test/fileutils too) [ruby-dev:27672] * file.c (rb_file_s_link): checks HAVE_LINK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_readlink): readlink(2) on AIX fails with ERANGE ifnobu2005-11-061-1/+7
| | | | | | | buffer size is less than required. fixed: [ruby-dev:27634] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_join): elements may contain null pointer strings.nobu2005-10-181-1/+1
| | | | | | | report and fixed by Lloyd Zusman (hippoman): [ruby-core:06326] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (chmod_internal, lchmod_internal): fixed type of 2nd argument.usa2005-10-171-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_f_test): typos in RDoc comments.eban2005-10-121-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_f_test): typo in RDoc comments.eban2005-10-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_mod_init_copy, rb_class_init_copy), file.c (rb_stat_init_copy),nobu2005-09-281-0/+1
| | | | | | | | | numeric.c (num_init_copy), object.c (rb_obj_init_copy, Init_Object), re.c (match_init_copy, rb_reg_init_copy), time.c (time_init_copy): undocumented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (apply2files): add prototype.nobu2005-09-281-43/+66
| | | | | | | * file.c (rb_stat_inspect): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (fpath_check): typo fixed.matz2005-09-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (path_check_0): disallow sticky world writable directorymatz2005-09-201-9/+21
| | | | | | | in PATH (and $LOAD_PATH). [ruby-dev:27226] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_chown): should accept nil. [ruby-dev:27171] (backport from ↵aamine2005-09-191-2/+2
| | | | | | trunk, rev 1.208) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_thread_flock): wrap the flock system call byakr2005-09-181-1/+5
| | | | | | | | | | | | | | | 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
* * file.c (file_inspect_join): commit miss, applied a patch for old trunk.nobu2005-09-161-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (file_inspect_join): missing argument declaration.nobu2005-09-161-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e