summaryrefslogtreecommitdiff
path: root/win32/win32.c
AgeCommit message (Collapse)Author
2018-02-01win32.c: EPIPE for ERROR_NO_DATAnobu
* win32/win32.c (rb_w32_write): writing to closed pipe fails with ERROR_NO_DATA but msvcrt maps it to EINVAL. map it to EPIPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15Fix a typo.hsbt
* win32/win32.c: wrok -> work git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09internal.h: remove dependecy on ruby/io.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12set ino at `File.lstat` on Windowsusa
* win32/win32.c (winnt_stat): support symbolic link and others. * win32/win32.c (w32_stati128, wstati128, name_for_stat, rb_w32_{,ul}stati128, wutimensat): follow above change. [Feature #14169] From: Takehiro Kubo kubo@jiubao.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12remove unused variableusa
thanks kubo-san. c.f. [ruby-dev:50345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11fixed typousa
* win32/win32.c (get_ino): forgotten to specify the member. thanks kubo-san. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-10support 128bit ino on Windows (if available)usa
* win32/win32.c, include/ruby/win32.h (stati128, rb_{,u,l,ul}stati128): rename from stati64ns, change the type of st_ino to 64bit and added st_inohigh. * dir.c, file.c (stat, lstat): follow above changes. * file.c (rb_stat_ino): support 128bit ino. * win32/win32.c (rb_{,u,l,ul}stati128): ditto. [Feature #13731] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08win32.c: check error codenobu
* win32/win32.c (w32_io_info): check GetFileInformationByHandleEx error code to fallback to GetFileInformationByHandle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-07win32/win32.c: removed a stale commentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-07win32.c: fallback to old APInobu
* win32/win32.c (w32_io_info, rb_w32_file_identical_p): fallback to GetFileInformationByHandle if GetFileInformationByHandleEx failed. it seems not working on network drives. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04win32.c: fix error on mingwnobu
* win32/win32.c (FILE_ID_128): defined on mingw already. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04support nanosec file timestamp on newer Windowsusa
Support nanosec file timestamp on Windows 8 or later. Original patches are written by kubo (Kubo Takehiro). Windows 7 and earlier also supports nanosec file timestamp, but it's too accurate than system time. so, this feature is disabled on such versions. [Feature #13726] this change also includes [Misc #13702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04try to pass compiling with VC12usa
* win32/win32.c (FILE_ID_128): it's not defined in SDK with VC10, but seems to be defined in SDK with VC12. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-04support `File.identical?` on ReFSusa
* file.c (rb_file_idenitical_p): move Windows dependent code to win32/win32.c. * win32/win32.c (rb_w32_file_identical_p): support ReFS. see [Feature #13731] [ruby-dev:50166] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-20win32.c: vm_exit_handlernobu
* win32/win32.c (vm_exit_handler): separate exit handler for resources which must be released at exit of Ruby VM. * win32/win32.c (socklist_insert, constat_handle): install the VM exit handler. * gc.c (ENABLE_VM_OBJSPACE): no longer needs process global object space on Windows too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25win32.c: unknown reparse tagsnobu
* win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse tags. [ruby-core:83539] [Bug #14047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Use GetSystemTimePreciseAsFileTime on recent Windowsusa
* win32/win32.c (gettiemeofday, wutime): use GetSystemTimePreciseAsFileTime instead of GetSystemTimeAsFileTime if it is available. This patch is based on Takehiro Kubo <kubo@jiubao.org> 's one (change only the name of wrapper function). Thanks! and sorry to late [ruby-dev:50167] [Feature #13732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-28win32.c: fix function pointernobu
* 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
2017-08-26win32.c: fix return valuenobu
* 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
2017-08-26thread_win32.c: set thread namenobu
* 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
2017-07-03win32.c: restrict cursor movenobu
* 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
2017-07-03win32.c: clear relative to screennobu
* 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
2017-07-03win32.c: cursor relative to screennobu
* 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
2017-06-12win32.c: rb_dir_getwd_ospathnobu
* 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
2017-06-05win32.c: no localenobu
* 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
2017-05-16rb_w32_ugetcwd: UTF-8 version getcwdnobu
* 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
2017-02-28disable critical-error-handlernobu
* 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
2017-02-16win32.c: memcpy instead of strlcpynobu
* 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
2016-12-21* win32/win32.c (winnt_stat): use `numberof` macro instead of constant.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21Fixed potentially buffer overrun.usa
* 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
2016-12-07win32.c: suppress warningnobu
* 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
2016-11-26win32.c: special folders as home dirnobu
* 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
2016-09-30* win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() setsusa
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
2016-09-11* win32/win32.c (rb_w32_write_console): should set writen length as theusa
return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-25win32/file.h: rb_w32_filecpnobu
* 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
2016-08-20win32.c: no newline for rb_fatalnobu
* 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
2016-08-05win32.c: initialize with an impossible valuenobu
* 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
2016-08-05win32.c: static API pointersnobu
* 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
2016-08-05win32.c: call get_final_path pointernobu
* 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
2016-08-01* win32/win32.c (set_pioinfo_extra): use more reliable way to searchusa
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
2016-07-22Fix Issues reported by PVS-Studio static analyzernobu
* 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
2016-06-29VC6 errornobu
* 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
2016-06-20Fix calling conventionnobu
* 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
2016-06-04win32.c: use PATH_MAXnobu
* 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
2016-06-03win32.c: fail before getting ITEMIDLISTnobu
* 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
2016-06-03* win32/win32.c (get_special_folder): typo.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02win32.c: use SHGetPathFromIDListExnobu
* 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
2016-05-29win32.c: RUBY_CRITICALnobu
* 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
2016-05-02* win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements newusa
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
2016-05-01* win32/win32.c: drop Win2K support.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e