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

1072 Коммитов

Автор SHA1 Сообщение Дата
nobu 21f81885ab win32.c: rb_w32_dup2
* win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and
  redirect_dup2().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 07:15:56 +00:00
nobu 28849ce257 ext/rbconfig/sizeof: move to an extension library
* common.mk, ext/rbconfig/sizeof: move RbConfig::SIZEOF to an
  extension library to get rid of annoying nmake VPATH rule.

* inits.c (rb_call_inits), miniinit.c (Init_sizes): RbConfig::SIZEOF
  is no loger built-in.

* template/sizes.c.tmpl (Init_sizeof): rename initialization function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-18 14:19:16 +00:00
nobu bcfb4569aa ifchange: no overwrite with an empty file
* tool/ifchange, win32/ifchange.bat: do not overwrite with an empty
  file by default, and add --empty option to force it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-03 12:40:24 +00:00
nobu bfea5bc277 Makefile.sub: add missing config variables
* win32/Makefile.sub (config.status): add missing variables,
  PLATFORM_DIR and THREAD_MODEL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 03:44:30 +00:00
nobu 5ef68ab22d Makefile.sub: fix typo
* win32/Makefile.sub (MISSING): fix typo, missing extention.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-24 18:19:33 +00:00
nobu 33945edf39 Makefile.sub: C99 mathematics functions
* win32/Makefile.sub (config.h): fix version number of runtime
  library.  log2 needs to be defined, not only HAVE_LOG2.
  [ruby-core:57992] [Bug #9044]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23 16:34:17 +00:00
nobu dd2979b3dd Makefile.sub: C99 mathematics functions
* win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
  functions.  [ruby-core:57981] [Bug #9044]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23 13:51:05 +00:00
nobu cb4b55d3d8 win32/file.c: code page table
* win32/file.c (code_page): use simple array instead of st_table.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19 10:59:06 +00:00
nobu eeb3156eca encoding.c: defer code page table
* encoding.c (rb_locale_encindex): defer initialization of win32 code
  page table until encoding db loaded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-19 10:55:39 +00:00
nobu d66c5768ca win32.c: check by module handles
* win32/win32.c (console_emulator_p): check by comparison between
  module handle of WriteConsoleW and kernel32.dll.
* configure.in, win32/Makefile.sub, win32/setup.mak: no longer need
  psapi.lib.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 08:11:21 +00:00
nobu 36862468a8 file.c: fix memory leak
* win32/file.c (rb_file_expand_path_internal): fix memory leaks at
  a non-absolute home exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 05:21:38 +00:00
nobu 209376034f * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 02:57:44 +00:00
nobu b62bfa2a66 Makefile.sub: fix typo
* win32/Makefile.sub (HAVE_PSAPI_H): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 23:36:15 +00:00
nobu 50b0f0eb1b Makefile.sub: default HAVE_PSAPI_H to 0
* win32/Makefile.sub (HAVE_PSAPI_H): default to 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 23:12:02 +00:00
nobu d7144025fd ifchange.bat: --keep option
* win32/ifchange.bat: add --keep option as well as tool/ifchange.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 14:39:53 +00:00
nobu a8c6a52a1a win32/setup.mak: check psapi.h
* win32/setup.mak (check-psapi.h): check if psapi.h is available.

* win32/win32.c (CHECK_CONSOLE_EMULATOR): enable console emulator DLL
  check only when psapi.h is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 13:50:29 +00:00
nobu 111327c535 Makefile.sub: skip timezone tests
* win32/Makefile.sub (TZ): empty to skip timezone tests which are not
  supported on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-15 07:33:59 +00:00
nobu 8e385d6778 Makefile.sub: gem_prelude to load rubygems
* win32/Makefile.sub (DEFAULT_PRELUDES): always use gem_prelude
  regardless of --disable-rubygems.  follow up r43278.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-14 08:00:22 +00:00
nobu d63f9e933c win32.c: bail out if no memory
* win32/win32.c (rb_w32_write_console): bail out when buffer
  allocation failed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10 06:33:38 +00:00
nobu 3bb86ae462 cont.c: split conditions
* cont.c (FIBER_USE_NATIVE): split long conditions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 13:45:31 +00:00
nobu 4549879579 configure.in: move FIBER_USE_NATIVE conditions
* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
  from cont.c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 12:03:58 +00:00
nobu 6531e12e0b win32/file.c: make mapping at initialization
* win32/file.c (code_page_i, rb_w32_init_file): make encoding to code
  page mapping at initialization directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 07:20:59 +00:00
nobu 98e4a412e4 win32/file.c: use encoding index
* win32/file.c (code_page): use encoding index, which is primary
  entity, instead of encoding name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 06:50:18 +00:00
nobu 6d07beb4c1 win32/file.c: using st_table
* win32/file.c (code_page): cache using st_table, not RHash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 06:28:11 +00:00
nobu 1c7b42e2bc win32/file.c: check ASCII encodings first
* win32/file.c (code_page): check US-ASCII and ASCII-8bit before
  ordinary mapping.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 06:09:01 +00:00
nobu 72db853bb8 win32.c: internal functions
* win32/win32.c (w32_spawn, w32_aspawn_flags): make internal functions
  static.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 05:03:29 +00:00
nobu 886e3bb1df win32.c: disable console colorizing
* win32/win32.c (console_emulator_p, constat_handle): disable built-in
  console colorizing when console-emulator-like DLL is injected.
  [Feature #8201]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-03 09:20:51 +00:00
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