* win32/win32.c (rb_dir_getwd_ospath): Windows implementation
moved from dir.c. get rid of freeing malloced memory by xfree.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (skipspace, w32_cmdvector): get rid of iswspace(),
which is locale dependent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (winnt_stat): the return value of `get_final_path` is the
expected buffer length, not the actuall filled length.
* win32/win32.c (winnt_stat): `finalname` may be accessed in the outer block of
its definition via `path`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_home_dir): move from win32/file.c to try
special folders.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (StartSockets): rb_fatal does not need a newline
at the end.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (getifaddrs, rb_w32_getppid): initialize the API
pointers with an impossible value not to try everytime on old
platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_inet_ntop, rb_w32_inet_): make the
API pointers static not to get the address everytime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (get_final_path): initialize this pointer without
further comparisons.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the position of pioinfo of VC14, and also support debug library of it.
patched by davispuh AT gmail.com
[ruby-core:76644] [Bug #12644]
this fixes also [Bug #12631]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (GetSystemWindowsDirectoryW): use
GetWindowsDirectoryW for VC6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (get_special_folder): fix calling convention of
SHGetPathFromIDListEx, which should be WINAPI. pointed out by
@arton at http://twitter.com/arton/status/744884064277016576
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c: unify MAX_PATH, _MAX_PATH, and MAXPATHLEN to
PATH_MAX, except for MAX_PATH in get_special_folder for an API
limit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (get_special_folder): fail before getting
ITEMIDLIST if the buffer is less than 260 word which
SHGetPathFromIDListW requires.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (get_special_folder): use SHGetPathFromIDListEx if
available instead of old SHGetPathFromIDListW, to check the
buffer size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (RUBY_CRITICAL): removed the argument but make
just a block which does nothing, so that debuggers can step into
the block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Search _pioinfo which is not exported after MSVC14.
[Bug #12014] [GH-884]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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/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/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/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 (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
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/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
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 (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/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