summaryrefslogtreecommitdiff
path: root/win32
AgeCommit message (Collapse)Author
2012-09-25merge revision(s) 36544: [Backport #7017]naruse
* win32/mkexports.rb: should not export DllMain(). reported by luis at [ruby-core:46743] [Bug #6790], solved by Heesob Park, and confirmed by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23merge revision(s) 36668: [Backport #6846]naruse
* test/ruby/test_file_exhaustive.rb (TestFileExhaustive#test_stat_special_file): add a test. GetFileAttributesExW fails to get attributes of special files such as pagefile.sys. * win32/win32.c (check_valid_dir): for performance, check the path by FindFirstFileW only if the path contains "...". * win32/win32.c (winnt_stat): use GetFileAttributesExW instead of FindFirstFileW since GetFileAttributesExW is faster. Based on the patch by Dusan D. Majkic. [ruby-core:47083] [Feature #6845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-28merge revision(s) 32549,32557: [Backport #6661]naruse
* win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed from rb_w32_has_cancel_io(). now it takes a parameter as fd to check the fd is console or not, because we cannot cancel console input even if we have cancel_io function. * io.c (WAIT_FD_IN_WIN32): call above function instead of the old one, so now we can kill the thread which calls STDIN.gets. the problem was reported by ko1 vir IRC. * win32/win32.c (is_socket, is_console): add prototypes to fix compile problem with gcc introduced at r32549. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-26merge revision(s) 35913: [Backport #6640]naruse
* win32/win32.c (rb_w32_sysinit): let the system not display the critical-error-handler message box and the Windows Error Reporting dialog. [ruby-core:45389] [Bug #6535] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25merge revision(s) 35595: [Backport #6446]naruse
* include/ruby/win32.h (FD_SET): change function to macro. To avoid buffer overflow when smaller FD_SETSISE is used in ext libraries. * win32/win32.c (rb_w32_fdset): this function is not used anymore. But we leave this for compatibility. * win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller FD_SETSISE is used in ext libraries. Dereference of fd_set pointer causes SEGV. * test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for above. * ext/-test-/win32/fd_setsize/depend: ditto. * ext/-test-/win32/fd_setsize/extconf.rb: ditto. * ext/-test-/win32/fd_setsize/fd_setsize.c: ditto. [ruby-core:44588] [Bug #6352] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17merge revision(s) 35109,35110,35651: [Backport #6385]nobu
* win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME to time_t directly, not to be affected by TZ unnecessarily. * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME simply. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14merge revision(s) 35249,35250: [Backport #6296]naruse
* include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of new function. * process.c (enum): add EXEC_OPTION_PGROUP and move the position above for the usage in proc_spawn_n(). * process.c (proc_spawn_n): add an argument to pass new option `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to CreateProcessW(). This flag is necessary for the usage of Process.kill on the subprocess on Windows. * process.c (rb_exec_arg_addopt): ditto. * process.c (rb_spawn_process): ditto. * process.c (documentation for rb_f_spawn): add documentation for new option `new_pgroup` of spawn. * test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup): add tests for option `new_pgroup`. * test/ruby/test_thread.rb (TestThreadGroup#test_thread_timer_and_interrupt): add option `new_pgroup: true` to spawn on Windows. It's needed for Process.kill on a subprocess. * win32/win32.c (CreateChild): add an argument to pass dwCreationFlags of CreateProcessW(). * win32/win32.c (rb_w32_spawn): ditto. * win32/win32.c (rb_w32_aspawn_flags): add new function to pass dwCreationFlags. * win32/win32.c (rb_w32_aspawn): refactor to move the content to rb_w32_aspawn_flags(). [ruby-core:43245][Bug #6131] * test/ruby/test_thread.rb (TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows. Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP flag is not specified in a call to CreateProcessW(). * win32/win32.c (CreateChild): revert the usage of CREATE_NEW_PROCESS_GROUP flag for compatibility. [ruby-core:43245][Bug #6131] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22merge revision(s) 33873:nobu
* win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898] * test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 34043,34045,34132: [Backport #5791]naruse
* win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function. * win32/win32.c (init_stdhandle): set default mode of stdin as binmode. * io.c (set_binary_mode_with_seek_cur): new function to replace SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the fd and take care of LF in rbuf. * io.c (do_writeconv): set text mode when needed. * io.c (io_read): need to change the mode of the IO to binmode temporally when the length for IO#read, because IO#read with length must behave so. * test/ruby/test_io_m17n.rb (TestIO_M17N#est_{read_with_length, read_with_length_binmode,get[cs]_and_read_with_binmode, read_with_binmode_and_get[cs],read_write_with_binmode}): tests for above changes. all patches are written by Hiroshi Shirosaki. [ruby-core:41496] [Feature #5714] * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length, * io.c (rb_sys_fail_path): move the definition. Move above for using it in set_binary_mode_with_seek_cur(). * io.c (set_binary_mode_with_seek_cur): fix improper seek cursor. Seeking file cursor with setting binary mode has possibility to cause infinite loop. Fixed the bug and refined error handling. Introduced at r34043. And cleanups as below. Remove unnecessary parentheses of `fptr`. Use return value of setmode(). * test/ruby/test_io_m17n.rb (TestIO_M17N#test_seek_with_setting_binmode): add a test for abobe. [ruby-core:41671] [Bug #5714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 33937: [Backport #5704]naruse
* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] * include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE decorator. * io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline decorator by CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] * io.c (do_writeconv): adjust binary mode if required. * io.c (read_all, appendline, swallow, rb_io_getline_1): ditto. * io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto. * io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto. * io.c (rb_io_extract_modeenc, rb_sysopen): ditto. * io.c (pipe_open, prep_stdio, io_encoding_set): ditto. * io.c (rb_io_s_pipe, copy_stream_body): ditto. * test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in binary mode. * win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle initialization. * win32/win32.c (rb_w32_write): use FTEXT mode accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-06merge rivision(s) 33685:usa
* win32/win32.c (unixtime_to_filetime): should check the return value of localtime(). reported by snowjail at gmail.com. [ruby-dev:44838] [Bug #5596] [Backport #5596] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-03merge revision(s) 34040,34051,34063,34389,34402,34403:naruse
------------------------------------------------------------------------ r34040 | naruse | 2011-12-14 14:42:34 +0900 (Wed, 14 Dec 2011) | 1 line Use pipe instead of $stdin.read. ------------------------------------------------------------------------ * test/ruby/envutil.rb (invoke_ruby): remove :timeout option before pass it to Kernel#spawn. * test/ruby/test_thread.rb (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status assertion because we cannot get signal status on Windows. * win32/win32.c (CreateChild): create process group to receive the signal by GenerateConsoleCtrlEvent(). * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT if a process group is specified. CTRL_C_EVENT signal cannot be generated for process groups for the specification. [ruby-dev:45149] [Bug #5812] * test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid in block form. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-03merge revision(s) 33556:kosaki
* win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010. [Bug #5243] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-02merge revision(s) 33630:kosaki
* win32/configure.bat: disable delayed expansion of enironment variable. [Bug #5517] [ruby-core:40531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02* win32/win32.c (rb_w32_fd_copy): cast explicitly to suppress warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30merge revision(s) 33133:kosaki
* win32/win32.c (rb_w32_select_with_thread): and my typo. we all must be more careful. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30merge revision(s) 33128:kosaki
* win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement for rb_thread_select() in thread.c. the use of rb_fd_copy() is introduced in r33117. [Bug #5229] [ruby-core:39102] * thread.c (rb_thread_select): must call rb_fd_init() before using rb_fdset_t. see the implementations of rb_fd_init()s if you want to know the reason. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-16* win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_nobu
and _threadptr_ functions, as well as mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-31* common.mk (ECHO1): ":" in a make variable replacement cause a syntaxyugui
error with /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead. * configure.in (NULLCMD): new check. * Makefile.in (NULLCMD): Reflects checking in configure. * win32/Makefile.sub (NULLCMD): new assignment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-16* win32/setup.mak: support to build x64-mswin64 on Windows7 (and Vista,usa
perhaps). backported r32521 from trunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-09* win32/win32.c (rb_w32_{read,write}): should be signed.nobu
Bug #5001 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08* common.mk (RUN_OPT): disable gems.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08* win32/win32.c (wunlink): reverted a part of r32426. it was mistakenlyusa
mixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08* win32/Makefile.sub (config.h): define GC_MARK_STACKFRAME_WORD.usa
fixed build problem of r32438. the value (30) is temporary value. maybe it's enough by 20~24 according to my observation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-06* win32/win32.c (kill): check the process exited or not beforeusa
teminationg it. [Bug #4943] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-15* thread.c (do_select): Windows: no need to poll if select(2) isusa
cancelable. * thread_win32.c (native_fd_select): new function to make select(2) cancelable. * thread_win32.c (rb_w32_check_interrupt): new function for checking interrupt. * win32/win32.c (rb_w32_select_with_thread): new function. cancelable select(2). * win32/win32.c (rb_w32_select): use above function internally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16* configure.in, win32/Makefile.sub (RUBY_SO_NAME): add CPU as prefixusa
of RUBY_SO_NAME on x64/ia64 mswin/mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* include/ruby/intern.h: remove rb_fd_copy() to rb_fd_dup() andkosaki
rb_w32_fdcopy() to rb_w32_fd_dup(). * win32/win32.c: ditto. * thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14fix mswin32 build error.kosaki
* missing/setproctitle.c: oadd #ifdef HAVE_UNISTD_H. * win32/Makefile.sub (MISSING): add setproctitle.obj git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-13* win32/win32.c (rb_w32_select): check invalid handle before doingusa
select operations. see [ruby-dev:43513], [ruby-dev:43535] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-02* win32/win32.c (rb_w32_fdcopy): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-02* win32/win32.c: remove trailing spaces and no-cuddle "else".nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30* win32/win32.c (rb_w32_fdcopy): New. This can copy even thoughkosaki
fdset size exceed FD_SETSIZE. * include/ruby/intern.h (rb_fd_copy): use rb_w32_fdcopy() git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29* thread_win32.c (native_cond_timedwait): New. r31373 causedkosaki
win32 build failure. * thread_win32.c (__cond_timedwait, abs_timespec_to_timeout_ms): New helper functions. * win32/win32.c (rb_w32_time_subtract): rename from subtract and remove static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-28* win32/{win32.c,dir.h} (rb_w32_uopendir): new API to pass UTF-8 path.usa
* win32/win32.c (opendir_internal, rb_w32_opendir): extract and merge common part of rb_w32_opendir() and rb_w32_uopendir(). * dir.c (do_opendir, glob_helper): encoding. * dir.c (dir_initialize, do_opendir): convert path to UTF-8 and call rb_w32_uopendir() instead of rb_w32_opendir() on Windows. fixes #4491, reported by Joey Zhou. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-25* win32/win32.c (kill): accept 0 only sig is SIGINT #4596arton
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-25* win32/win32.c (kill): accept 0 as pid, fixes #4596arton
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-20 * win32/win32.c (CreateChild): maximum length of lpCommandLine istarui
32,768 characters, including the Unicode terminating null character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14* win32/win32.c (rb_w32_read): suppress warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-11Evaluate truncate, ftruncate and ftello existenceluislavena
This corrects mingw-w64 compilation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22* win32/win32.c: fix r31152 (dup line)arton
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22* win32/win32.c: wait process real termination after reading arton
exit code. fixes #4518 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-19* hash.c (ruby_setenv): check env process block size with OS ver.arton
* win32/win32.c: export rb_w32_osver for above patch. * include/ruby/win32.h: declare rb_w32_osver for Win32 Libs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01* win32/win32.c: revert r30987 because it causes some failures inusa
test-all, especially webrick. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28* win32/win32.c (rb_w32_spawn): use shell if a commandline containkosaki
double-quote character. * win32/win32.c (is_internal_cmd): similar, use shell if a commandline contain caret character. * test/ruby/test_system.rb (TestSystem#test_system_at): fix wrong test case. if system() invoke a command by using shell, system() never return nil. Also, "" quotation must not appear twice in a command line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-14* win32/setup.mak (USE_RUBYGEMS): fixed r30835. It didn't work onkosaki
mswin32 port. If you changed win32/configure.bat, you should change setup.mak too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-14* win32/win32.c (is_internal_cmd): if the first char of prog is '@',usa
execute it via shell. [ruby-core:35218] (#4393) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11* configure.in (rubygems): add --disable-rubygems option.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 * include/ruby/win32.h, win32/win32.c: add rb_w32_inet_ntop.tarui
inet_ntop's minimum supported client is Vista. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 * win32/win32.c: get rid of STRNDUPA(). It's dangerous API.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e