summaryrefslogtreecommitdiff
path: root/win32/win32.c
AgeCommit message (Collapse)Author
2015-07-09* win32/win32.c (waitpid): fixed return value of previous commit. thanks, nobu!usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-09* win32/win32.c (waitpid): return immediately if interrupted.usa
reported by <takkanm AT gmail.com> [ruby-dev:49176] [Bug #11340] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-22win32.c: use numberofnobu
* win32/win32.c (open_dir_handle): use numberof() macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* file.c (rb_stat_ino): get inode from the interval of struct st.naruse
* win32/win32.c (stati64_set_inode): get nFilIndexHigh/Low, and set it to the interval of struct st as inode. * win32/win32.c (stati64_set_inode_handle): call stati64_set_inode. * win32/win32.c (rb_w32_fstati64): call stati64_set_inode_handle. * win32/win32.c (stati64_handle): call stati64_set_inode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-12* file.c (File::SHARE_DELETE): new flag to be able to delete opened fileusa
on Windows. * include/win32/win32.c (O_SHARE_DELETE): new pseudo file mode flag. * win32/win32.c (rb_w32_{w,}open): support above flag. [EXPERIMENTAL] * NEWS: mention about this feature. [Feature #11218] [ruby-dev:49022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-25* win32/win32.c (setup_overlapped): seek to the file end only whennaruse
writing (mode:a), not reading (mode:a+, read). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23win32.c: suppress a warningnobu
* win32/win32.c (rb_w32_write_console): fix the type to suppress a warning of difference in signedness. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22* win32/win32.c (rb_w32_write_console): should return the count ofusa
actually eaten characters, include escape sequences. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-22* win32/win32.c (constat_apply): fixed comment. [skip ci]usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-18intern.h: rb_f_notimplement for ext on Windowsnobu
* include/ruby/intern.h (rb_f_notimplement): should not respond to not-implemented methods. as the address inside a DLL and the imported address are different on Windows, use an exported variable to share the same address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16* win32/win32.c (rb_w32_accept): simplified.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24* win32/win32.c: restore a license comment accidentally removed at r50381.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24win32.c: fix for mingwnobu
* win32/win32.c (_pioinfo): necessary on mingw too. * win32/win32.c (init_stdhandle): remove stale function for Borland C. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-24* win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for oldusa
ruby (before 1.8), but not now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23* win32/win32.c: remove bcc related code.naruse
* include/ruby/win32.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23* win32/win32.c (rb_acrt_lowio_lock_fh): wrap _pioinfo(i)->lock.naruse
* win32/win32.c (rb_acrt_lowio_unlock_fh): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23* win32/win32.c (_filbuf): msvc14 doesn't have it, use _fgetc_nolock.naruse
* win32/win32.c (_flsbuf): msvc14 doesn't have it, use _fputc_nolock. * win32/win32.c (vcruntime_file): define vcruntime_file on msvc14 because it doesn't export FILE's internal structure. * win32/win32.c (FILE_COUNT): added to abstract FILE->_cnt. * win32/win32.c (FILE_READPTR): added to abstract FILE->_ptr. * win32/win32.c (FILE_FILENO): added to abstract FILE->_file. * win32/win32.c (init_stdhandle): use FILE_FILENO. * win32/win32.c (rb_w32_getc): use FILE_COUNT and FILE_READPTR. * win32/win32.c (rb_w32_putc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-23* win32/win32.c (dupfd): use _set_osfhnd.naruse
* win32/win32.c (rb_w32_wopen): use _set_osflags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20* win32/win32.c (rb_w32_wreadlink): follow the official format ofusa
REPARSE_DATA_BUFFER structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20* win32/win32.c (rb_w32_wreadlink): fixed a bug that a junktion missesusa
its drive letter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-08* win32/win32.c (rb_w32_wreadlink): should treat junctions like asusa
symlinks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30win32.c: symlink than directorynobu
* win32/win32.c (fileattr_to_unixmode, winnt_lstat): deal with symbolic link than directory, and set executable bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23win32.c: readlinknobu
* win32/win32.c (wreadlink, rb_w32_ureadlink): implement readlink(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23win32.c: fix DLL namenobu
* win32/win32.c (winnt_stat): fix DLL name to "kernel32". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23win32.c: w32_lstati64nobu
* win32/win32.c (winnt_stat): stat with following symbolic links. * win32/win32.c (winnt_lstat): rename old winnt_stat, which does not follow symbolic links. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22win32.c: path_drivenobu
* win32/win32.c (path_drive): extract from winnt_stat, return the drive number in the path, or the current drive. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22win32.c: stat_by_findnobu
* win32/win32.c (stat_by_find): extract from winnt_stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22win32.c: stati64_handlenobu
* win32/win32.c (stati64_handle): extract from rb_w32_fstati64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-22win32.c: name_for_statnobu
* win32/win32.c (name_for_stat): extract from rb_w32_stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-19win32.c: S_IFLNKnobu
* win32/win32.c (fileattr_to_unixmode): set symlink for reparse points. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-19win32.c: no S_IWGRP and S_IWOTHnobu
* win32/win32.c (fileattr_to_unixmode): do not set S_IWGRP and S_IWOTH reset in wstati64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-14dir.h: direct::d_typenobu
* dir.c (glob_helper): use d_type to reduce lstat system calls. * win32/dir.h (struct direct): add d_type instead of d_isdir and d_isrep. SYMLINKD is unreliable, since the target can be replaced after a link was created. * win32/win32.c (readdir_internal): set d_type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08dir.c: glob short namesnobu
* dir.c (glob_helper): match patterns against legacy short names too, not only ordinary names. [ruby-core:67954] [Bug #10819] * win32/dir.h (struct direct): add short name members. * win32/win32.c (opendir_internal, readdir_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24win32.c: reduce memory sizenobu
* win32/win32.c (szInternalCmds): reduce memory size, from 506 on 32bit and 702 on 64bit to 490 bytes, and remove relocations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20win32.c: volume serial numbersnobu
* win32/win32.c (different_device_p): compare by volume serial numbers, not by path names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-18win32.c: EXDEV for directorynobu
* win32/win32.c (wrename): return EXDEV if moving a directory to another drive, since MoveFileExW does not set proper error code. [ruby-core:68162] [Bug #10865] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24win32: suppress warningsnobu
* win32/file.c (home_dir, code_page_i): parenthesize to suppress warnings. * win32/win32.c (is_command_com, join_argv, w32_cmdvector, kill), (constat_attr_color_reverse, constat_attr): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03* win32/win32.c (w32_spawn): `v2` is used not only for `shell` but alsousa
`cmd`, so must not free before using `cmd`. [ruby-core:66648] [Bug #10563] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29win32.c: use UTF-8 for argvnobu
* ruby.c (ruby_set_argv): convert argv from UTF-8. * win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-29win32.c: convert by Win32 APInobu
* win32/win32.c (win32_direct_conv, rb_w32_readdir): convert UTF-8 and filesystem code page by using Win32 API directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26win32.c: for non-standard consolenobu
* win32/win32.c (constat_reset): do nothing on non-standard console emurators. [ruby-core:66471] [Bug #10546] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18* win32/win32.c (rb_w32_write): should set the error ofusa
GetOverlappedResult()'s, not WriteFile()'s (it's always ERROR_IO_PENDING, of course). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* rb_w32_fstat{,i64}: speed up. adjuting timestamps in this functionusa
is to get rid of the side effect of ENV["TZ"]. then, if ENV["TZ"] is not set, no need to adjust. this change makes File#stat about 60% faster. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10win32.c: user namenobu
* win32/win32.c (init_env): save USER environment variable in login name if it is set. [ruby-core:66163] [Bug #10493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10* win32/win32.c (rb_w32_read): retry with reduced length if cannot tousa
write any data but no error occurs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10* win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): newusa
function to support nonblock-mode of pipes. * win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA if there is no data, but also returns it if remote-end is closed. * win32/win32.c (rb_w32_write): if cannot to write any data, it may be blocking. * io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows. * ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when setting nonblock-mode. * test/ruby/test_io.rb: test nonblock pipes on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10win32.c: login name encodingnobu
* ext/etc/etc.c (etc_getlogin): set login name encoding properly. [ruby-core:66163] [Bug #10493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-23* win32/win32.c (cmdglob): use inline function.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21win32.c: manage reverse videonobu
* win32/win32.c (constat_attr): manage reverse video internally since Windows console window does not manage it. based on the patch by white leaf in [ruby-dev:48483]. [Bug #10158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09win32/file.c: share functions with win32.cnobu
* win32/file.c (rb_file_expand_path_internal, rb_file_load_ok): use functions defined in win32/win32.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e