aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* win32.c: fix function pointernobu2017-08-281-1/+1
| | | | | | | | * win32/win32.c (rb_w32_set_thread_description): fix the condition if the API function pointer is found. [ruby-core:82494] [Bug #13845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix return valuenobu2017-08-261-2/+1
| | | | | | | * win32/win32.c (rb_w32_set_thread_description_str): return the result when name is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_win32.c: set thread namenobu2017-08-261-0/+42
| | | | | | | | | | * thread_win32.c (native_set_another_thread_name): set thread name by SetThreadDescription. * win32/win32.c (rb_w32_set_thread_description): dynamically try SetThreadDescription. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: restrict cursor movenobu2017-07-031-10/+16
| | | | | | | * win32/win32.c (constat_apply): restrict cursor move in visible screen only. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: clear relative to screennobu2017-07-031-12/+36
| | | | | | | * win32/win32.c (constat_apply): clear visible screen only, not the entire buffer. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: cursor relative to screennobu2017-07-031-2/+4
| | | | | | | * win32/win32.c (constat_apply): move relative to visible screen, not the entire buffer. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: rb_dir_getwd_ospathnobu2017-06-121-4/+29
| | | | | | | * 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.c: no localenobu2017-06-051-2/+2
| | | | | | | * 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
* rb_w32_ugetcwd: UTF-8 version getcwdnobu2017-05-161-17/+35
| | | | | | | | | * dir.c (rb_dir_getwd): convert from UTF-8. * win32/win32.c (w32_getcwd): codepage aware getcwd using GetCurrentDirectoryW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* disable critical-error-handlernobu2017-02-281-2/+1
| | | | | | | | * win32/win32.c (rb_w32_sysinit): disable critical-error-handler message box even on mswin, regardless of runtime DLL version. [ruby-dev:49988] [Bug #13254] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: memcpy instead of strlcpynobu2017-02-161-2/+3
| | | | | | | | | * win32/win32.c (cmdglob): memcpy the exact size instead of strlcpy with +1. * win32/win32.c (w32_cmdvector): ditto, with NUL-terminating. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (winnt_stat): use `numberof` macro instead of constant.usa2016-12-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed potentially buffer overrun.usa2016-12-211-2/+2
| | | | | | | | | | | * 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.c: suppress warningnobu2016-12-071-1/+1
| | | | | | | * win32/win32.c (rb_w32_home_dir): suppress sequence-point warning, REALLOC_N re-assigns the variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: special folders as home dirnobu2016-11-261-0/+64
| | | | | | | * 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 (poll_child_status): rb_w32_wait_events_blocking() setsusa2016-09-301-1/+1
| | | | | | | errno internally, then should not set it here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): should set writen length as theusa2016-09-111-2/+1
| | | | | | | | return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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