usa
a93b36b3e5
* win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()
...
instead of calling MSVCRT's getpid().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-01 04:23:59 +00:00
usa
51cefa387c
* win32/wini32.c (LK_ERR): with overlapped I/O, LockFileEx() returns
...
ERROR_IO_PENDING if the file is locked.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-28 10:37:41 +00:00
usa
d70e9a5568
* win32/win32.c, include/ruby/win32.h (rb_w32_access): new function to
...
replace MSVCRT's access().
[ruby-core:25761]
* file.c (eaccess): workaround for recent MSVCRT is no longer needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-25 07:04:25 +00:00
usa
56e69d7109
* win32/win32.c (readdir_internal): free old temporary filename.
...
[ruby-core:24820]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-12 05:16:56 +00:00
usa
f00babd1a6
* win32/win32.c (has_redirection): need to execute shell if commandline
...
includes newline. cf. [ruby-core:24560]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 13:13:17 +00:00
usa
fe038100d9
* win32/win32.c (rb_w32_connect): return value was broken when some
...
error occurred.
[ruby-core:24234]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-03 07:30:19 +00:00
usa
87487a8c8a
* win32/win32.c (rb_w32_{open,wopen}): fixed typos. these conditions
...
mean to call runtime's open() if textmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-23 05:36:57 +00:00
usa
681dce6bfe
* win32/win32.c (WSABUF): get rid of compile error on VC9 and mingw.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 01:01:27 +00:00
usa
9dd0d27156
* win32/win32.[ch] (recvmsg, sendmsg): new functions to support recvmsg/
...
sendmsg like UNIX. these functions are experimental and not tested
well. bug reports are welcome.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21 04:38:20 +00:00
nobu
2c772139b6
* win32/win32.c (rb_w32_spawn): use original command if not found.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-23 05:32:26 +00:00
nobu
6a64e9e4ac
* win32/win32.c (rb_w32_spawn, rb_w32_aspawn): use NULL as
...
application name for batch files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-22 05:51:58 +00:00
nobu
564517840e
* win32/win32.c (rb_w32_conv_from_wstr): added.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 23:22:34 +00:00
nobu
ba1a12170b
* win32/win32.c (rb_w32_spawn, rb_w32_aspawn): omit program name
...
if actual program path is found. [ruby-core:22960]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 23:17:42 +00:00
nobu
88db4af385
* win32/win32.c (errmap): added ERROR_MOD_NOT_FOUND.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 09:25:26 +00:00
nobu
c8d40b9a3d
* win32/win32.c (init_env): set TMPDIR if none of TMPDIR, TMP,
...
TEMP is set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 04:22:38 +00:00
nobu
bf065f2e2e
* win32/win32.c (rb_w32_telldir, rb_w32_seekdir): should use long.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 04:16:56 +00:00
nobu
0032476a24
* win32/win32.c: suppress warnings. based on a patch from Charlie
...
Savage at [ruby-core:22804].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10 19:29:51 +00:00
nobu
90b0b8d437
* win32/win32.c (rb_w32_sysinit): initializes version info first.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 05:52:51 +00:00
nobu
b9e0c6ec08
* win32/win32.c (Win32System, Win32Version): moved before get_version.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 04:38:23 +00:00
nobu
f4259225d5
* win32/win32.c (rb_w32_osid): always define for binary compatibility.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05 04:21:47 +00:00
nobu
a8c4a7e44c
* win32/win32.c (init_env): keeps wide chars as wide chars.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02 03:22:14 +00:00
usa
a898f0fb4b
* io.c (sysopen_func, rb_sysopen_internal, rb_sysopen): open file
...
by UTF-16'ed filename on Windows.
* io.c (rb_file_open_generic, rb_io_s_sysopen, rb_io_reopen,
argf_next_argv): follow above change.
* io.c (rb_scan_open_args): no longer need to convert filepath here on
Windows.
* win32/wio32.c (rb_w32_wopen): new function to open file by UTF-16'ed
filename.
* win32/win32.c (rb_w32_open): call rb_w32_open().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 08:36:45 +00:00
nobu
1e5de389da
* debug.c (set_debug_option): added rtc_error option.
...
* win32/Makefile.sub (CRTDEFFLAGS): separated from DEFS.
* win32/win32.c (rtc_error_handler): ignores RTC errors unless
rtc_error debug option is given.
* win32/win32.c (rb_w32_sysinit): suppress useless CRT assertions.
[ruby-core:22116]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-16 07:46:24 +00:00
nobu
82fa04e212
* win32/win32.c (_CrtDbgReportW): prevent from false positive
...
assertions in msvcrtd. [ruby-core:22116]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-15 16:18:01 +00:00
usa
7e1050e604
* win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertion
...
when ASCII-8BIT is passed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 09:18:46 +00:00
usa
6343c99a2e
* win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function to
...
read entry with specified enc.
* win32/win32.c (readdir_internal): extract from rb_w32_opendir().
* win32/win32.c (opendir_internal): extract from rb_w32_readdir().
* dir.c (dir_read, dir_each): use new READDIR macro instead of readdir()
to pass enc for special version of readdir, such as above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 08:23:00 +00:00
nobu
209cfdcfb5
* win32/win32.c (rb_w32_write): use of cast expressions as lvalues
...
is deprecated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:01:43 +00:00
usa
41e770944e
* win32/win32.c (open_dir_handle, rb_w32_opendir, move_to_next_entry,
...
rb_w32_readdir, check_valid_dir): change backend API from A to W.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 01:59:05 +00:00
usa
7a4a31064a
* win32/win32.c (rb_w32_write): limit write size to 32KB if the file
...
seems to be console. [ruby-core:21613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 09:08:19 +00:00
usa
9e83ce20b1
* revert previous revision. it's already out-of-date.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 07:13:40 +00:00
usa
a3e8d63a75
* include/ruby/win32.h, win32/win32.c (rb_w32_is_valid_fd): new function
...
to validate fd.
* io.c (rb_io_initialize): check fd with above function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 06:55:20 +00:00
nobu
2717a2eb6e
* win32/win32.c (rb_w32_aspawn): should not escape with carret
...
unless using cmd.exe.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 04:19:28 +00:00
usa
50258b19fd
* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
...
rb_fd_init, rb_fd_term, rb_fd_zero, rb_fd_set, rb_fd_clr, rb_fd_isset,
rb_fd_select, rb_fd_ptr, rb_fd_max, HAVE_RB_FD_INIT): new type,
functions, and macros for Windows.
* win32/win32.c (extract_fd, rb_w32_select): use rb_fdset_t to expand
fd_array if needed. [ruby-core:19946]
* win32/win32.c (copy_fd): new funcion for rb_w32_select().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 07:52:22 +00:00
nobu
dea3ad3cba
* win32/win32.c (internal_cmd_match): extracted from
...
is_internal_cmd.
* win32/win32.c (argv_size, join_argv): escapes redirection, pipe
and carret punctuations with carrets.
* win32/win32.c (rb_w32_aspawn): ditto, and redirections and pipe
have no meanings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 17:21:45 +00:00
nobu
729b4a813b
* win32/win32.c (open_dir_handle): extracted from rb_w32_opendir.
...
* win32/win32.c (winnt_stat): gets rid of strange behavior of
GetFileAttributes(). [ruby-core:21269]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 07:45:31 +00:00
nobu
97826efddd
* win32/win32.c (init_env): use user profile folder than personal
...
folder.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-05 03:52:11 +00:00
usa
39c2cf2c81
* win32/win32.c (rb_w32_argv_size): if an argument is empty, it's size
...
is 2, not 0, because it will be converted to "".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 11:28:18 +00:00
nobu
7c152e7f08
* win32/win32.c (rb_w32_spawn): deals with quoted commands.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 10:51:27 +00:00
usa
12932721dc
* win32/win32.c (rb_w32_spawn): support normal commands with arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 07:50:57 +00:00
nobu
9f3b77e435
* configure.in (mingw): no longer uses snprintf and vsnprintf of
...
msvcrt.
* win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): removed.
* win32/Makefile.sub (config.h): vsnprintf exists in VC7 or later.
* win32/mkexports.rb (Exports#initialize): aliases
rb_w32_vsnprintf and rb_w32_snprintf for binary compatibility.
* sprintf.c (rb_str_format): uses snprintf instead of sprintf.
* numeric.c (flo_to_s, rb_num2long, rb_num2ll): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22 03:05:20 +00:00
nobu
7ac32d7a16
* dln.c (dln_find_1): supplements an extension for executable
...
files on DOSish platforms.
* io.c (pipe_open): use rb_w32_aspawn() for array form.
* win32/win32.c (rb_w32_pipe_exec): no longer used.
* win32/win32.c (rb_w32_spawn, rb_w32_aspawn): deals with batch
files and commands with extensions. [ruby-core:20695]
* win32/win32.c (has_redirection): supports environment variables
references.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-20 09:28:29 +00:00
usa
5d65e0982d
* win32/win32.c (rb_w32_read, rb_w32_write, rb_w32_isatty): check
...
whether fd is valid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 09:08:24 +00:00
usa
a9a4435e12
* win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real error
...
at this point.
* io.c (pipe_open): use rb_w32_spawn() instead of rb_w32_pipe_exec()
to use our own redirection scheme.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 16:39:03 +00:00
usa
8068f49727
* win32/win32.c (waitpid): fix bug of checking child slot.
...
* win32/win32.c (FindChildSlotByHandle): new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 14:31:37 +00:00
usa
d544a3d6c7
* win32/win32.c (rb_w32_accept): secure fd before accept because if
...
error causes in securing, cannot restore the state of accepted
socket.
fixed [ruby-core:19728]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 08:54:07 +00:00
usa
703c1825eb
* win32/win32.c (ifs_open_socket): should retry without proto_buffer
...
if cannot find the suitable protocol. a patch from Heesob Park.
fixed [ruby-core:19713]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-10 00:57:49 +00:00
usa
4542baa983
* win32/win32.c (rb_w32_open): shouldn't seek here.
...
* win32/win32.c (rb_w32_write): write to the end of the file when
FAPPEND is specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29 02:01:19 +00:00
usa
746a09406e
* win32/win32.c (rb_w32_open): need to seek to the end of the file when
...
O_APPEND is specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 15:27:06 +00:00
usa
2f4e4a841d
* win32/win32.c (rb_w32_pipe_exec): internal fds should be always
...
binmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 10:01:26 +00:00
nobu
860fad971d
* thread.c (blocking_region_{begin,end}): declared as inline.
...
* util.c (freedtoa): used only when MULTIPLE_THREADS is not defined.
* win32/win32.c (rb_w32_pipe): serial is DWORD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26 09:01:23 +00:00