Граф коммитов

389 Коммитов

Автор SHA1 Сообщение Дата
kosaki 04202dc83d * win32/win32.c (rb_w32_fdcopy): New. This can copy even though
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-30 14:11:34 +00:00
kosaki b4c5fad4b1 * thread_win32.c (native_cond_timedwait): New. r31373 caused
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-29 04:18:29 +00:00
usa 22d5cf9226 * win32/{win32.c,dir.h} (rb_w32_uopendir): new API to pass UTF-8 path.
* 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-28 07:22:18 +00:00
arton 333e43e06b * win32/win32.c (kill): accept 0 only sig is SIGINT #4596
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-25 12:11:44 +00:00
arton 83e071701b * win32/win32.c (kill): accept 0 as pid, fixes #4596
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-25 11:04:40 +00:00
tarui 6825f77323 * win32/win32.c (CreateChild): maximum length of lpCommandLine is
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-20 16:15:35 +00:00
nobu b8bcb6474c * win32/win32.c (rb_w32_read): suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14 12:20:59 +00:00
luislavena c2bfeaa244 Evaluate truncate, ftruncate and ftello existence
This corrects mingw-w64 compilation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-11 16:38:10 +00:00
arton 858a66d1ac * win32/win32.c: fix r31152 (dup line)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22 15:18:09 +00:00
arton 50ff6ed866 * win32/win32.c: wait process real termination after reading
exit code. fixes #4518


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22 15:05:39 +00:00
arton 11e4052295 * hash.c (ruby_setenv): check env process block size with OS ver.
* 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-19 16:33:59 +00:00
usa 86bb0af7ea * win32/win32.c: revert r30987 because it causes some failures in
test-all, especially webrick.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 07:23:37 +00:00
kosaki 4a57c5e7d9 * win32/win32.c (rb_w32_spawn): use shell if a commandline contain
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-28 13:52:58 +00:00
usa 23301142cc * win32/win32.c (is_internal_cmd): if the first char of prog is '@',
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-14 04:17:01 +00:00
tarui fb672259d9 * include/ruby/win32.h, win32/win32.c: add rb_w32_inet_ntop.
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-31 17:31:18 +00:00
kosaki 8d397b77ea * win32/win32.c: get rid of STRNDUPA(). It's dangerous API.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 12:42:45 +00:00
kosaki 2529d2c38d * win32/win32.c (rb_w32_aspawn): get rid of too huge alloca().
[Bug #4330] [ruby-core:34898]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 12:33:57 +00:00
kosaki f7fb66bd35 * win32/win32.c (rb_w32_spawn): get rid of too huge alloca().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 11:31:48 +00:00
kosaki ab720532ef * win32/win32.c (open_dir_handle): get rid of too huge alloca().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 09:50:30 +00:00
kosaki 21931d6aa2 * win32/win32.c (wstati64): get rid of too huge alloca().
[Bug #4316] [ruby-core:34834]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 09:21:40 +00:00
usa 11c5daa698 * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): fixed previous commit. sorry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 06:21:40 +00:00
usa 98929a2dfd * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): get rid of too huge
alloca(). this is the real fix of [ruby-core:34833].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 06:12:48 +00:00
naruse 4a744b3d78 * win32/win32.c (rb_w32_write_console): don't raise exception when
the conversion is for writing to console.
  Patched by Heesob Park [ruby-core:33999]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-31 19:26:30 +00:00
tarui 88ab39f6ab * win32/win32.c (rb_w32_read): fixed more for readline, and so on. [ruby-core:33511]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06 15:29:45 +00:00
usa 82ec8baa95 * win32/win32.c (rb_w43_read): more fix. [ruby-core:33513]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 06:32:01 +00:00
usa 77049334aa * win32/win32.c (rb_w32_read): rollback debug code of previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 04:49:28 +00:00
usa 6f3225f698 * win32/win32.c (rb_w32_read): workaround for console reading troubles.
fixed [ruby-core:33511]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 04:42:29 +00:00
usa e4288860d8 * win32/win32.c (rb_w32_read): read only 1 byte at once on console.
workaround of Windows bug. see [ruby-core:33460].
  this is not the final solution.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-30 03:26:43 +00:00
