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

1160 Коммитов

Автор SHA1 Сообщение Дата
nobu 41dbe74b94 common.mk: no expansion
* common.mk (showconfig): get rid of variable expansion by shell.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-09 15:16:15 +00:00
usa 2314a8fc4f * win32/Makefile.sub (config.status): added variables which were
missing at r39130.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 11:55:14 +00:00
nobu c206b802db Makefile.sub: rubyarchdir in config.status
* win32/Makefile.sub (config.status): now rbconfig.rb needs
  rubyarchdir.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 07:21:33 +00:00
nobu 2d9c37a895 win32.c: missing initialization
* win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): fix missing
  initialization.  pointed out by phasis68 (Heesob Park) at
  [ruby-core:51579].  [Bug #7721]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-23 07:29:15 +00:00
nobu fa30ebc3c7 win32.c: acp_to_wstr results check
* win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): check the results
  of acp_to_wstr() which can return NULL.  [ruby-core:51557] [Bug #7721]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-23 03:28:25 +00:00
nobu 8d816aef2e setup.mak: -runtime-
* win32/setup.mak (-runtime-): see msvcrt from link header on mswin
  instead of running testing executable file, for cross compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-12 07:12:49 +00:00
nobu 51914fcce6 setup.mak: -osname-
* win32/setup.mak (-osname-): separate from -runtime- and just
  compile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-11 10:21:52 +00:00
nobu 101d458fdf win32/rm.bat: remove each files
* win32/rm.bat: removing by wildcard errs on network file system, so
  remove each files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-11 10:21:49 +00:00
nobu 2b131e1eb6 win32/setup.mak: remove each files
* win32/setup.mak (-runtime-): removing by wildcard errs on network
  file system, so remove each files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-11 02:02:18 +00:00
nobu 1a920c7f9b Makefile.in: continue if Makefile unchanged
* Makefile.in, win32/Makefile.sub ($(MKFILES)): continue if Makefile
  unchanged.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-10 08:45:42 +00:00
nobu b7b183f682 win32/rm.bat: fix infinite loop
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-10 08:44:19 +00:00
usa 6e4b187bfe * Makefile.in, common.mk (fake, yes-fake, no-make): these dependecies
are not platform dependent.

* win32/Makefile.sub ($(arch)-fake.rb): workaround.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07 06:23:15 +00:00
yugui f849917a70 * win32/Makefie.sub: Fix build with VC.
Patch by Charlie Savage. Fixes [ruby-core:51261]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-06 10:08:22 +00:00
yugui 275a9dcb8c * Makefile.in (RBCONFIG): Moved from common.mk in order to use the
variable in Makefile.in.

* win32/Makefie.sub (RBCONFIG): Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-04 11:19:19 +00:00
usa 9848f0d0ca * win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()
and renamed from rb_w32_readdir_with_enc().
  [ruby-core:24864] [Feature #1927]

* dir.c (READDIR): follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:06:17 +00:00
nobu a0f7f36a5a mkmf.rb: each_compile_rules
* lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for
  each VPATH elements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:19:49 +00:00
usa 79d42a8831 * README: mention about README.win32.
* win32/README.win32: small changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 16:01:51 +00:00
nobu 6a858bc109 Makefile.sub: fix r37821
* win32/Makefile.sub (DLNOBJ): missing in r37821.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26 03:11:12 +00:00
usa f317a1562e * common.mk, win32/Makefile.sub (probes.dmyh): now be made in current
(=build) directory if build from the repository.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-22 12:49:59 +00:00
usa 8e8d7bb7fc * common.mk, Makefile.in, win32/Makefile.sub (.dmyh.h): nmake merges
explicit rules for same target, but not merges exlicit rules and
  implicit rules -- always explict rules win.  So, need to add an
  explist rule for probes.h.
  reported by Heesob Park at [Bug #7421] [ruby-core:49839]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-22 09:16:48 +00:00
usa 0c3d96756a * win32/win32.c (rb_w32_read): Windows 8 fixed one of a bug of console
API.
  based on the patch by Heesob Park at [ruby-core:49479] [Bug #7379]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20 03:07:23 +00:00
nobu a824a6187d common.mk: no purelib
* common.mk (RUBYLIB): purelib option in runruby.rb is deprecated
  since r28841, so set to an empty list to get rid of a bogus path in
  child processes, which caused an insecure operation exception in
  test/ruby/test_encoding.rb:test_unsafe.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 07:08:13 +00:00
usa 3918bbfac4 * Makefile.in, common.mk (probes.h): moved to common.mk and changed to
see $(srcdir).

* common.mk (probes.dmyh): now created it on $(srcdir) always.

* win32/Makefile.sub (.SUFFIXES): removed common suffix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-19 05:56:38 +00:00
luislavena 55915036a6 Swap logic around wildcard character detection
* win32/file.c (replace_to_long_name): correct logic around wildcard
  characters detection and ensure wide-chars are used as pattern.
  [ruby-core:49451] [Bug #7374]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-17 17:53:21 +00:00
luislavena 6285597653 Skip path expansion for all wildcard characters
* win32/file.c (replace_to_long_name): skip expansion for all wildcard
  characters.
  [ruby-core:49451] [Bug #7374]

* test/ruby/test_file_exhaustive.rb: add more assertions to test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-17 12:46:17 +00:00
luislavena 25058a58a2 skip long name conversion if last character is a wildcard one
* win32/file.c (replace_to_long_name): skip automatic path expansion
  when wildcard character is used.  [ruby-core:49451] [Bug #7374]

* test/ruby/test_file_exhaustive.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 22:43:22 +00:00
nobu eb40d20e30 probes.h: select by suffix rules
* Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
  select generating with dtrace or copying dummy file by suffix rules.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 15:22:37 +00:00
nobu 620a2b6c65 Makefile.in: probes.h
* Makefile.in, win32/Makefile.sub (probes.h): fix copying dmyprobes.h
  path when outplace-build.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 06:42:38 +00:00
naruse db31b3dad5 * common.mk (dmyprobes.h): always create for make dist.
* Makefile.in (probes.h): create or copy dmyprobes.h

* win32/Makefile.sub: only do copy dmyprobes.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13 07:49:09 +00:00
usa aec93c2283 * common.mk Makefile.in win32/Makefile.sub (.d.h): it's not common.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13 06:35:30 +00:00
usa 8e72bb717a * win32/README.win32: added mention about build directory. currently
we can not build ruby in win32 directory.  this problem is reported
  by Masahiro Kitajima <katonbo@katontech.com>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-13 03:32:06 +00:00
usa 198b740019 * win32/mkexports.rb (each_export): skip garbages generated by VS2012's
nmake.
  reported and patched by Yoshida Masato at [Bug #7333] [ruby-dev:46484]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-12 05:29:52 +00:00
usa acd82f6e24 * win32/win32.c (has_redirection): should use shell (cmd.exe) when
the commandline containts '&'.
  reported by Roger Pack at [ruby-core:47912] [Bug #7143], and
  patched by Heesob Park at [ruby-core:47931].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 08:50:55 +00:00
nari 8d53a08ed8 * gc.c: Use the non-recursive marking instead of recursion. The
recursion marking of CRuby needs checking stack overflow and the
  fail-safe system, but these systems not good at partial points,
  for example, marking deep tree structures. [ruby-dev:46184]
  [Feature #7095]

* configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
  checking stack overflow of marking.

* win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 12:30:21 +00:00
nobu ad2e34c670 win32/file.c: simplify
* win32/file.c (rb_file_expand_path_internal): simplify a condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-05 05:29:44 +00:00
nobu f961b80a78 win32/file.c: prototype and cosmetic changes
* win32/file.c (home_dir, system_code_page): use prototype, adjust
  indent, and fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-05 05:29:41 +00:00
usa 234378d8bb * win32/Makefile.sub (Makefile): make to depend on common.mk, to
stop and force to re-run make process when common.mk is changed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-28 00:27:21 +00:00
luislavena 3d8d595932 Remove incorrectly committed timestamp file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-24 03:48:11 +00:00
luislavena 86df08dac6 Improve require/File.expand_path performance on Windows
* configure.in (mingw): add shlwapi to the list of dependency
  libs for Windows.
* win32/Makefile.sub (EXTSOLIBS): ditto.

* internal.h: declare internal functions rb_w32_init_file,
  rb_file_expand_path_internal and rb_file_expand_path_fast.

* file.c (Init_File): invoke Windows initialization rb_w32_init_file

* win32/file.c (rb_file_load_path_internal): new function.
  Windows-specific implementation that replaces file_expand_path.
  [Bug #6836][ruby-core:46996]

* win32/file.c (rb_w32_init_file): new function. Initialize codepage
  cache for faster conversion encodings lookup.

* file.c (file_expand_path): rename to rb_file_expand_path_internal.
  Conditionally exclude from Windows.

* file.c (rb_file_expand_path_fast): new function. delegates to
  rb_file_expand_path_internal without performing a hit to the
  filesystem.

* file.c (file_expand_path_1): use rb_file_expand_path_internal without
  path expansion (used by require).
* file.c (rb_find_file_ext_safe): ditto.
* file.c (rb_find_file_safe): ditto.

* load.c (rb_get_expanded_load_path): use rb_file_expand_path_fast.
* load.c (rb_feature_provided): ditto.

* file.c (rb_file_expand_path): use rb_file_expand_path_internal with
  path expansion.
* file.c (rb_file_absolute_path): ditto.

* test/ruby/test_file_exhaustive.rb: new tests to exercise
  rb_file_expand_path_internal implementation and compliance with
  existing behaviors.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-24 03:44:56 +00:00
usa 44a7c87076 * win32/Makefile.sub: refactoring. remove unused rules, and update
some rules which are not used usually to fit current macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 10:18:23 +00:00
usa 742a0d164e * win32/configure.bat: added help message of --with(out)?-ext.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 03:33:53 +00:00
usa 7370aa3126 * win32/configure.bat: support --with(out)?-ext(ensions) options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 03:30:58 +00:00
usa 68c09dec0e * win32/Makefile.sub (scriptbin.mk): no need to include twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 05:29:42 +00:00
usa cb4e2b590e * win32/win32.c (check_valid_dir): reject "..." as directory name.
[Bug #6851]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-14 07:05:12 +00:00
shirosaki dcd7f09be2 Optimize winnt_stat
* test/ruby/test_file_exhaustive.rb
  (TestFileExhaustive#test_stat_special_file): add a test.
  GetFileAttributesExW fails to get attributes of special files
  such as pagefile.sys.

* win32/win32.c (check_valid_dir): for performance, check the path
  by FindFirstFileW only if the path containts "..."

* win32/win32.c (winnt_stat): use GetFileAttributesExW instead of
  FindFirstFileW since GetFileAttributesExW is faster.
  Based on the patch by Dusan D. Majkic.
  [ruby-core:47083] [Feature #6845]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-09 11:34:48 +00:00
nobu f9368f65b1 win32.c: rb_w32_inet_ntop should be const
* win32/win32.c (rb_w32_inet_ntop): type should be const.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29 14:56:52 +00:00
shirosaki 21aad667a5 win32/win32.c: suppress warning redeclared
* win32/win32.c: suppress warning redeclared on mingw64.
  *_s functions are declared if MINGW_HAS_SECURE_API is defined.
  Follow up r36556.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-28 21:41:37 +00:00
shirosaki ce2a1e109c win32/win32.c: fix localtime_r() on x64-mingw
* win32/win32.c (gmtime_r): use _gmtime64_s() with x86_64-w64-mingw32.

* win32/win32.c (localtime_r): use _localtime64_s() with
  x86_64-w64-mingw32. Since FileTimeToSystemTime() seems not work with
  large value under x64. Mingw-w64 doesn't have these declaration.
  [ruby-core:46780] [Bug #6794]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-28 07:36:51 +00:00
usa 3f539a5b59 * win32/mkexports.rb: should not export DllMain().
reported by luis at [ruby-core:46743] [Bug #6790], solved by
  Heesob Park, and confirmed by nobu.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-27 03:14:49 +00:00
usa 8122db83ce * win32/win32.c (rb_w32_socket, rb_w32_socketpair): remember the family
in the high word of socklist value.

* win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, setfl): follow
  above changes.

* win32/win32.c (rb_w32_getsockname): set remembered family to the
  argument when OS's function fails.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-24 06:05:29 +00:00
nobu fbee46fe66 enc/Makefile.in: TARGET_NAME TARGET_ENTRY
* enc/Makefile.in (TARGET_NAME, TARGET_ENTRY): needed for EXTDLDFLAGS
  on some platforms.  [ruby-core:46600] [Bug #6768]
* enc/depend: no longer needs tweaking DLDFLAGS for TARGET names.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-23 14:58:42 +00:00
usa 2e5dcb53ce * win32/win32.c (win95_stat): remove unnecessary macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-09 08:38:19 +00:00
usa 9d2711691e * win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omit Win9x
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-07-09 08:25:06 +00:00
nobu 3fceaf10ab make runnable
* common.mk (runnable): make symbolic links to run in build directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 02:16:08 +00:00
usa f047b1f0dc * win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.
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 04:29:38 +00:00
usa 4c3e402cda * win32/win32.c (rb_w32_close): of course, console handle is not socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-06 04:18:53 +00:00
nobu 07e222d720 no windows dialog
* 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-04 12:54:00 +00:00
nobu 82aa43407c win32: VT100 escape
* 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-06-04 06:39:40 +00:00
usa 87c8c5edf4 * win32/win32.c (finish_overlapped_socket, overlapped_socket_io):
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-23 01:21:33 +00:00
nobu a906a9d9be Bug #6462: EXTSOLIBS
* Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.
* ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
  of discard libraries needed by default.  [Bug #6462]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-20 03:25:14 +00:00
yugui 76bc2d1ed7 Imports Ruby's port to NativeClient (a.k.a NaCl).
Patch by Google Inc. [ruby-core:45073].

* configure.in (RUBY_NACL): New M4 func to configure variables for
  NaCl.
  (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
  of Pepper interface types.
  (BTESTRUBY): New variable to specify which ruby should be run on
  "make btest". NaCl can run the built binary by sel_ldr, but it need
  rbconfig.rb. So this variable is distinguished from $MINIRUBY.
  
* thread_pthread.c: Disabled some features on NaCl.

* io.c: ditto.

* process.c: ditto.

* signal.c: ditto.

* file.c: ditto.

* missing/flock.c: ditto.

* nacl/pepper_main.c: An example implementation of Pepper application
  that embeds Ruby.

* nacl/example.html: An example of web page that uses the Pepper
  application.

* nacl/nacl-config.rb: Detects variants of NaCl SDK.

* nacl/GNUmakefile.in: Makefile template for NaCl specific build
  process.

* nacl/package.rb: script for packaging a NaCl-Ruby embedding
  application. 

* nacl/reate_nmf.rb: Wrapper script of create_nmf.py

* dln.c (dln_load): Added a hack to call on NaCl.

* util.c (ruby_getcwd): Path to the current directort is not available
  on NaCl.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-17 02:48:59 +00:00
shirosaki 5ccee663e9 * include/ruby/win32.h (FD_SET): change function to macro.
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-05-08 12:47:25 +00:00
nobu c327407bdc distclean verconf.h
* Makefile.in, win32/Makefile.sub (distclean-local): another generated
  header.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-03 16:57:51 +00:00
usa 24f00be686 * win32/win32.c (waitpid): need to check the return value of
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-24 08:05:25 +00:00
usa ee8c98e5cc * win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):
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-23 11:47:02 +00:00
usa ab649ef3c4 * win32/file.c (INVALID_FILE_ATTRIBUTES): commit miss of r35384.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18 05:50:45 +00:00
nobu f2979f3101 * win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrant
versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16 07:22:43 +00:00
nobu 72fffe5cee * configure.in (RUBY_MSVCRT_VERSION): define on mingw too.
* 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-16 07:08:27 +00:00
nobu 57fb219905 * reduce UNREACHABLE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-15 00:06:13 +00:00
nobu d2e2b309e8 * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code
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 03:55:06 +00:00
drbrain e95f7ea80d * variable.c (trace_ev): Removed "not reached" comment as this line is
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-14 00:36:26 +00:00
nobu 3ed259abbc * win32/win32.c (isUNCRoot, winnt_stat): support long UNC.
[ruby-core:30623][Feature #3399]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-09 14:10:32 +00:00
shirosaki 42109a02f0 * include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
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 14:10:30 +00:00
shirosaki fc83ebb037 * test/ruby/test_thread.rb
(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-04-07 14:10:25 +00:00
nobu 61dc4a8dbc * configure.in (verconf.h): separate load path specific stuff from
config.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-27 13:44:25 +00:00
nobu c2d7776f85 * win32/Makefile.sub: fix config.h path to include.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-27 13:43:43 +00:00
kazu 35259b72f2 * win32/win32.c (check_if_dir): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-27 08:27:19 +00:00
nobu ddc7bcd60e * win32/Makefile.sub (newline.c, miniprelude.c): search from source
directory, not depending on VPATH.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-26 05:08:55 +00:00
nobu 7a0d81eaa2 * win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++
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 04:51:27 +00:00
nobu b83ad31c43 * win32/win32.c (rb_w32_open, rb_w32_wopen): check if the file is a
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-26 02:41:04 +00:00
nobu ff075693c9 * win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME
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-22 10:55:11 +00:00
nobu 3175fbf194 * win32/Makefile.sub: put an empty line between stub and script.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 10:45:05 +00:00
usa fcaee4bd64 * win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API to
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-03-15 03:57:02 +00:00
nobu 29c630e71d * win32/makedirs.bat: new command to make intermediate
directories, and not to report any errors if the directory
  already exists.
* win32/Makefile.sub (MAKEDIRS): enable command extensions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-01 06:40:09 +00:00
usa 31eb29fe97 * win32/Makefile.sub (MAKEDIRS): use mkdir of cmd.exe instead of ruby.
[Bug #6103] [ruby-core:43012]

* win32/README.win32: added a notice about command extension of cmd.exe.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-29 07:13:04 +00:00
nobu fc493491fe fix indent
* win32/file.c (rb_file_load_ok): fix indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-29 04:07:08 +00:00
nobu afa7b27e8b clean-platform
* Makefile.in, win32/Makefile.sub (clean-platform): use macro instead
  hardcoded path names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-29 04:07:03 +00:00
shirosaki 4b1e9f0c47 * Makefile.in (PLATFORM_DIR): add a variable for `win32` directory.
* Makefile.in (clean-platform): add new target.
  It cleans `win32` directory.

* common.mk (clean): add a dependency for `win32` directory.
* common.mk (distclean): ditto.
* common.mk (distclean-platform): add new target.
  It cleans `win32` directory.
* common.mk ($(PLATFORM_D)): add new target to make `win32` directory.
* common.mk (win32/win32.$(OBJEXT)): move win32.o into `win32`
  directory.
* common.mk (win32/file.$(OBJEXT)): add new target for win32/file.c.

* configure.in: move win32.o into `win32` directory and add
  win32/file.o to MISSING.

* file.c (file_load_ok, rb_file_load_ok): replace static
  file_load_ok() with public rb_file_load_ok().
  It's to link Windows implementation in win32/file.c.
* file.c (rb_find_file_ext_safe): ditto.
* file.c (rb_find_file_safe): ditto.

* win32/file.c (rb_file_load_ok): new file. Add Windows specific
  optimized implementation of rb_file_load_ok(). We created a
  separated file to avoid too many #ifdef macro which is unreadable.

* win32/Makefile.sub (PLATFORM_DIR): add a variable for `win32`
  directory.
* win32/Makefile.sub (MISSING): move win32.obj into `win32`
  directory and add win32/file.obj to MISSING.
* win32/Makefile.sub (MAKEDIRS): replace MINIRUBY with BASERUBY.
  It's because miniruby doesn't exist when making `win32` directory.
* win32/Makefile.sub (clean-platform): add new target to clean `win32`
  directory.
* win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
  win32/file.c to build properly.
* win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
 `win32` directory.

  Patch created with Luis Lavena.
  [ruby-core:42480] [Feature #5999]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-28 15:51:25 +00:00
shirosaki a65f6649dd * win32/win32.c (rb_w32_read): fix an issue that $stdin.read doesn't
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 00:51:43 +00:00
shirosaki bb65920642 * test/ruby/test_thread.rb
(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-28 00:51:40 +00:00
nobu 688d00d23b * win32/win32.c (rb_chsize): no need to get the current file size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-16 02:22:47 +00:00
usa cef30c7a41 * win32/win32.c (check_valid_dir): strict checking of root.
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-05 06:29:31 +00:00
usa 79e0379a75 * win32/win32.c (check_valid_dir): special case for a root directory.
Reported by Masateru OKAMOTO at [Bug #5819].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-04 02:33:37 +00:00
usa 3fbc62445e * common.mk,Makefile.in,win32/Makefile.sub (ECHO1): move platform
specific hack from common.mk to Makefile.in (and win32/Makefile.sub).
  [Bug #5711]

* lib/mkmf.rb: we can generate Makefile as we like.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14 11:02:00 +00:00
usa 0c6103cf50 * win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.
* 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-14 10:38:12 +00:00
luislavena f9a6a1dd0c Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline 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-12-04 01:10:06 +00:00
nobu 9fe88af9ef * win32/win32.c (rb_w32_inet_ntop): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-29 00:51:40 +00:00
usa 2d6a401ecf * include/ruby/win32.h, win32/win32.c (GetCurrentThreadHandle): remove
unused old API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28 03:33:10 +00:00
usa 70edc47dca * win32/mkexports.rb (Exports#initialize): remove old symbol name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28 03:29:56 +00:00
nobu b038172348 * win32/mkexports.rb (Exports#read_substitution): need to read
from subst.h too.  [Bug #5675]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28 03:15:31 +00:00
usa 61b3acd568 * win32/{Makeilfe.sub,win32.c} (FILE_COUNT, FILE_READPTR): move the
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 01:23:49 +00:00
usa 5bc28059b0 * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898]
* 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-28 00:33:18 +00:00
usa 6904c66257 * win32/win32.c (_pioinfo): need to declare _pioinfo() before using
_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 09:08:34 +00:00
nobu 083b923ea8 * win32/win32.c (_pioinfo): make an inline function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-22 08:49:47 +00:00
nobu 18b520443c * win32/win32.c (dupfd): argument of _osfhnd and so on should not
have side effect.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-22 02:34:00 +00:00
usa 44cff77b95 * io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it is
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-18 04:06:01 +00:00
usa 572e4807e6 * win32/win32.c (unixtime_to_filetime): should check the return value
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-09 07:43:08 +00:00
usa 3e6ea9306c * win32/configure.bat: disable delayed expansion of enironment variable.
[Bug #5517] [ruby-core:40531]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-03 19:55:43 +00:00
nobu ac46d76ce8 * thread.c (rb_fd_rcopy): suppress warnings on mingw32.
* 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-11-03 13:50:55 +00:00
usa b2a1af1547 * win32/win32.c (setfl): extract from fcntl().
* 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-31 04:16:11 +00:00
arton 195fbd18d6 * win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010. [Bug #5243]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-29 12:08:47 +00:00
usa 402c8cf9d1 * win32/win32.c (socklist_insert, socklist_lookup, socklist_delete):
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-10-20 13:55:31 +00:00
tarui e2b7469698 * win32/Makefile.sub (INSNS): change command line option -Ks to -Ku
for generate *.inc. because insns.def encoding has been changed SJIS
	  to UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128] 
	  (same as r33194)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06 12:16:44 +00:00
nobu 69dff899a0 * win32/win32.c (rb_w32_fd_copy): cast explicitly to suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02 21:23:22 +00:00
usa 800081d0c8 * win32/win32.c (rb_w32_select_with_thread): and my typo. we all must
be more careful.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 15:51:13 +00:00
usa ee7d523631 * win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement
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-30 15:04:11 +00:00
nobu cb40b39a2f * win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_
and _threadptr_ functions, as well as mingw.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-16 09:52:10 +00:00
usa 1adf7962be more clarified the license.
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-05 11:31:52 +00:00
naruse d7c026d058 Mark a code is GPL or not.
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-08-03 15:40:03 +00:00
yugui 53d3b13233 Forwardports r32772 and r32773 from branches/ruby_1_9_3 to trunk.
* common.mk (ECHO1): ":" in a make variable replacement cause a syntax
  error with /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

* configure.in (NULLCMD): new check.

* Makefile.in (NULLCMD): Reflects checking in configure.

* win32/Makefile.sub (NULLCMD): new assignment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-31 11:31:55 +00:00
usa 5a7a4ce48d * win32/win32.c (is_socket, is_console): add prototypes to fix compile
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 18:22:42 +00:00
usa f15d0deaaf * win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed
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-15 05:33:45 +00:00
usa edeba4dbe6 * win32/setup.mak: support x86-amd64 cross compile environment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 02:59:11 +00:00
nobu 63ab190151 * win32/win32.c (rb_w32_{read,write}): should be signed.
Bug #5001

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-09 06:59:23 +00:00
nobu dd2dfc71e7 * common.mk (RUN_OPT): disable gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 23:39:42 +00:00
usa fc22563658 * win32/win32.c (wunlink): reverted a part of r32426. it was mistakenly
mixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 05:41:52 +00:00
usa b4582e79d7 * win32/Makefile.sub (config.h): define GC_MARK_STACKFRAME_WORD.
fixed build problem of r32438.  the value (30) is temporary value.
  maybe it's enough by 20~24 according to my observation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 05:36:57 +00:00
usa b76263fa09 * win32/win32.c (kill): check the process exited or not before
teminationg it. [Bug #4943]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-06 15:43:38 +00:00
usa a8bdd28d10 * thread.c (do_select): Windows: no need to poll if select(2) is
cancelable.

* thread_win32.c (native_fd_select): new function to make select(2)
  cancelable.

* thread_win32.c (rb_w32_check_interrupt): new function for checking
  interrupt.

* win32/win32.c (rb_w32_select_with_thread): new function. cancelable
  select(2).

* win32/win32.c (rb_w32_select): use above function internally.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-15 18:04:13 +00:00
usa ac3a3c05c9 * configure.in, win32/Makefile.sub (RUBY_SO_NAME): add CPU as prefix
of RUBY_SO_NAME on x64/ia64 mswin/mingw.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-16 02:22:27 +00:00
kosaki 2b7996e839 * include/ruby/intern.h: remove rb_fd_copy() to rb_fd_dup() and
rb_w32_fdcopy() to rb_w32_fd_dup().
* win32/win32.c: ditto.
* thread.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 14:51:09 +00:00
kosaki 887063f44b fix mswin32 build error.
* missing/setproctitle.c: oadd #ifdef HAVE_UNISTD_H.
* win32/Makefile.sub (MISSING): add setproctitle.obj



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14 16:01:28 +00:00
usa 425b30bc78 * win32/win32.c (rb_w32_select): check invalid handle before doing
select operations.  see [ruby-dev:43513], [ruby-dev:43535]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-13 06:24:36 +00:00
nobu ab8e05cc45 * win32/win32.c (rb_w32_fdcopy): suppress a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-02 19:27:56 +00:00
nobu 7694c34157 * win32/win32.c: remove trailing spaces and no-cuddle "else".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-02 19:05:03 +00:00
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
kosaki c6e6380665 * win32/setup.mak (USE_RUBYGEMS): fixed r30835. It didn't work on
mswin32 port. If you changed win32/configure.bat, you should change
  setup.mak too.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-14 09:49:56 +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
nobu 020dc4ba60 * configure.in (rubygems): add --disable-rubygems option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-11 03:03:26 +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
usa 377b85f2cb * configure.in, win32/Makefile.sub (RUNRUBY): require path should
include "." because rbconfig.rb is there.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14 02:37:34 +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
kosaki 962b75384e git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2010-12-30 11:21:54 +00:00
nobu 3a28aaaa3a * win32/rm.bat: remove duplicated line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-29 11:33:54 +00:00
nobu 0dfd81cb23 * win32/Makefile.sub (clean-enc): pass V to inferior make.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-29 11:27:36 +00:00
kosaki 0585d81d51 * win32/configure.bat: Remove obsoleted conding rule. Now, we
don't support to build on Windows 95/98.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27 11:42:21 +00:00
usa ea7158919f * win32/README.win32: note to need NT based OS to build ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27 06:23:19 +00:00
nobu aefc03ba1e * win32/rmall.bat: property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27 01:49:36 +00:00
kosaki 205cc6c068 * win32/Makefile.sub: suppress a strange error message when RMALL
found no such file.
	* win32/rmall.bat: new.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26 14:10:41 +00:00
kosaki 43b4bae567 * win32/Makefile.sub: fix 'nmake clean-enc' breakage since r28322.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26 13:46:02 +00:00
usa c5d383bae1 * win32/setup.mak (BASERUBY): quit with an error when BASERUBY was not
able to set, just like configure.in does. [ruby-dev:42782]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-17 04:29:16 +00:00
usa b9b26300da * win32/{configure.bat,setup.mak,Makefile.sub} (PROGRAM_PREFIX,
PROGRAM_SUFFIX): unite the differences of the names of macros of
  prefix and suffix.
  reported by HANEDA Norikatsu. [ruby-dev:42775]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-16 10:55:11 +00:00
nobu e806b0fed7 * configure.in, win32/Makefile.sub (WERRORFLAG): flag to treat
warnings as errors.
* lib/mkmf.rb (Logging.postpone): yield log file object.
* lib/mkmf.rb (xsystem): add options, :werror only right now.
* lib/mkmf.rb (with_werror): check as if warnings are errors.
* lib/mkmf.rb (convertible_int): make declaration conflict
  warnings errors not to pass wrong type.  [ruby-dev:42684]
* lib/mkmf.rb (COMMON_MACROS): get rid of conflicts.
* win32/Makefile.sub (WARNFLAGS): make declaration conflict
  warnings errors if possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06 23:00:47 +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 eb702efcfa * win32/Makefile.sub (RCFLAGS): VC10 and after only. fixed the problem
of r30015. [ruby-core:33530]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-03 03:56:21 +00:00
usa 2f1a781e85 * win32/Makefile.sub (RCFLAGS): -nologo switch is only available in
newer versions of rc.exe. fixed the problem of r30012.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 14:06:54 +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 173f69146c * win32/Makefile.sub (rc): suppress meaningless message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-02 01:20:36 +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 f0a2b08b44 * win32/Makefile.sub (scriptbin.mk): fix generated rules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29 13:53:16 +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 e7fbb33c91 * win32/Makefile.sub (insns_rules.mk): remove extra backslash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-19 14:05:50 +00:00
nobu 83e274d46d * cygwin/GNUmakefile.in, win32/Makefile.sub (clean): rc files are
made at compile time, so should be removed by clean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-19 13:44:06 +00:00
nobu 7ae23d32c2 * win32/Makefile.sub (scriptbin): create script binaries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-18 14:56:34 +00:00
nobu 7afe174b9e * win32/configure.bat: remove quotes from arguments to be quoted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17 14:19:24 +00:00
nobu 4fc08fd17d * lib/mkmf.rb (create_makefile): use forward slashes in messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17 14:17:26 +00:00
nobu 023eab5201 * win32/Makefile.sub (MAKEDIRS): should not include silent flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17 09:38:38 +00:00
nobu 261903223a * win32/setup.mak (-basic-vars-, -runtime-): suppress trailing
space and compiler command line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-13 23:48:12 +00:00
nobu 223c0b48a1 * common.mk (showflags, help): emit messages at once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-13 07:38:01 +00:00
nobu c37066fab7 * win32/Makefile.sub (MSG, EOM): remove surrounding quotes by %~I.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-13 07:26:16 +00:00
arton 89616d6fe3 win32/Makefile.sub: remove useless 'ECHO is <ON>' message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-12 16:38:44 +00:00
arton f4c98c3e10 win32/Makefile.sub: reoreder varialbe EOM (don't display it)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-12 16:31:59 +00:00
nobu fe2295ea75 * common.mk (showflags, help): use caret to quote leading spaces on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-12 11:52:45 +00:00
nobu fd7c0279f8 * Makefile.in, common.mk, cygwin/GNUmakefile.in, enc/depend,
ext/ripper/depend, lib/mkmf.rb, win32/Makefile.sub: caddle up.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-12 11:51:42 +00:00
usa 7b109f1772 * win32/setup.mak: use findstr.exe instead of find.exe, because all
target build platforms should have findstr.exe, and, find.exe often
  means another command such as cygwin's.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-12 01:00:39 +00:00
nobu 5937e8d5d6 * win32/Makefile.sub: shorten messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 15:31:59 +00:00
nobu 32bd439f76 * win32/Makefile.sub (config.h): need PRI_LL_PREFIX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 15:30:24 +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
nobu 18bd7f8c84 * configure.in (SYMBOL_PREFIX): separate from EXPORT_PREFIX.
* win32/mkexports.rb (Exports#each_export): use SYMBOL_PREFIX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-11 11:45:32 +00:00
nobu 536e266e58 * cygwin/GNUmakefile.in (scriptbin): make executable file from
scripts with stub.
* ruby.c (load_file_internal): assume xflag for exe file as well
  as no-shebang file.
* tool/rbinstall.rb: install script programs.
* win32/mkexports.rb (Exports#initialize): alias ruby_sysinit for
  stub.
* win32/stub.c: stub for scripts.  [EXPERIMENTAL]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-09 22:20:12 +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
nobu d78e20912f * win32/Makefile.sub (ruby_pc): ignore missing variables.
* template/ruby.pc.in: add missing variables for mswin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-30 02:33:59 +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 749ad16aa7 * common.mk (pkgconfig-data): moved from Makefile.in.
* tool/rbinstall.rb: install pc file only if non-empty.
  [ruby-core:32901] #3983

* win32/Makefile.sub (ruby_pc): create pc file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-26 03:47:15 +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
nobu a1d7e69106 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2010-10-08 01:52:37 +00:00
nobu 0dd56a828e * cygwin/GNUmakefile.in, win32/Makefile.sub (RCFILES): depend on
real config.rb file.  [ruby-core:32709]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-07 09:10:47 +00:00
wanabe 349c3c7a8c * win32/mkexports.rb: revert r29320 and r29402.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-05 13:20:49 +00:00
wanabe a21409ff5f * tool/config.sub: revert r29320, r29324, r29347, r29354, r29365
to automake-1.11.1. [ruby-core:32634]

* win32/mkexports.rb: no longer use 'mingw64'. a patch from Luis Lavena
  at [ruby-core:32678].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-03 15:06:23 +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
wanabe d06f38c6b9 * tool/config.sub: add mingw64.
* win32/mkexports.rb (Exports::Mingw64): added.

* win32/mkexports.rb (Exports::Mingw32): renamed from Exports::Mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-23 09:59:38 +00:00
yugui 4a028d2c7e * common.mk (clean): removes all documents on cleaning.o
(CAPIOUT): new variable.
  (clean-capi, distclean-capi, realclean-capi): new targets

* Makefile.in (clean-capi, distclean-capi, realclean-capi): ditto.

* win32/Makefile.sub (clean-capi, distclean-capi, realclean-capi): 
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-19 13:10:25 +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
nobu f2ff3eb6ec * configure.in: read API version from include/ruby/version.h.
* {bcc,win}32/setup.mak (-version-): ditto.

* version.h (RUBY_LIB_VERSION): use API version numbers.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-24 01:11:14 +00:00
nobu 966532cc40 * Makefile.in, win32/Makefile.sub (test-rubyspec-precheck): split
from test-rubyspec.

* common.mk (test-rubyspec): moved from Makefile.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 03:29:08 +00:00
nobu b496cd64e5 * win32/Makefile.sub: needs stddef.h for size_t. a patch from
Akio Tajima at [ruby-dev:41905].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 08:27:34 +00:00
nobu 195a7da4ec * configure.in (config.h): add include guard.
* win32/Makefile.sub, bcc32/Makefile.sub (config.h): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 09:18:21 +00:00
nobu 967e3a3598 * configure.in (enable-debug-env): option for RUBY_DEBUG env.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-26 04:07:20 +00:00
nobu 1d408c933a * Makefile.in, common.mk (clean-ext, clean-enc): clean up cleaning
targets.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-14 17:32:03 +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
nobu 6c05f91b3b * dln.c (rb_w32_check_imported): check if extension library to be
loaded imports from different ruby dll.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-16 06:09:40 +00:00
usa 720151bc63 * win32/Makefile.sub: link with ffs.obj.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-13 00:45:48 +00:00
usa fe0d339c2c * win32/win32.c, include/ruby/win32.h (rb_w32_has_cancel_io): new
function.

* io.c (WAIT_FD_IN_WIN32): check only when it's not cancelable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-10 05:02:44 +00:00
nobu 2c01a07bf4 * ext/etc/etc.c (etc_systmpdir): moved from ext/tmpdir.
* ext/etc/etc.c (etc_sysconfdir): added.

* lib/rubygems/config_file.rb, lib/tmpdir.rb: use etc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08 03:25:17 +00:00
nobu 0f7321eddf * README: update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06 03:12:28 +00:00
wanabe a8209ffcc7 * win32/win32.c: add declaration of wstati64 for gcc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 21:45:33 +00:00
usa 6c28f99d88 * merge some patches from win32-uncode-test branch.
see #1685.

* file.c, include/ruby/intern.h (rb_str_encode_ospath): new function
  to convert encoding for pathname.

* win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename,
  rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir,
  rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to
  accept UTF-8 path.

* win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime,
  rb_w32_unlink): use WCHAR path internally.

* file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype,
  chmod_internal, rb_file_chmod, rb_file_chown, utime_internal,
  rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version
  functions on Win32.

* file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p,
  rb_file_readable_p, rb_file_writable_p, rb_file_executable_p,
  check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown,
  rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call
  rb_str_encode_ospath() before passing the path to system.

* io.c (rb_sysopen): ditto.

* dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 17:56:23 +00:00
usa 47f35969e0 * win32/Makefile.sub (config.h): define some constants to select
collect code for win64.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29 15:54:18 +00:00
usa b6847f7acc * win32/win32.c (rb_w32_wopen): shouldn't use FILE_FLAG_OVERLAPPED with
normal file.  #1807, #2510, #2549


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 16:49:39 +00:00
usa 727371f88a * include/ruby/win32.h: check definition existance before defining
errno macros.

* win32/win32.c (errmap): define winsock errors mappings.
  these are VC++10 support. see [ruby-core:29278]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 05:58:07 +00:00
usa 54da3ecbcb * include/ruby/win32.h, win32/win32.c (EWOULDBLOCK): VC10 already
defined EWOULDBLOCK.  based on a patch from Charlie Savage,
  see [ruby-core:29255]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-05 04:26:33 +00:00
usa f1c86c1bb2 * win32/mkexports.rb (each_export): VC10 support.
a patch from Charlie Savage in [ruby-core:29254]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-05 04:09:45 +00:00
naruse b919cb1d93 * include/ruby/ruby.h: replace snprintf and vsnprintf by
ruby_snprintf and ruby_vsnprintf. [ruby-dev:40909]

* configure.in: don't check snprintf(3) and vsnprintf(3).

* include/ruby/missing.h: don't delare snprintf and vsnprintf.

* include/ruby/ruby.h: include stdarg.h.

* sprintf.c: include vsnprintf.c

* vsnprintf.c: renamed from missing/vsnprintf.c.

* vsnprintf.c: remove useless ifdefs.

* win32/mkexports.rb: use ruby_snprintf and ruby_vsnprintf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-04 01:10:53 +00:00
usa c78dbcd131 * win32/win32.c (init_env): wrong calculation of the head of setenv
string.  [ruby-core:29216]
  a patch from Heesob Park in [ruby-core:29218]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02 02:57:05 +00:00
nobu b3a039a2cb * win32/win32.c (rb_w32_{read,write}): fix handle leaks. based on
a patch from Heesob Park in [ruby-core:28919].  [ruby-core:28833]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-25 05:50:08 +00:00