aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * win32/win32.c (gettimeofday): easier calculation. use the definitionusa2008-09-021-1/+1
| | | | | | | | of the Gregorian calender. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (gettimeofday): calc tv_sec and tv_usec from systemusa2008-09-021-6/+18
| | | | | | | | time by myself. [ruby-dev:36084] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (gettimeofday): shouldn't use mktime(2) because it'susa2008-09-011-11/+2
| | | | | | | | buggy about handling summer time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_open, rb_w32_read, rb_w32_write): fallback tousa2008-08-301-0/+17
| | | | | | | | | MSVCRT if text mode is specified. this case will not be used from ruby itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): EOF is not error.usa2008-08-301-1/+1
| | | | | | | | ref [ruby-dev:36050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read, rb_w32_write): more accurate handlingusa2008-08-281-2/+6
| | | | | | | | of wait result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (set_pioinfo_extra): use MSVCRT's open() and close().usa2008-08-281-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/win32.h (rb_w32_open): overlapped fileusa2008-08-281-9/+448
| | | | | | | | | | | | | | | | I/O support. * win32/win32.c, include/ruby/win32.h (rb_w32_pipe): overlapped pipe I/O support. * wn32/win32.c (rb_w32_read, rb_w32_write): overlapped I/O support to enable canceling I/O. * thread_win32.c (ubf_handle): remove workaround. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32.c (init_stdhandle): set binmode.usa2008-08-251-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_seekdir): no need to rewind to seek forward.nobu2008-08-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): recalc the rest of timeout for eachnobu2008-07-301-8/+30
| | | | | | | iterations. [ruby-core:18015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (overlapped_socket_io, fcntl, rb_w32_close): must notnobu2008-07-281-4/+11
| | | | | | | pass a pointer to int which is smaller than st_data_t on mswin64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (CreateChild, overlapped_socket_io): suppressnobu2008-07-281-3/+3
| | | | | | | warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (MAXPATHLEN): define before use.usa2008-07-281-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.h (dln_find_exe, dln_find_file): deprecated, use reentrantnobu2008-07-271-1/+2
| | | | | | | versions instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (exit_handler): use st_free_table() to free socklist.usa2008-07-241-16/+42
| | | | | | | | | | * win32/win32.c (rb_w32_pipe_exec, rb_w32_accept, rb_w32_socket, rb_w32_socketpair): should check and release fd and sockets/handles if an error occurs in rb_w32_open_osfhandle(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (overlapped_socket_io): avoid warnings.usa2008-07-241-11/+16
| | | | | | | | * thread_win32.c (ubf_handle): refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_func): new function to get API's address whichusa2008-07-221-18/+15
| | | | | | | | | | | is often used and not supported on all Windows. * win32/win32.c (overlapped_socket_io): shouldn't use overlapped I/O if CancelIo() is not supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (socklist): table for registering socket optionsusa2008-07-181-97/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (currently only O_NONBLOCK). * win32/win32.c (StartSockets, exit_handler): alloc/free socklist. * win32/win32.c (is_socket): use socklist. * win32/win32.c (rb_w32_accept, rb_w32_socket, rb_w32_socketpair): register new socket to socklist. * win32/win32.c (rb_w32_close): remove closing socket from socklist. * win32/win32.c (fcntl): register socket options. * win32/win32.c (overlapped_socket_io): send to/recv from socket with overlapped operation if the socket is not nonblocking mode. [experimental] * win32/win32.c (rb_w32_send, rb_w32_sendto, rb_w32_recv, rb_w32_recvfrom): use overlapped_socket_io(). * win32/win32.c (open_ifs_socket): set overlapped mode. this is the default mode of winsock's socket(), so lacking it is an old bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_win32.c (ubf_handle): cancel blocking IO if it can (onlyusa2008-07-151-0/+1
| | | | | | | | | | Vista). see [ruby-dev:35446] * win32/win32.c (errmap): add ERROR_OPERATION_ABORTED as EINTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_select): shoudn't pass non-socket handle tousa2008-07-111-0/+4
| | | | | | | | original select(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_accept, rb_w32_socket, rb_w32_socketpair):usa2008-07-111-4/+4
| | | | | | | | prohibit inheritance of sockets, too. [experimental] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (CreateChild): the measures for Vista is no longerusa2008-07-111-1/+1
| | | | | | | | unnecessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (insert): follow recent changes of globbing.usa2008-07-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, win32/win32.c (rb_w32_getppid): now supportusa2008-06-241-0/+34
| | | | | | | | | | getppid() on win32 (but only Win2k or later). * process.c (get_ppid): remove win32 special logic. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_osid, rb_w32_osver, CreateChild): XP isusa2008-06-211-3/+15
| | | | | | | | | is different from Vista about pipe handle inheritance. fixed [ruby-core:17367] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_spawn): no longer support P_WAIT.usa2008-06-211-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (errmap): add some pipe errors.usa2008-06-181-2/+14
| | | | | | | | | * win32/win32.c (rb_w32_write): set errno when CRT's errno is EINVAL for pipe errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (poll_child_status): set EINVAL to errno whenusa2008-06-181-5/+9
| | | | | | | | GetExitCodeProcess() fails with ERROR_INVALID_HANDLE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (CreateChild): no need to inherit handles here becauseusa2008-06-171-1/+1
| | | | | | | | spawn'ed child cannot detect that STDIN is closed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppress warnings on cygwin, mingw and mswin.nobu2008-06-011-23/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c, include/ruby/intern.h (rb_run_exec_options): externed.usa2008-05-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | * process.c (save_redirect_fd, save_env_i, save_env, run_exec_dup2, run_exec_open, run_exec_pgroup, run_exec_rlimit, rb_run_exec_options): save parent's process environments. !!!remark!!! these are not thread-safe. * process.c (rb_spawn_internal): remove calling run_exec_options() because cannot restore after spawn. we'll fix this later. * io.c (pipe_open): ditto. * test/ruby/test_process.rb (test_execopts_env): upcase environment variable name for case insensitive platforms. * win32/win32.c (init_env): set USER environment variable only when USERNAME is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_map_errno): exported.nobu2008-02-201-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h win32/win32.c (rb_w32_pipe_exec): use dual fdusa2007-11-201-47/+44
| | | | | | | | | | | | instead of socketpair when mode is RDWR. * io.c (pipe_open): pass &write_fd to rb_w32_pipe_exec(). * io.c (popen_redirect): define only when HAVE_FORK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): refactoring. remove unused code.usa2007-10-021-13/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * main.c (main): use platform-independent per-process initialization.nobu2007-09-291-1/+1
| | | | | | | | | | | | | | | | [ruby-dev:31900] * ruby.c (ruby_sysinit): new function for per-process initialization. * include/ruby/ruby.h (RUBY_GLOBAL_SETUP): toplevel setup declaration. * include/ruby/win32.h, win32/mkexports.rb: alias NtInitialize ruby_sysinit. * win32/win32.c (rb_w32_sysinit): renamed from NtInitialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bcc32/{Makefile.sub,configure.bat,setup.mak: configure_argsnobu2007-07-211-1/+1
| | | | | | | | | | | | support. * bcc32/setup.mak: check runtime version. * win32/win32.c (rb_w32_open_osfhandle): prototype has changed in bcc 5.82. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222]nobu2007-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/digest/digest.c (rb_digest_instance_update, rb_digest_instance_finish, rb_digest_instance_reset, rb_digest_instance_block_length): %s in rb_raise() expects char*. [ruby-dev:31222] * ext/openssl/ossl.h: include ossl_pkcs5.h. [ruby-dev:31231] * ext/openssl/ossl_pkcs5.h: new file for PKCS5. [ruby-dev:31231] * ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise() instead of rb_raise(). [ruby-dev:31222] * ext/sdbm/_sdbm.c: DOSISH platforms need io.h. [ruby-dev:31232] * ext/syck/syck.h: include stdlib.h for malloc() and free(). [ruby-dev:31232] * ext/syck/syck.h (syck_parser_set_input_type): prototype added. [ruby-dev:31231] * win32/win32.c: include mbstring.h for _mbspbrk(). [ruby-dev:31232] * include/ruby/win32.h (rb_w32_getcwd): prototype added. [ruby-dev:31232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (CreateChild): enclose command line except fornobu2007-07-131-10/+19
| | | | | | | command.com which can not handle quotes. [ruby-talk:258939] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: remove unused functions.usa2007-06-271-54/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, win32/Makefile.sub, win32/configure.bat,usa2007-06-271-19/+23
| | | | | | | | | win32/mkexports.rb, win32/setup.mak, win32/win32.c: import x64-mswin64 port. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby: moved public headers.nobu2007-06-101-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_opendir): removed duplicated code.nobu2007-05-291-23/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_opendir, rb_w32_readdir): eliminate magicnobu2007-05-291-11/+15
| | | | | | | numbers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_stdhandle): stderr should be without buffering,usa2007-05-151-0/+1
| | | | | | | | but mswin32 use buffering when stderr is not connected to tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (NtInitialize, exit_handler): add initializing andusa2007-04-251-48/+36
| | | | | | | | | | | | | | cleanup of critical section object for select. * win32/win32.c (do_select): block reentrance. * win32/win32.c (rb_w32_select): 0 sec polling of socket. this is workaround because winsock cannot do select at same socket at the same time by two or more threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.[ch] (rb_w32_enter_critical, rb_w32_leave_critical): nousa2007-04-111-50/+0
| | | | | | | | | | | | need to reject reentrance. removed. * rubysig.h (RUBY_CRITICAL): follow above changes. * rubysig.h (TRAP_BEG, TRAP_END): no need to save errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_fclose, rb_w32_close): need to save errnousa2007-04-101-0/+4
| | | | | | | | before calling original fclose()/close(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (do_select): use ubf_select() as UBF on windows.usa2007-04-091-7/+0
| | | | | | | | | * win32/win32.c (do_select): shouldn't call catch_interrupt() here. fixed: [ruby-dev:30674], reported by wanabe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_cmdvector): fixed buffer size. reported byusa2007-03-301-10/+5
| | | | | | | | | | | wanabe [ruby-dev:30672] * win32/win32.c (init_env, insert, rb_w32_get_environ): use strdup instead of malloc + strlcpy. suggested by nobu [ruby-dev:30673] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e