* win32/Makefile.sub (config.h): __FUNCTION__ is available at least
VC9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c (get_user_from_path): add internal function that retrieves
username from supplied path (refactored).
* win32/file.c (rb_file_expand_path_internal): refactor expansion of user
home to use get_user_from_path and cover dir_string corner cases.
[ruby-core:53168] [Bug #8034]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c (rb_file_expand_path_internal): Expand home directory when
used as second parameter (dir_string). [ruby-core:53168] [Bug #8034]
* test/ruby/test_file_exhaustive.rb: add test to verify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/Makefile.sub (config.status): set MAKEDIRS to use
makedirs.bat.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (set_env_val): get rid of intger overflow warning by
VC 11.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (set_env_val): reuse size of typedef to suppress
unused-local-typedefs warnings from gcc 4.8 and reduce same
calculation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/Makefile.sub (config.status): site and vendor directories
should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* 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
* 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
* 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
* 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
* 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
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
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
* 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
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
* 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
* 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
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
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
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
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
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
* 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
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
* 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
* 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
* 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
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
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
* 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
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
* 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
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
* 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
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
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
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
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
* 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
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
(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
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
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
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
* 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
(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
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
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
* 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
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
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
* 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
_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
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
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
* 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
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
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
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
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
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
* 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
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
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
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
* 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