aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_open): shouldn't seek here.usa2008-10-291-5/+3
| | | | | | | | | * 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
* * win32/win32.c (rb_w32_open): need to seek to the end of the file whenusa2008-10-281-1/+3
| | | | | | | | O_APPEND is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_pipe_exec): internal fds should be alwaysusa2008-10-281-3/+2
| | | | | | | | binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (blocking_region_{begin,end}): declared as inline.nobu2008-10-261-1/+1
| | | | | | | | | * 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
* * dln.c: Ruby no longer supports Windows CE.yugui2008-10-041-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/win32.h: ditto. * ruby.c: ditto. * strftime.c: ditto. * win32/Makefile.sub: ditto. * win32/win32.c: ditto. * ext/tk/extconf.rb: ditto. * lib/fileutils.rb: ditto. * test/fileutils/test_fileutils.rb: ditto. * wince/*: removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (subtruct): check tv_sec. reported by ko1.usa2008-09-231-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (getppid): typo. [ruby-dev:36202]usa2008-09-081-15/+15
| | | | | | | | * process.c (get_ppid): mention the return value on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (filetime_to_unixtime): remove unused variable.usa2008-09-081-1/+0
| | | | | | | | [ruby-dev:36191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (filetime_to_timeval): new function, split fromusa2008-09-031-28/+23
| | | | | | | | | | | | gettimeofday(). * win32/win32.c (gettimeofday): use above function. * win32/win32.c (filetime_to_unixtime): ditto. [ruby-dev:36135] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: fix ruby/signal.h depending codes.ko12008-09-031-9/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e