aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
...
* win32.c: use numberofnobu2015-06-221-1/+1
| | | | | | * 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
* * file.c (rb_stat_ino): get inode from the interval of struct st.naruse2015-06-131-1/+48
| | | | | | | | | | | | | * 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
* * file.c (File::SHARE_DELETE): new flag to be able to delete opened fileusa2015-06-121-2/+5
| | | | | | | | | | | | | | 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
* * win32/win32.c (setup_overlapped): seek to the file end only whennaruse2015-05-251-4/+8
| | | | | | 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
* win32.c: suppress a warningnobu2015-05-231-1/+1
| | | | | | | * 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
* * win32/win32.c (rb_w32_write_console): should return the count ofusa2015-05-221-1/+4
| | | | | | | actually eaten characters, include escape sequences. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (constat_apply): fixed comment. [skip ci]usa2015-05-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: rb_f_notimplement for ext on Windowsnobu2015-05-181-0/+2
| | | | | | | | | * 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
* * win32/win32.c (rb_w32_accept): simplified.usa2015-05-161-18/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: restore a license comment accidentally removed at r50381.usa2015-04-241-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix for mingwnobu2015-04-241-11/+3
| | | | | | | | | * 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
* * win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for oldusa2015-04-241-39/+0
| | | | | | | ruby (before 1.8), but not now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: remove bcc related code.naruse2015-04-231-193/+7
| | | | | | * include/ruby/win32.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_acrt_lowio_lock_fh): wrap _pioinfo(i)->lock.naruse2015-04-231-28/+30
| | | | | | * 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
* * win32/win32.c (_filbuf): msvc14 doesn't have it, use _fgetc_nolock.naruse2015-04-231-11/+37
| | | | | | | | | | | | | | | | | | | | | * 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
* * win32/win32.c (dupfd): use _set_osfhnd.naruse2015-04-231-2/+2
| | | | | | * 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
* * win32/win32.c (rb_w32_wreadlink): follow the official format ofusa2015-04-201-12/+23
| | | | | | | REPARSE_DATA_BUFFER structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_wreadlink): fixed a bug that a junktion missesusa2015-04-201-3/+12
| | | | | | | its drive letter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_wreadlink): should treat junctions like asusa2015-04-081-1/+2
| | | | | | | symlinks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: symlink than directorynobu2015-03-301-5/+9
| | | | | | | * 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
* win32.c: readlinknobu2015-03-231-0/+110
| | | | | | * 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
* win32.c: fix DLL namenobu2015-03-231-1/+1
| | | | | | * 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
* win32.c: w32_lstati64nobu2015-03-231-1/+100
| | | | | | | | * 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
* win32.c: path_drivenobu2015-03-221-2/+9
| | | | | | | * 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
* win32.c: stat_by_findnobu2015-03-221-24/+35
| | | | | | * 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
* win32.c: stati64_handlenobu2015-03-221-3/+16
| | | | | | * 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
* win32.c: name_for_statnobu2015-03-221-10/+22
| | | | | | * 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
* win32.c: S_IFLNKnobu2015-03-191-0/+3
| | | | | | | * 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
* win32.c: no S_IWGRP and S_IWOTHnobu2015-03-191-5/+2
| | | | | | | * 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
* dir.h: direct::d_typenobu2015-03-141-2/+7
| | | | | | | | | | * 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
* dir.c: glob short namesnobu2015-03-081-6/+26
| | | | | | | | | * 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
* win32.c: reduce memory sizenobu2015-02-241-4/+5
| | | | | | | * 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
* win32.c: volume serial numbersnobu2015-02-201-19/+19
| | | | | | | * 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
* win32.c: EXDEV for directorynobu2015-02-181-2/+33
| | | | | | | | * 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
* win32: suppress warningsnobu2014-12-241-19/+19
| | | | | | | | | | * 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
* * win32/win32.c (w32_spawn): `v2` is used not only for `shell` but alsousa2014-12-031-1/+1
| | | | | | | | `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
* win32.c: use UTF-8 for argvnobu2014-11-291-6/+7
| | | | | | | | | | * 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
* win32.c: convert by Win32 APInobu2014-11-291-6/+13
| | | | | | | * 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
* win32.c: for non-standard consolenobu2014-11-261-1/+1
| | | | | | | * 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
* * win32/win32.c (rb_w32_write): should set the error ofusa2014-11-181-1/+1
| | | | | | | | 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
* * rb_w32_fstat{,i64}: speed up. adjuting timestamps in this functionusa2014-11-131-1/+8
| | | | | | | | | 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
* win32.c: user namenobu2014-11-101-0/+3
| | | | | | | * 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
* * win32/win32.c (rb_w32_read): retry with reduced length if cannot tousa2014-11-101-0/+7
| | | | | | | write any data but no error occurs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): newusa2014-11-101-1/+43
| | | | | | | | | | | | | | | | | | | | 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
* win32.c: login name encodingnobu2014-11-101-3/+4
| | | | | | | * 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
* * win32/win32.c (cmdglob): use inline function.nobu2014-08-231-4/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: manage reverse videonobu2014-08-211-14/+23
| | | | | | | | * 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
* win32/file.c: share functions with win32.cnobu2014-08-091-2/+3
| | | | | | | * 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
* win32.c: unused variablenobu2014-06-231-9/+0
| | | | | | * win32/win32.c (envarea): remove no longer used variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_conv_from_wchar): follow nobu's previous commit.usa2014-06-021-1/+1
| | | | | | | hey nobu, why don't you write Changelog for such serious changes? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e