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

879 Коммитов

Автор SHA1 Сообщение Дата
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