aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * win32/win32.c (rb_w32_write_console): remove unused variable.usa2016-03-081-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): now no need to checkusa2016-03-081-6/+1
| | | | | | | ERROR_CALL_NOT_IMPLEMENTED because it is for old Win9X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): stop the VT100 emulation if theusa2016-03-081-11/+21
| | | | | | | console supports it natively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: reuse fullpath buffernobu2016-02-021-18/+13
| | | | | | | * win32/win32.c (open_dir_handle): reuse the fullpath buffer instead of allocating another buffer for copy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: w32_wopendirnobu2016-02-011-5/+5
| | | | | | | | * win32/win32.c (w32_wopendir): remove filename parameter, and check the drive letter in wpath instead. rename from opendir_internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: volume_prefix_lennobu2016-02-011-3/+3
| | | | | | | * win32/win32.c (rb_w32_read_reparse_point): name the prefix length to be dropped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: suffix should be alnumnobu2016-02-011-0/+1
| | | | | | | | * win32/win32.c (fileattr_to_unixmode): built-in executable suffixes are alpha-numeric only, no needs to scan whole path, especially path separators. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: move counting lengthnobu2016-02-011-1/+1
| | | | | | | * win32/win32.c (opendir_internal): defer counting the length just before the loop where it is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c: drop garbagenobu2016-01-291-0/+1
| | | | | | | | | * win32/file.c (rb_readlink): drop garbage after the substitute name, as rb_w32_read_reparse_point returns the expected buffer size but "\??\" prefix is dropped from the result. * win32/win32.c (w32_readlink): ditto, including NUL-terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (fileattr_to_unixmode, rb_w32_reparse_symlink_p): volumeusa2016-01-291-3/+22
| | | | | | | | | | | | | | mount point should be treated as directory, not symlink. [ruby-core:72483] [Bug #11874] * win32/win32.c (rb_w32_read_reparse_point): check the reparse point is a volume mount point or not. * win32/file.c (rb_readlink): follow above change (but this pass won't be used). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix argument typenobu2015-12-011-1/+1
| | | | | | * win32/win32.c (dupfd): promote argument type for old VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (finish_overlapped_socket): return value of thisusa2015-11-191-1/+3
| | | | | | | function should be only 0 or SOCKET_ERROR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input,usa2015-11-191-1/+6
| | | | | | | | because POSIX platforms just do so. fixes test errors revealed by r52647. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (fstat): declare for mingw.usa2015-11-171-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fallback to WCHAR-version in MSVCRTnobu2015-09-221-31/+17
| | | | | | | * win32/win32.c (rb_w32_open): should not fallback to ANSI-version in MSVCRT, fallback to WCHAR-version in rb_w32_wopen instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: no xmalloc at sys_initnobu2015-09-151-3/+4
| | | | | | | | * win32/win32.c (rb_w32_sysinit, rb_w32_readdir): compare by encoding index to get rid of encoding initialization before VM object space allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: encindex.hnobu2015-09-151-0/+1
| | | | | | * win32/win32.c: needs encindex.h for encoding indexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix dup2 return valuenobu2015-09-121-1/+2
| | | | | | | * win32/win32.c (rb_w32_dup2): should return the new fd on success, while msvcrt returns 0 wrongly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: more fcntlnobu2015-09-121-7/+40
| | | | | | | * win32/win32.c (fcntl): implement F_GETFD, F_SETFD, and F_DUPFD_CLOEXEC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read_reparse_point): return correct requiredusa2015-09-081-4/+5
| | | | | | | buffer size for IO_REPARSE_TAG_MOUNT_POINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: use plain strdupnobu2015-09-071-0/+1
| | | | | | | * win32/win32.c (insert): should use plain strdup() instead of ruby_strdup() at startup time, and plain free()ed in cmdglob(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: suppress a warningnobu2015-09-051-2/+5
| | | | | | | * win32/win32.c (get_attr_vsn): assume GetLastError() never return 0, to suppress a maybe-uninitialized warning in wrename(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32: use ALLOCVnobu2015-09-021-10/+6
| | | | | | | | | | * win32/file.c (rb_readlink): use ALLOCV to get rid potential memory leak by NoMemoryError in ALLOCV. * win32/win32.c (w32_readlink): allocate WCHAR path name and reparse buffer together. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: suppress warningsnobu2015-08-281-1/+1
| | | | | | | * win32/win32.c (fchmod): put braces to suppress missing-braces warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: suppress warningsnobu2015-08-281-2/+2
| | | | | | | * win32/win32.c (wrename): fix type of attributes to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fchmodnobu2015-08-271-0/+41
| | | | | | | * win32/win32.c (fchmod): implement by using SetFileInformationByHandle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: get attributes and VSN at oncenobu2015-08-271-23/+20
| | | | | | | * win32/win32.c (wrename): get attributes and VSN at once for each path names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: open_specialnobu2015-08-271-17/+18
| | | | | | | * win32/win32.c (open_special): extract to open existing file with backup semantics. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: use backslashesnobu2015-08-261-0/+1
| | | | | | | * win32/win32.c (w32_symlink): must use backslashes instead of slashes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: ELOOP at wrenamenobu2015-08-261-0/+12
| | | | | | | * win32/win32.c (wrename): fail with ELOOP if failed to resolve the old path name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix return value of reparse_symlinknobu2015-08-261-1/+1
| | | | | | | * win32/win32.c (reparse_symlink): return raw Windows error code since r51676. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: unlink symlinkdnobu2015-08-261-3/+12
| | | | | | | * win32/win32.c (wunlink): SYMLINKD has to be removed as a directory but not a file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix for old platformsnobu2015-08-261-1/+3
| | | | | | | * win32/win32.c (open_dir_handle): fix for old platforms where GetFinalPathNameByHandleW is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: find by final pathnobu2015-08-261-11/+28
| | | | | | * win32/win32.c (open_dir_handle): find by final path name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: ELOOP by _wopennobu2015-08-261-1/+10
| | | | | | | * win32/win32.c (rb_w32_wopen): map the exact error for ELOOP when EINVAL is returned by _wopen of vc runtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fake lchownnobu2015-08-261-0/+12
| | | | | | * win32/win32.c (lchown, rb_w32_ulchown): fake lchown. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: ELOOPnobu2015-08-261-0/+1
| | | | | | | * win32/win32.c (errmap): map ERROR_CANT_RESOLVE_FILENAME to ELOOP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix offsetnobu2015-08-251-1/+1
| | | | | | | * win32/win32.c (opendir_internal): fix offset not to overwrite a backslash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: rb_w32_reparsenobu2015-08-251-62/+57
| | | | | | | * win32/win32.c (rb_w32_reparse): read reparse point in a dynamic buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: symlinknobu2015-08-241-0/+63
| | | | | | * win32/win32.c (w32_symlink): implement symlink(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: licensesnobu2015-08-241-1/+3
| | | | | | | * win32/win32.c (rb_w32_wreadlink, rb_w32_wopen): add missing licenses. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: support known reparse points onlynobu2015-08-191-4/+22
| | | | | | | | * dir.c (replace_real_basename), win32/win32.c (opendir_internal): check reparse point tags and treat supported tags only as symbolic links. [ruby-core:70454] [Bug #11462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: support known reparse points onlynobu2015-08-191-37/+50
| | | | | | | | * win32/win32.c (winnt_lstat): check reparse point tags and treat supported tags only as symbolic links. [ruby-core:70454] [Bug #11462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: use ruby_strdupnobu2015-08-101-7/+4
| | | | | | | * win32/win32.c (getifaddrs): use ruby_strdup instead of combination ruby_xmalloc, lstrlen and lstrcpy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: symlink constants fallbacknobu2015-07-211-0/+11
| | | | | | | * win32/win32.c (rb_w32_wreadlink): define symlink constants for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (waitpid): fixed return value of previous commit. thanks, nobu!usa2015-07-091-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (waitpid): return immediately if interrupted.usa2015-07-091-1/+2
| | | | | | | reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: use numberofnobu2015-06-221-1/+1
| | | | | | * win32/win32.c (open_dir_handle): use numberof() macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_stat_ino): get inode from the interval of struct st.naruse2015-06-131-1/+48
| | | | | | | | | | | | | * win32/win32.c (stati64_set_inode): get nFilIndexHigh/Low, and set it to the interval of struct st as inode. * win32/win32.c (stati64_set_inode_handle): call stati64_set_inode. * win32/win32.c (rb_w32_fstati64): call stati64_set_inode_handle. * win32/win32.c (stati64_handle): call stati64_set_inode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (File::SHARE_DELETE): new flag to be able to delete opened fileusa2015-06-121-2/+5
| | | | | | | | | | | | | | on Windows. * include/win32/win32.c (O_SHARE_DELETE): new pseudo file mode flag. * win32/win32.c (rb_w32_{w,}open): support above flag. [EXPERIMENTAL] * NEWS: mention about this feature. [Feature #11218] [ruby-dev:49022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e