summaryrefslogtreecommitdiff
path: root/win32/win32.c
AgeCommit message (Collapse)Author
2018-10-13win32/win32.c: fix typo in comment [ci skip]k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13win32/win32.c: I meant FindFreeChildSlot [ci skip]k0kubun
which was formerly used in CreateChild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13win32/win32.c: don't call FindChildSlot in MJITk0kubun
worker. It's very likely to be thread-unsafe and so it's better to avoid using in MJIT worker to prevent surprises by race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12win32/win32.c: drop always-NULL psa parameterk0kubun
I'm simplifying the interface of ChildRecord as I'm going to complicate it a little next. I didn't drop hInput since leaving it would be more natural as its interface. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12mjit_worker.c: suppress child process's output properlyk0kubun
Prior to this commit, some of parent process's output was unintentionally suppressed. We couldn't suppress only child process's output with spawnvp. Instead of that, this commit uses CreateProcess directly to redirect stdout and stderr only for child process. As it's dealing with HANDLE returned from CreateProcess, now waitpid macro needs to CloseHandle it. win32/win32.c: Introduce rb_w32_start_process which is designed for MJIT worker. Other similar functions can't be used since they are using ALLOCV that may trigger GC, which should be avoided on MJIT worker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-04Support ubasecrt.dll 10.0.17763.1 included in Windows 10 October 2018 Updateusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21Suppress more -Wparentheses warningsnobu
[Fix GH-1958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28win32.c: limit write size on consolenobu
* win32/win32.c (constat_parse): split long buffer and limit write size on a console, as well as rb_w32_write. [ruby-dev:50597] [Bug #14942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-12win32.c: precise timenobu
* win32/win32.c (filetime_split, clock_gettime): keep the precision as possible as the FILETIME format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-18win32.c: fix CSI sequences to deletenobu
* win32/win32.c (constat_apply): CSI 'J' and 'K' are defaulted to 1, not 0. [ruby-core:86560] [Bug #14691] * win32/win32.c (constat_apply): "delete before cursor" sequences include the cursor position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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