summaryrefslogtreecommitdiff
path: root/win32/win32.c
AgeCommit message (Collapse)Author
2012-07-09* win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omit Win9xusa
support. remove --enable/disable-win95 option. * include/ruby/win32.h, file.c, win32/win32.c: ditto. * win32/README.win32: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06* win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.usa
this API wraps an I/O handle (HANDLE or SOCKET) and returns fd. the second parameter should be combination of O_*, for example, O_RDWR | O_BINARY | O_NOINHERT. * win32/win32.c, include/ruby/win32.h (rb_w32_unwrap_io_handle): new API. this API unwraps an I/O handle and close the fd (not closes the handle itself). [Feature #4960] [ruby-core:37227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06* win32/win32.c (rb_w32_close): of course, console handle is not socket.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04no windows dialognobu
* 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/trunk@35913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-04win32: VT100 escapenobu
* win32/win32.c (constat_apply): apply VT100 functions. [ruby-core:44958] [Feature #6418] * win32/win32.c (constat_parse): parse some VT100 escape sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23* win32/win32.c (finish_overlapped_socket, overlapped_socket_io):usa
replace ECONNABORTED to EPIPE in send, sendto and sendmsg to improve BSD socket compatibility. this change removes a failure on the test of net/ftp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08* include/ruby/win32.h (FD_SET): change function to macro.shirosaki
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/trunk@35595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24* win32/win32.c (waitpid): need to check the return value ofusa
FindChildSlotByHandle() before passing poll_child_status(). this fixed a SEGV in test-all. reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23* win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):usa
get rid of a segmentation fault with GCC 4.7.0. reported by raylinn@gmail.com (ray linn) at [ruby-core:44505] [Bug #6333], and patched by mame. * test/ruby/test_system.rb (TestSystem#test_system): test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16* win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrantnobu
versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16* configure.in (RUBY_MSVCRT_VERSION): define on mingw too.nobu
* win32/Makefile.sub (config.h): prefix RT_VER with RUBY and make more descriptive to get rid of potential conflict. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-15* reduce UNREACHABLE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14* configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable codenobu
if -O3 is given. * win32/win32.c (child_result): dropped colon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14* variable.c (trace_ev): Removed "not reached" comment as this line isdrbrain
reached. * variable.c (rb_obj_remove_instance_variable): Replaced "not reached" comment with the UNREACHABLE macro. * variable.c (rb_mod_const_missing): ditto. * variable.c (rb_mod_remove_cvar): ditto. * enum.c (first_i): ditto. * string.c (rb_str_aref): ditto. * string.c (str_byte_aref): ditto. * string.c (rb_to_id): ditto. * io.c (rb_io_fmode_modestr): ditto. * io.c (rb_io_oflags_modestr): ditto. * pack.c (num2i32): ditto. * vm_eval.c (rb_method_missing): ditto. * vm_eval.c (rb_f_throw): ditto. * dir.c (dir_read): ditto. * win32/win32.c (child_result): ditto. * struct.c (rb_struct_getmember): ditto. * struct.c (rb_struct_set): ditto. * struct.c (rb_struct_aref_id): ditto. * eval.c (rb_f_raise): ditto. * process.c (rb_f_exit_bang): ditto. * process.c (rb_f_exit): ditto. * process.c (rb_f_abort): ditto. * ext/-test-/iter/break.c (iter_break_value): ditto. * ext/pty/pty.c (pty_check): ditto. * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto. * ext/readline/readline.c (rb_remove_history): ditto. * ext/stringio/stringio.c (strio_unimpl): ditto. * numeric.c (num_sadded): ditto. * numeric.c (num_init_copy): ditto. * numeric.c (rb_num2ll): ditto. * numeric.c (rb_num2ull): ditto. * vm_insnhelper.c (call_cfunc): ditto. * ruby.c (opt_W_getter): ditto. * bignum.c (rb_big_coerce): ditto. * file.c (rb_f_test): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09* win32/win32.c (isUNCRoot, winnt_stat): support long UNC.nobu
[ruby-core:30623][Feature #3399] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07* include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration ofshirosaki
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07* test/ruby/test_thread.rbshirosaki
(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/trunk@35249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-27* win32/win32.c (check_if_dir): fix memory leak.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26* win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++nobu
not to use S_ISDIR(). [Feature #2408][ruby-core:26925] * ruby.c (load_file_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26* win32/win32.c (rb_w32_open, rb_w32_wopen): check if the file is anobu
directory when access denied, to set errno to EISDIR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22* win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIMEnobu
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/trunk@35109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-15* win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API tousa
accept and to return UTF-8 strings. * win32/win32.c (rb_w32_getenv): follow above change. * win32/win32.c (rb_w32_get_environ): returns UTF-8 environment area. * hash.c (env_str_new, rb_f_getenv, env_fetch): follow above changes. [Bug #5570] [ruby-core:40737] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-28* win32/win32.c (rb_w32_read): fix an issue that $stdin.read doesn'tshirosaki
terminate by CTRL-C on Windows. [ruby-dev:45149] [Bug #5812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-28* test/ruby/test_thread.rbshirosaki
(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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-16* win32/win32.c (rb_chsize): no need to get the current file size.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-05* win32/win32.c (check_valid_dir): strict checking of root.usa
GetDriveType() succeeds with non root directory as the argument, even if MSDN says that the API needs the root directory. this patch fixes a failure of test/ruby/test_file_exhaustive.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-04* win32/win32.c (check_valid_dir): special case for a root directory.usa
Reported by Masateru OKAMOTO at [Bug #5819]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14* win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.usa
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-04Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline ↵luislavena
decorator Use CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-29* win32/win32.c (rb_w32_inet_ntop): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* include/ruby/win32.h, win32/win32.c (GetCurrentThreadHandle): removeusa
unused old API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* win32/{Makeilfe.sub,win32.c} (FILE_COUNT, FILE_READPTR): move theusa
definitions from config.h to win32.c. I dared to have left such macros, for other future compiler support. [ruby-core:41313] [Bug #5674] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898]usa
* test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-22* win32/win32.c (_pioinfo): need to declare _pioinfo() before usingusa
_osfhnd and other macros which uses _pioinfo() internally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-22* win32/win32.c (_pioinfo): make an inline function.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-22* win32/win32.c (dupfd): argument of _osfhnd and so on should notnobu
have side effect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-18* io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it isusa
available (for Windows). * win32/win32.c (fcntl): on F_DUPFD, determine the inheritance of the new handle by O_NOINHERIT flag of original fd. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-09* win32/win32.c (unixtime_to_filetime): should check the return valueusa
of localtime(). reported by snowjail at gmail.com. [ruby-dev:44838] [Bug #5596] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03* thread.c (rb_fd_rcopy): suppress warnings on mingw32.nobu
* win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, dupfd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-31* win32/win32.c (setfl): extract from fcntl().usa
* win32/win32.c (dupfd): new function to support F_DUPFD. base on a patch written by akr. * win32/win32.c (fcntl): use above functions. * include/ruby/win32.h (F_DUPFD): define. [experimental] * include/ruby/win32.h (F_SETFL): change the value to correspond with other platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-20* win32/win32.c (socklist_insert, socklist_lookup, socklist_delete):usa
new functions to wrap of st_insert(), st_lookup() and st_delete() to socklist. allocating socklist is deferred until it is really needed. * win32/win32.c (exit_handler): delete socklist only if it is initialized. * win32/win32.c (rb_w32_sysinit, StartSockets): refactoring: move initialization of select_mutex to StartSockets(). * win32/win32.c (exit_handler): refactoring: delete select_mutex only if winsock is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33496 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/trunk@33166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* win32/win32.c (rb_w32_select_with_thread): and my typo. we all mustusa
be more careful. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30* win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implementusa
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/trunk@33128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-05more clarified the license.usa
updated version of r32830, but not included include/ruby/win32.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-03Mark a code is GPL or not.naruse
This is made the comparison between current and initial commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15* win32/win32.c (is_socket, is_console): add prototypes to fix compileusa
problem with gcc introduced at r32549. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15* win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamedusa
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32549 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* 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