summaryrefslogtreecommitdiff
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * win32/win32.c: get rid of STRNDUPA(). It's dangerous API.kosaki2011-01-271-3/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_aspawn): get rid of too huge alloca().kosaki2011-01-271-1/+1
| | | | | | | | [Bug #4330] [ruby-core:34898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn): get rid of too huge alloca().kosaki2011-01-271-3/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (open_dir_handle): get rid of too huge alloca().kosaki2011-01-271-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (wstati64): get rid of too huge alloca().kosaki2011-01-271-1/+5
| | | | | | | | [Bug #4316] [ruby-core:34834] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): fixed previous commit. sorry.usa2011-01-271-18/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): get rid of too hugeusa2011-01-271-10/+18
| | | | | | | alloca(). this is the real fix of [ruby-core:34833]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): don't raise exception whennaruse2010-12-311-2/+2
| | | | | | | the conversion is for writing to console. Patched by Heesob Park [ruby-core:33999] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): fixed more for readline, and so on. ↵tarui2010-12-061-1/+7
| | | | | | [ruby-core:33511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w43_read): more fix. [ruby-core:33513]usa2010-12-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): rollback debug code of previous commit.usa2010-12-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): workaround for console reading troubles.usa2010-12-021-3/+7
| | | | | | | fixed [ruby-core:33511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): read only 1 byte at once on console.usa2010-11-301-2/+4
| | | | | | | | workaround of Windows bug. see [ruby-core:33460]. this is not the final solution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): fix argument type.nobu2010-11-291-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_isatty): use GetConsoleMode() to determine theusa2010-11-291-1/+3
| | | | | | | fd is console or not, just like rb_w32_write_console(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_write_console): fixed indentation.usa2010-11-291-7/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fwrite): use rb_w32_write_console under Windows.luislavena2010-11-271-0/+23
| | | | | | | * win32/win32.c (rb_w32_write_console): added to write to write Unicode using WriteConsoleW for stdout/stderr. [ruby-core:33166] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (filecp, wstr_to_mbstr, mbstr_to_wstr):nobu2010-11-231-38/+18
| | | | | | refactored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (wlink, rb_w32_getppid): use typedef instead ofnobu2010-11-231-4/+6
| | | | | | repeating compilcated function prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * fix type warnings.nobu2010-11-111-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (overlapped_socket_io): get rid of a warning of 64bitusa2010-11-091-1/+3
| | | | | | | mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (get_wsa_extension_function): typos. orzusa2010-11-081-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (finish_overlapped_socket): refactoring.usa2010-11-081-94/+43
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (get_proc_address): refactoring.usa2010-11-081-39/+51
| | | | | | | * win32/win32.c (get_wsa_exetinsion_function): refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getppid): support Win64.usa2010-10-271-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_open_osfhandle, rb_w32_wopen, rb_w32_pipe):nobu2010-10-121-12/+14
| | | | | | | | | | use uintptr_t instead of long for win64. * win32/win32.c (socketpair_internal): suppress warnings. * win32/win32.c (ftruncate): use HANDLE instead of long for win64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_strerror): get English message first, insteadusa2010-10-121-0/+4
| | | | | | | | of system default. see [ruby-dev:42358]. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_strerror): unmap some range of errno forusa2010-10-121-0/+15
| | | | | | | | workaround of VC10's strerror() and sys_nerr problem. based on a patch from Akio Tajima, [ruby-dev:42355]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getenv): should return NULL if specified nameusa2010-09-301-2/+2
| | | | | | | is empty. a patch from Heesob Park at [ruby-core:32650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): don't forget to freeusa2010-09-021-4/+12
| | | | | | | memory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (CreateChild): unicodize.usa2010-09-021-11/+34
| | | | | | | | * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): convert arguments of CreateChild() from ACP to WideChar. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): call ReadFile() with len = 0 beforeusa2010-05-271-2/+12
| | | | | | | | | reading really on console, because the first ReadFile() call after PeekConsoleInput() always returns broken data. (Windows's bug). [ruby-core:29018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (subtract_tv): if the rest is zero, should finish waitingusa2010-05-201-1/+1
| | | | | | | | | | immediately. * win32/win32.c (subtract): ditto. based on a patch from Roger Pack in [ruby-core:27957]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (argv_size): merged into join_argv() to maintain theusa2010-05-171-52/+40
| | | | | | | | | | | | | agreement with it. removed code has a calclulation bug. fixed [Bug#2388] * win32/win32.c (join_argv): calc and return the length of joined argv. the cause of the original bug was clarified by Masaya TARUI <tarui AT prx.jp> and the solution was suggested by him, too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_conv_from_wchar): use ECONV_UNDEF_REPLACE.nobu2010-05-161-8/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/win32.h (rb_w32_has_cancel_io): newusa2010-05-101-0/+6
| | | | | | | | | function. * io.c (WAIT_FD_IN_WIN32): check only when it's not cancelable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_systmpdir): moved from ext/tmpdir.nobu2010-05-081-0/+11
| | | | | | | | | * ext/etc/etc.c (etc_sysconfdir): added. * lib/rubygems/config_file.rb, lib/tmpdir.rb: use etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: add declaration of wstati64 for gcc.wanabe2010-04-301-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * merge some patches from win32-uncode-test branch.usa2010-04-301-126/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see #1685. * file.c, include/ruby/intern.h (rb_str_encode_ospath): new function to convert encoding for pathname. * win32.c, include/ruby/win32.h (rb_w32_ulink, rb_w32_urename, rb_w32_ustati64, rb_w32_uopen, rb_w32_uutime, rb_w32_uchdir, rb_w32_umkdir, rb_w32_urmdir, rb_w32_uunlink): new functions to accept UTF-8 path. * win32/win32.c (rb_w32_opendir, link, rb_w32_stati64, rb_w32_utime, rb_w32_unlink): use WCHAR path internally. * file.c (rb_stat, eaccess, access_internal, rb_file_s_ftype, chmod_internal, rb_file_chmod, rb_file_chown, utime_internal, rb_file_s_link, unlink_internal, rb_file_s_rename): use UTF-8 version functions on Win32. * file.c (apply2files, rb_stat, rb_file_s_lstat, rb_file_symlink_p, rb_file_readable_p, rb_file_writable_p, rb_file_executable_p, check3rdbyte, rb_file_identical_p, rb_file_chmod, rb_file_chown, rb_file_s_link, rb_file_s_symlink, rb_file_s_rename): call rb_str_encode_ospath() before passing the path to system. * io.c (rb_sysopen): ditto. * dir.c (dir_chdir, dir_s_mkdir, dir_s_rmdir): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_wopen): shouldn't use FILE_FLAG_OVERLAPPED withusa2010-04-221-3/+0
| | | | | | | normal file. #1807, #2510, #2549 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h: check definition existance before definingusa2010-04-061-2/+36
| | | | | | | | | | errno macros. * win32/win32.c (errmap): define winsock errors mappings. these are VC++10 support. see [ruby-core:29278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, win32/win32.c (EWOULDBLOCK): VC10 alreadyusa2010-04-051-1/+2
| | | | | | | | defined EWOULDBLOCK. based on a patch from Charlie Savage, see [ruby-core:29255] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): wrong calculation of the head of setenvusa2010-04-021-1/+1
| | | | | | | | string. [ruby-core:29216] a patch from Heesob Park in [ruby-core:29218] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_{read,write}): fix handle leaks. based onnobu2010-03-251-0/+2
| | | | | | a patch from Heesob Park in [ruby-core:28919]. [ruby-core:28833] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): limit read size to 16KB if the filenobu2010-03-241-2/+17
| | | | | | | seems to be console. [ruby-core:28902] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tmpdir: split from lib/tmpdir.rb.nobu2010-03-161-9/+18
| | | | | | | * win32/win32.c (rb_w32_system_tmpdir): extracted from init_env. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getcwd): remvoed duplicated code.nobu2010-03-161-6/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): get rid of alloca() for outer string.nobu2010-03-111-11/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (signbit): allow x64.wanabe2010-03-101-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): suppressed a warning.nobu2010-03-051-4/+5
| | | | | | | | | * win32/win32.c (rb_w32_map_errno, winnt_stat, rb_chsize): ditto. * win32/win32.c (rb_w32_aspawn): get rid of overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e