aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* win32/file.h: rb_w32_filecpnobu2016-08-251-1/+0
| | | | | | * win32/file.h (rb_w32_filecp): add declaration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: no newline for rb_fatalnobu2016-08-201-2/+2
| | | | | | | * 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.c: initialize with an impossible valuenobu2016-08-051-6/+6
| | | | | | | | * 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.c: static API pointersnobu2016-08-051-4/+6
| | | | | | | * 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.c: call get_final_path pointernobu2016-08-051-10/+16
| | | | | | | * 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
* * win32/win32.c (set_pioinfo_extra): use more reliable way to searchusa2016-08-011-16/+48
| | | | | | | | | | 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
* Fix Issues reported by PVS-Studio static analyzernobu2016-07-221-1/+1
| | | | | | | | | | * vm.c (vm_set_main_stack): remove unnecessary check. toplevel binding must be initialized. [Bug #12611] (N1) * win32/win32.c (w32_symlink): fix return type. [Bug #12611] (N3) * string.c (rb_str_split_m): simplify the condition. [Bug #12611](N4) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* VC6 errornobu2016-06-291-0/+5
| | | | | | | * 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
* Fix calling conventionnobu2016-06-201-1/+1
| | | | | | | | * 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.c: use PATH_MAXnobu2016-06-041-18/+22
| | | | | | | | * 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.c: fail before getting ITEMIDLISTnobu2016-06-031-1/+2
| | | | | | | | * 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): typo.usa2016-06-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: use SHGetPathFromIDListExnobu2016-06-021-6/+20
| | | | | | | | * 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.c: RUBY_CRITICALnobu2016-05-291-99/+99
| | | | | | | | * 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
* * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements newusa2016-05-021-3/+23
| | | | | | | | | | truncate alternative which accepts UTF-8 path. * file.c (truncate): use above function. [Bug #12340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: drop Win2K support.usa2016-05-011-19/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * cont.c, hash.c, random.c, win32/win32.c: cleanup some Win9x/ME/NT4usa2016-05-011-140/+74
| | | | | | | | support leftovers. [fix GH-1328] patched by @cremno git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c: remove unnecessary declarationnobu2016-04-291-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: suppress warningsnobu2016-04-241-1/+1
| | | | | | * win32/win32.c (set_pioinfo_extra): remove "/*" within comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support MSVC14 and 15 [Bug #11118]naruse2016-04-231-1/+56
| | | | | | | 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.c: call w32_wopen directlynobu2016-04-071-3/+2
| | | | | | | * win32/win32.c (rb_w32_uopen): call w32_wopen directly instead of variadic rb_w32_wopen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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