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

1045 Коммитов

Автор SHA1 Сообщение Дата
nobu c95d5b250d common.mk, win32/Makefile.sub: refix sizez.c for nmake
* common.mk (sizes.c): revert r42854 and r42883.

* win32/Makefile.sub (sizes.c): rule for outplace build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08 03:54:41 +00:00
nobu 59baeaf10f win32.c: clock_getres
* win32/win32.c (clock_getres): remove unused variable.
  [ruby-dev:47699] [Bug #8869]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 05:36:23 +00:00
nobu f245f0c664 win32.c: clock_getres
* win32/win32.c (clock_getres): required as well as clock_gettime().
  [ruby-dev:47699] [Bug #8869]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 05:23:28 +00:00
nobu 88270e7773 win32.c: suppress warning
* win32/win32.c (do_select): unconstify timeout as select() declares
  it non-const.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 14:41:38 +00:00
usa 736f97b278 * win32/win32.c (rb_w32_select_with_thread): rounding up the fraction of
tv_usec instead of rounding down.
  this change is an experiment to get rid of failures on vc10-x64 CI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 02:28:14 +00:00
usa 61ce3f5744 * win32/win32.c (do_select): constify timeout.
* win32/win32.c (rb_w32_select_with_thread): constify 10ms wait and
  0ms wait structs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 02:02:05 +00:00
nobu ec02633065 Makefile.sub: SIZEOF_CLOCK_T
* win32/Makefile.sub (config.h): now SIZEOF_CLOCK_T is needed for
  unsigned_clock_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 02:07:20 +00:00
usa 5a096eddb3 * include/ruby/win32.h (CLOCK_MONOTONIC): typo.
* win32/win32.c: removed duplicated declarations.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19 04:29:41 +00:00
usa f653019d55 * win32/win32.c (clock_gettime): improve precision when freq is less
than and nearly equals 10**9.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-15 09:41:40 +00:00
usa 866cee6162 * include/ruby/win32.h, win32/Makefile.sub, win32/win32.c
(clock_gettime): [experimental] emulates clock_gettime(2) of posix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-15 05:32:02 +00:00
nobu b0391268a2 win32.c: fix conversion
* win32/win32.c (rb_w32_conv_from_wchar): converted string to CP_UTF8
  should have UTF-8 encoding.  otherwise no conversion takes place
  later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 08:42:25 +00:00
nobu 8ea8dfd88c win32.c: conversion from WCHAR
* win32/win32.c (rb_w32_conv_from_wchar): use WideCharToMultiByte(),
  as like as mbstr_to_wstr(), in the first step of the convertion from
  WCHAR.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 08:02:20 +00:00
nobu 42bd951087 win32.c: supprss warning
* win32/win32.c (rb_w32_system_tmpdir): supprss a sign-compare
  warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 05:12:48 +00:00
nobu 8d564597fa win32.c: conversion to WCHAR
* win32/win32.c (rb_w32_write_console): use MultiByteToWideChar() for
  the last step of conversion to WCHAR, to get rid of warnings from
  rb_enc_find() in miniruby.  [ruby-dev:47584] [Bug #8733]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-05 08:38:39 +00:00
nobu 0f6cd1bb10 win32.c: fix wrong trimming
* win32/win32.c (wstr_to_mbstr, mbstr_to_wstr): fix wrong trimming.
  WideCharToMultiByte() and MultiByteToWideChar() do not count
  NUL-terminator in the size for conversion result, unless the input
  length is -1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-05 08:33:22 +00:00
nobu da8406f0ac win32.c: use enum
* win32/win32.c (rb_w32_pipe): use enum for compile time constants,
  instead of const int for debugging.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28 21:54:34 +00:00
nobu 56150eba92 win32.c: fix pipe name formatting
* win32/win32.c (rb_w32_pipe): fix pipe name formatting.  as "%x" may
  not contain '0' at all, fill at fixed position instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28 01:54:30 +00:00
nobu 48443714b7 win32/file.c: suppress warning
* win32/file.c (convert_mb_to_wchar): omit never-true NULL check to
  suppress maybe-uninitialized warning in rb_file_load_ok().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 08:50:33 +00:00
nobu c4c78f758f win32/file.c: fix target encoding
* win32/file.c (fix_string_encoding): fix target encoding.  the
  parameter `encoding' is not the target encoding but the original
  encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 08:49:31 +00:00
nobu e9b8488fe5 win32/file.c: adjust indent
* win32/file.c (get_user_from_path): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 06:43:33 +00:00
nobu 8948280c67 load.c: search in OS path encoding
* load.c (rb_load_internal): use rb_load_file_str() to keep path
  encoding.
* load.c (rb_require_safe): search in OS path encoding for Windows.
* ruby.c (rb_load_file_str): load file with keeping path encoding.
* win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming
  path is encoded in UTF-8.  [ruby-core:56136] [Bug #8676]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 04:04:23 +00:00
nobu 320a0dd218 win32/file.c: refine fix_string_encoding
* win32/file.c (fix_string_encoding): simplify with rb_str_conv_enc().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 04:01:07 +00:00
nobu 45fbfd0a81 win32/file.c: refine convert_mb_to_wchar
* win32/file.c (convert_mb_to_wchar): use bare pointer instead of
  VALUE, and remove useless argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26 04:00:28 +00:00
nobu 3c9e6f1e62 win32.c: fix infinite recursion
* win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
  recursive call.  re-fix [Bug #8495].  [ruby-core:55923] [Bug #8621]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 12:30:24 +00:00
nobu f9e1c078ba win32.c: suppress warnings
* win32/win32.c (CharNextExA): cast to suppress warnings by VC6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08 14:23:24 +00:00
nobu 3d7fa44b05 win32.c: for strict ANSI
* win32/win32.c (rb_w32_pow): move from win32.h and disable strict
  ANSI mode macro to let _controlfp() stuff defined.
  [ruby-core:55312] [Bug #8495]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08 14:13:13 +00:00
nobu 444f08f661 win32: for strict ANSI
* thread_win32.c (w32_thread_start_func, thread_start_func_1),
  (timer_thread_func): use __stdcall instead of _stdcall which is
  unavailable in strict ANSI mode.  [ruby-core:55312] [Bug #8495]
* win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08 14:12:26 +00:00
usa 5716c5ef2c * win32/win32.c (w32_spawn): r41710 made that if the command starts with
a quote and includes slash, removed the top quote and NOT removed the
  last quote.
  this fixes test failures on test/ruby/test_process.rb and
  test/webrick.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 02:12:55 +00:00
nobu 5197f451de win32.c: use backslash
* win32/win32.c (join_argv): use backslash instead of slash in program
  path, otherwise cannot invoke "./c\u{1ee7}a.exe" for some reason.
  [ruby-core:24309] [Bug #1771]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:25 +00:00
nobu 8d2ce0fb1f win32.c: codepage awareness
* win32/win32.c (translate_char, join_argv, has_redirection): make
  codepage aware.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:16 +00:00
nobu b64f79c838 win32.c: rb_w32_udln_find_exe_r,
rb_w32_udln_find_file_r
* win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
  codepage independent versions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:12 +00:00
nobu dc0b06aa38 win32.c: UTF-8 spawn
* win32/win32.c (w32_spawn): extract codepage aware code from
  rb_w32_spawn().
* win32/win32.c (rb_w32_uspawn): add UTF-8 version function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:07 +00:00
nobu 64d39448d3 win32.c: UTF-8 aspawn
* win32/win32.c (w32_aspawn_flags): extract codepage aware code from
  rb_w32_aspawn_flags().
* win32/win32.c (rb_w32_uaspawn_flags, rb_w32_uaspawn_flags): add
  UTF-8 version functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:59:03 +00:00
nobu a65261c2c1 win32.c: w32_getenv
* win32/win32.c (w32_getenv): extract codepage aware code from
  rb_w32_ugetenv() and rb_w32_getenv().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:58:59 +00:00
nobu cc3ec30ac9 win32.c: w32_stati64
* win32/win32.c (w32_stati64): extract codepage aware code from
  rb_w32_ustati64() and rb_w32_stati64().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30 01:58:55 +00:00
nobu 2f787c4eed * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-23 17:46:05 +00:00
zzak 94a324aa6b * win32/README.win32: grammar typo by @blankenshipz [Fix GH-334]
https://github.com/ruby/ruby/pull/334


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-23 17:43:10 +00:00
nobu 3cef99564b Makefile.sub: timestamp
* win32/Makefile.sub (CONFIG_H): touch timestamp target file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21 00:52:33 +00:00
nobu 206b28ca15 win32.c: GetLastError once
* win32/win32.c (poll_child_status): call GetLastError() once.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 18:08:30 +00:00
nobu 7ce9f9c25a win32.c: no error after retry
* win32/win32.c (waitpid): return 0 on error after retried.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 18:08:28 +00:00
nobu 4c25e2fb8b win32.c: wait until exit
* win32/win32.c (waitpid): should not return 0 but wait until exit
  unless WNOHANG is given.  waiting huge process may return while
  active, for some reason.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 17:44:47 +00:00
naruse 4ff3b7cf05 Revert r41179 "partially revert r41163 because r41173 didn't fix failure"
r41173 is not actually tested; it seems good.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08 16:49:49 +00:00
naruse e431c67ea7 partially revert r41163 because r41173 didn't fix failure
http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130608T101707Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08 13:00:42 +00:00
naruse 1ba82b765c * win32/Makefile.sub: r41163 changed win32/win32.c and configure.in
but it didn't treat about mswin32/mswin64, so fix it.
  NOTE: this needs a review by usa whether additional condition is
  required or not.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08 10:26:36 +00:00
nobu 5713c59531 win32.c: NET_LUID
* configure.in: check for NET_LUID.  header macro varies across
  complier versions.
* win32/win32.c: use configured macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08 05:17:04 +00:00
naruse 6e4cfd9475 * win32/win32.c (NET_LUID): define it on MinGW32.
mingw-w64 has NET_LUID but mingw32 (mingw.org) still doesn't have
  NET_LUID. reported by taco on IRC

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05 15:32:28 +00:00
nobu a815b56d84 win32.c: check error of SetFilePointer
* win32/win32.c (setup_overlapped): check the error code in addition
  to the result of SetFilePointer() to determine if an error occurred,
  because INVALID_SET_FILE_POINTER is a valid value.
  [ruby-core:55098] [Bug #8431]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-22 06:19:03 +00:00
nobu 38302ca719 win32.c: extract setup_overlapped and finish_overlapped
* win32/win32.c (setup_overlapped, finish_overlapped): extract from
  rb_w32_read() and rb_w32_write().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-22 06:17:33 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
nobu 67f562a417 Makefile.in: loadpath from loadpath.c
* Makefile.in (loadpath): $LOAD_PATH in miniruby is empty by default
  now.

* win32/Makefile.sub (loadpath): separate for quirky cmd.exe syntax.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 07:54:04 +00:00