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

1160 Коммитов

Автор SHA1 Сообщение Дата
svn 4a2cf2fea4 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-31 05:52:30 +00:00
nobu 7a8836bd7b * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-31 05:52:17 +00:00
nobu 1fe71722e2 Makefile.sub: no PACKED_STRUCT on old VC
* win32/Makefile.sub (PACKED_STRUCT): __pragma extension is
  available since VC9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-21 12:13:07 +00:00
nobu 031e1570b9 Makefile.sub: no oldnames.lib
* win32/Makefile.sub (LIBS): oldnames.lib is not used already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-14 11:50:43 +00:00
nobu 8a29da3b76 win32/configure.bat: check directory
* win32/configure.bat: bail out if run in win32 directory.
  [ruby-core:63648] [Bug #10027]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-12 14:49:46 +00:00
nobu b1f4bf8aa2 common.mk: integrate clean targets
* common.mk (clean-rdoc, clean-capi, clean-platform): integrate
  from Makefile.in and win32/Makefile.sub.

* win32/Makefile.sub (RMALL): now use rm.bat instead of rmall.bat
  which does not handle any options and convert slashes.

* win32/rmall.bat: no longer used.  use rm.bat with -r instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 07:08:06 +00:00
nobu 86689e037f common.mk: empty by distclean
* common.mk (clean-runnable): remove files made by mkrunnable.

* common.mk (clean-extout): remove archir too.

* common.mk (clean-ext): remove timestamp directory

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-05 07:02:39 +00:00
nobu 8eedcaa6b5 common.mk: move DEFAULT_PRELUDES
* common.mk (DEFAULT_PRELUDES): no longer configurable since
  r43278, move from Makefile.in and win32/Makefile.sub.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-04 17:32:51 +00:00
nobu c2b0992156 configure.in: fix static-linked-ext
* configure.in (--with-static-linked-ext): fix for extensions to
  be linked statically.
* Makefile.in, common.mk: use ENCSTATIC for enc directory.
* ext/extmk.rb: supply dependencies of statically linked extension
  libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03 03:40:24 +00:00
nobu 4a26246beb win32.c: unused variable
* win32/win32.c (envarea): remove no longer used variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23 22:16:19 +00:00
nobu 0eb892e103 win32/setup.mak: rename RUBY_RELEASE_DATE
* win32/setup.mak (verconf.mk): rename RUBY_PROGRAM_VERSION as
  RUBY_RELEASE_DATE, same as other platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-10 08:30:10 +00:00
nobu 2e2ccab110 win32/setup.mak: separate verconf.mk
* win32/setup.mak (verconf.mk): separate RUBY_RELEASE_DATE from
  Makefile so that build would not stop everyday.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-10 08:30:01 +00:00
usa 25e8bfce58 * win32/win32.c (rb_w32_conv_from_wchar): follow nobu's previous commit.
hey nobu, why don't you write Changelog for such serious changes?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-02 22:35:17 +00:00
nobu fba33accdb win32/Makefile.sub: copy enc/jis/props.h
* win32/Makefile.sub (enc/jis/props.h): nmake needs special rule
  to copy from the source directory, because it can't handle VPATH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26 04:03:52 +00:00
naruse 210f863906 revert File::Statfs [Feature #9772]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 10:39:48 +00:00
nobu 3360dfd294 win32.c: fix infinite recursion
* win32/win32.c: include "missing/nextafter.c" and address
  finite() and isnan() macros, to get rid of infinite recursion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18 13:20:39 +00:00
nobu d7df70c08f Makefile.sub: fix nextafter
* win32/Makefile.sub (MISSING, CONFIG_H): msvcr120.dll provides
  nextafter() as well as other mathematic functions.  finite() and
  isnan() used in missing/nextafter.c are not by older runtimes.
  [Feature #9834]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18 05:46:36 +00:00
akr 16169ff9e3 * win32/Makefile.sub: Add nextafter.obj to MISSING.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18 02:10:01 +00:00
nobu f7397d988a win32.c: add linkage
* win32/win32.c (ustatfs): need a linkage to get rid of conflict.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-30 16:45:32 +00:00
nobu d681a6247b win32.c: declare for old VC
* win32/win32.c (ustatfs): declare GetVolumePathNameW for old VC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-30 16:07:02 +00:00
nobu c5fef27312 file.c: unpack in binary
* file.c (statfs_fsid): convert with rb_integer_unpack.

* configure.in: fsid_t is no longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 04:31:09 +00:00
usa 6f477bcc0e * configure.in, win32/Makefile.sub: fsid_t is defined in include/ruby/win32.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:47:07 +00:00
usa 86dc863bd8 * win32/win32.c, include/ruby/win32.h (ustatfs): implementation of
statfs(2) clone. [EXPERIMENTAL]

* file.c (rb_io_statfs): use above function.

* configure.in, win32/Makefile.sub (struct statfs): available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 15:45:00 +00:00
nobu 9f4f9048a0 win32.c: CharNextExA with cp
* win32/win32.c (dln_find_1): use CharNextExA() instead of CharNext()
  to respect the given code page.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 02:46:53 +00:00
nobu 7d66f95523 win32.c: adjust type
* win32/win32.c (NtCmdLineElement): use long instead of int for
  rb_w32_wstr_to_mbstr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15 16:23:07 +00:00
usa 1242292de9 * include/ruby/win32.h (rb_w32_cmdvector): removed.
* win32/win32.c (rb_w32_sysinit): use WCHAR version of GetCommandLine()
  internally.

* win32/win32.c (w32_cmdvector): renamed from rb_w32_cmdvector.  use
  WCHAR* instead of char* internally.

these changes are expected to not changing the behavior yet.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15 10:39:36 +00:00
akr db9d8759ee * common.mk: Unused target, $(MKMAIN_CMD), removed.
* Makefile.in (MKMAIN_CMD): Unused macro removed.

* win32/Makefile.sub (MKMAIN_CMD): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-13 01:21:39 +00:00
nobu ac4e60bfb2 win32.c: wchar conversion
* win32/win32.c (rb_w32_wstr_to_mbstr, rb_w32_mbstr_to_wstr): make
  WCHAR/mb conversion functions public.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-05 23:51:27 +00:00
usa 38c3ba2fa5 * win32/win32.c (rb_w32_accept, open_ifs_socket, socketpair_internal):
reset inherit flag of socket to avoid unintentional inheritance of
  socket.  note that the return value of SetHandleInformation() is not
  verified intentionally because old Windows may return an error.
  [Bug #9688] [ruby-core:61754]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-30 14:42:52 +00:00
nobu df9199d468 configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
* configure.in (PACKED_STRUCT): check VC pragma too, and make
  function-style macro.

* win32/Makefile.sub (PACKED_STRUCT): enable with VC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-25 07:00:10 +00:00
naruse 3d3711efd3 * win32/Makefile.sub: define PACKED_STRUCT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-25 03:07:06 +00:00
nobu 1b81dafdd5 win32/win32.c: add rb_w32_inet_pton
* include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a
  wrapper function for inet_pton minimum supported client is
  Vista, as well as inet_ntop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-23 02:54:04 +00:00
arton 2cdee22370 remove HAVE_FSEEKO from win32/win32.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-31 13:12:23 +00:00
nobu bb4a1ac9b0 expand-config.rb: expand config values
* tool/expand-config.rb: expand config values, extracted from
  win32/Makefile.sub.

* win32/Makefile.sub (ruby_pc): use tool/expand-config.rb script.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27 05:46:10 +00:00
usa cdf80f030d * win32/{setup.mak,Makefile.sub}: update fake.rb like
template/fake.rb.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27 04:25:47 +00:00
usa c283ebb2d2 * win32/Makefile.sub (fake.rb): should depend on version.h because
if RUBY_VERSION is updated, fake.rb need to say the new version
  to avoid install error in rbconfig.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26 07:11:51 +00:00
nobu 58a7cdaaf0 win32/win32.c: mingw jungle
* configure.in: let mingw do something black-magic, and check if
  _gmtime64_s() is available actually.
* win32/win32.c (gmtime_s, localtime_s): use _gmtime64_s() and
  _localtime64_s() if available, not depending on very confusing
  mingw variants macros.  based on the patch by phasis68 (Heesob
  Park) at [ruby-core:58764].  [ruby-core:58391] [Bug #9119]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 04:00:59 +00:00
usa 7ff4413eab * win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
install win32.h.
  [ruby-core:58801][Bug #9199] reported by arton.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 20:05:30 +00:00
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
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