nobu 8fba2b63ec * win32/win32.c (rb_w32_write_console): fix argument type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 13:52:26 +00:00
usa 95f0f27dd0 * win32/win32.c (rb_w32_isatty): use GetConsoleMode() to determine the
fd is console or not, just like rb_w32_write_console().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 05:33:15 +00:00
usa 3d24592008 * win32/win32.c (rb_w32_write_console): fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 05:11:49 +00:00
luislavena ac0f5a53b6 * io.c (io_fwrite): use rb_w32_write_console under Windows.
* win32/win32.c (rb_w32_write_console): added to write to write
    Unicode using WriteConsoleW for stdout/stderr. [ruby-core:33166]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27 19:49:58 +00:00
nobu 3c4fecda3f * win32/win32.c (filecp, wstr_to_mbstr, mbstr_to_wstr):
refactored.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-23 21:13:35 +00:00
nobu 16cb5ce483 * win32/win32.c (wlink, rb_w32_getppid): use typedef instead of
repeating compilcated function prototypes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-23 12:59:50 +00:00
nobu 8a7aad9952 * fix type warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 12:30:39 +00:00
usa 63b0601792 * win32/win32.c (overlapped_socket_io): get rid of a warning of 64bit
mingw.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-09 04:30:15 +00:00
usa 1f3e96b7ac * win32/win32.c (get_wsa_extension_function): typos. orz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 05:41:49 +00:00
usa 7dd7ce0ff7 * win32/win32.c (finish_overlapped_socket): refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 02:48:07 +00:00
usa 877e90f17a * win32/win32.c (get_proc_address): refactoring.
* win32/win32.c (get_wsa_exetinsion_function): refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 02:03:40 +00:00
usa 1503e320d9 * win32/win32.c (rb_w32_getppid): support Win64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-27 09:15:02 +00:00
nobu 150b4efa55 * win32/win32.c (rb_w32_open_osfhandle, rb_w32_wopen, rb_w32_pipe):
use uintptr_t instead of long for win64.

* win32/win32.c (socketpair_internal): suppress warnings.

* win32/win32.c (ftruncate): use HANDLE instead of long for win64.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:58:23 +00:00
usa fb44f02aa1 * win32/win32.c (rb_w32_strerror): get English message first, instead
of system default. see [ruby-dev:42358].
  [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 07:05:56 +00:00
usa cba4cda71d * win32/win32.c (rb_w32_strerror): unmap some range of errno for
workaround of VC10's strerror() and sys_nerr problem.
  based on a patch from Akio Tajima, [ruby-dev:42355].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 06:54:52 +00:00
usa 1fcb7a5ee0 * win32/win32.c (rb_w32_getenv): should return NULL if specified name
is empty. a patch from Heesob Park at [ruby-core:32650]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-30 07:12:49 +00:00
usa 51f6d787ac * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): don't forget to free
memory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-02 00:12:43 +00:00
usa d35fdf3335 * win32/win32.c (CreateChild): unicodize.
* win32/win32.c (rb_w32_spawn, rb_w32_aspawn): convert arguments of
  CreateChild() from ACP to WideChar.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-02 00:02:52 +00:00
usa 51077c2c22 * win32/win32.c (rb_w32_read): call ReadFile() with len = 0 before
reading really on console, because the first ReadFile() call after
  PeekConsoleInput() always returns broken data. (Windows's bug).
  [ruby-core:29018]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-27 13:36:26 +00:00
usa f82a6840a8 * thread.c (subtract_tv): if the rest is zero, should finish waiting
immediately.

* win32/win32.c (subtract): ditto.
  based on a patch from Roger Pack in [ruby-core:27957].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-20 16:13:35 +00:00
usa d165fa2504 * win32/win32.c (argv_size): merged into join_argv() to maintain the
agreement with it.  removed code has a calclulation bug.
  fixed [Bug#2388]

* win32/win32.c (join_argv): calc and return the length of joined
  argv.
  the cause of the original bug was clarified by Masaya TARUI
  <tarui AT prx.jp> and the solution was suggested by him, too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 12:15:47 +00:00
nobu 414727ca70 * win32/win32.c (rb_w32_conv_from_wchar): use ECONV_UNDEF_REPLACE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16 09:41:43 +00:00