summaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * win32/win32.c (overlapped_socket_io, recvmsg, sendmsg): pass handlewanabe2009-11-011-3/+3
| | | | | | instead of pointer to CloseHandle(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32.c (recvmsg, sendmsg, link): shouldn't raise ruby's exceptionsusa2009-10-301-5/+23
| | | | | | | | | in the functions expected as system API. see [ruby-dev:39579] and [ruby-dev:39582] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn): `\'' is also quote character.usa2009-10-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/{setup.mak,Makefile.sub,win32.c},include/ruby/win32.h (RT_VER):usa2009-10-011-7/+4
| | | | | | | | | | | split compiler specification and runtime library specification. * win32/Makefile.sub (LD_SHARED*, config.status): no need to embbed manifest if not exist. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()usa2009-10-011-2/+1
| | | | | | | | instead of calling MSVCRT's getpid(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/wini32.c (LK_ERR): with overlapped I/O, LockFileEx() returnsusa2009-09-281-1/+1
| | | | | | | | ERROR_IO_PENDING if the file is locked. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/win32.h (rb_w32_access): new function tousa2009-09-251-0/+14
| | | | | | | | | | | replace MSVCRT's access(). [ruby-core:25761] * file.c (eaccess): workaround for recent MSVCRT is no longer needed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (readdir_internal): free old temporary filename.usa2009-08-121-2/+4
| | | | | | | | [ruby-core:24820] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (has_redirection): need to execute shell if commandlineusa2009-08-041-2/+3
| | | | | | | | includes newline. cf. [ruby-core:24560] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_connect): return value was broken when someusa2009-08-031-7/+4
| | | | | | | | | error occurred. [ruby-core:24234] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_{open,wopen}): fixed typos. these conditionsusa2009-07-231-2/+2
| | | | | | | | mean to call runtime's open() if textmode. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (WSABUF): get rid of compile error on VC9 and mingw.usa2009-07-221-1/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[ch] (recvmsg, sendmsg): new functions to support recvmsg/usa2009-07-211-1/+206
| | | | | | | | | sendmsg like UNIX. these functions are experimental and not tested well. bug reports are welcome. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn): use original command if not found.nobu2009-03-231-2/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): use NULL asnobu2009-03-221-29/+49
| | | | | | | application name for batch files. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_conv_from_wstr): added.nobu2009-03-201-56/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): omit program namenobu2009-03-201-50/+117
| | | | | | | if actual program path is found. [ruby-core:22960] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (errmap): added ERROR_MOD_NOT_FOUND.nobu2009-03-201-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): set TMPDIR if none of TMPDIR, TMP,nobu2009-03-111-55/+0
| | | | | | | TEMP is set. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_telldir, rb_w32_seekdir): should use long.nobu2009-03-111-8/+113
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: suppress warnings. based on a patch from Charlienobu2009-03-101-23/+24
| | | | | | | Savage at [ruby-core:22804]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_sysinit): initializes version info first.nobu2009-03-051-14/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (Win32System, Win32Version): moved before get_version.nobu2009-03-051-3/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_osid): always define for binary compatibility.nobu2009-03-051-12/+25
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): keeps wide chars as wide chars.nobu2009-03-021-20/+37
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (sysopen_func, rb_sysopen_internal, rb_sysopen): open fileusa2009-02-251-3/+34
| | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@22626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * debug.c (set_debug_option): added rtc_error option.nobu2009-02-161-3/+25
| | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@22337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (_CrtDbgReportW): prevent from false positivenobu2009-02-151-0/+2
| | | | | | | assertions in msvcrtd. [ruby-core:22116] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertionusa2009-02-061-1/+4
| | | | | | | | when ASCII-8BIT is passed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function tousa2009-02-061-35/+95
| | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@22087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write): use of cast expressions as lvaluesnobu2009-02-021-1/+1
| | | | | | | is deprecated. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (open_dir_handle, rb_w32_opendir, move_to_next_entry,usa2009-02-021-27/+37
| | | | | | | | rb_w32_readdir, check_valid_dir): change backend API from A to W. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write): limit write size to 32KB if the fileusa2009-01-301-2/+17
| | | | | | | | seems to be console. [ruby-core:21613] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * revert previous revision. it's already out-of-date.usa2009-01-221-9/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, win32/win32.c (rb_w32_is_valid_fd): new functionusa2009-01-221-0/+9
| | | | | | | | | | to validate fd. * io.c (rb_io_initialize): check fd with above function. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_aspawn): should not escape with carretnobu2009-01-141-2/+3
| | | | | | | unless using cmd.exe. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,usa2009-01-131-39/+58
| | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@21487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (internal_cmd_match): extracted fromnobu2009-01-121-14/+34
| | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@21473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (open_dir_handle): extracted from rb_w32_opendir.nobu2009-01-121-28/+67
| | | | | | | | * win32/win32.c (winnt_stat): gets rid of strange behavior of GetFileAttributes(). [ruby-core:21269] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): use user profile folder than personalnobu2009-01-051-7/+24
| | | | | | | folder. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_argv_size): if an argument is empty, it's sizeusa2008-12-271-1/+1
| | | | | | | | is 2, not 0, because it will be converted to "". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn): deals with quoted commands.nobu2008-12-231-0/+8
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn): support normal commands with arguments.usa2008-12-231-17/+17
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (mingw): no longer uses snprintf and vsnprintf ofnobu2008-12-221-20/+0
| | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@20909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c (dln_find_1): supplements an extension for executablenobu2008-12-201-182/+122
| | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@20892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read, rb_w32_write, rb_w32_isatty): checkusa2008-12-051-0/+12
| | | | | | | | whether fd is valid. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real errorusa2008-12-041-2/+6
| | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@20528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (waitpid): fix bug of checking child slot.usa2008-12-041-1/+13
| | | | | | | | * win32/win32.c (FindChildSlotByHandle): new. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_accept): secure fd before accept because ifusa2008-11-111-11/+19
| | | | | | | | | | error causes in securing, cannot restore the state of accepted socket. fixed [ruby-core:19728] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (ifs_open_socket): should retry without proto_bufferusa2008-11-101-0/+2
| | | | | | | | | if cannot find the suitable protocol. a patch from Heesob Park. fixed [ruby-core:19713] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e