aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * win32/win32.c (map_errno): map OS error to errno. [new]usa2003-02-281-49/+150
| | | | | | | | | | | | | | | | | | * win32/win32.c (pipe_exec, CreateChild, poll_child_status, waitpid, kill, link, rb_w32_rename, unixtime_to_filetime, rb_w32_utime): use map_errno() instead of using GetLastError() directly. * win32/win32.c (rb_w32_select, rb_w32_accept, rb_w32_bind, rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname, rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv, rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt, rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr, rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname, rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport, rb_w32_fclose, rb_w32_close): map winsock error to errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (flock): supports larger files, and maps errornobu2003-02-281-33/+28
| | | | | | | | | | | | code. * win32/win32.c (rb_w32_asynchronize): returns errno from child thread. * win32/win32.c (rb_w32_fclose, rb_w32_close): ensures unlocked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens.nobu2003-02-171-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (link): implement with CreateHardLink().usa2003-02-171-0/+93
| | | | | | | | * win32/win32.c, win32/win32.h (rb_w32_utime): enable utime() to directory if on NT. [new] (ruby-bugs-ja:PR#393) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (pipe_exec): remove unnecessary SetStdHandle().usa2003-01-221-76/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_exec_v): follow to proc_spawn_v(). call do_aspawn()usa2003-01-061-7/+51
| | | | | | | | | | | | | on Win32. * process.c (rb_proc_exec): call do_spawn() on Win32. * win32/win32.c, win32/win32.h (do_spawn, do_aspawn): add mode flag. * process.c (proc_spawn_v, rb_f_system): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (utimbuf): use utimbuf instead of _utimbuf if defined _WIN32.usa2003-01-041-4/+0
| | | | | | | | | | | | | | | | | * win32/Makefile.sub (LIBS): use oldnames.lib. * win32/win32.c (rb_w32_getcwd): follow above change. * win32/win32.h: ditto. * wince/direct.c, wince/direct.h (getcwd): ditto. * wince/io.h: ditto. * wince/string.c, wince/wince.h (stricmp, strnicmp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_exec): use same logic as DJGPP on win32 ports.usa2003-01-041-15/+91
| | | | | | | | | | | | | | | * process.c (rb_f_system): ditto. * win32/win32.c, win32/win32.h (do_aspawn): [new]. for arrayed arguments. * win32/win32.c (CreateChild): add new argument for real filename of executing process. * win32/win32.c (NtHasRedirection, pipe_exec): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* WinCE patch mergedmatz2002-12-021-6/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_stat): empty path is invalid, and returnnobu2002-12-011-5/+4
| | | | | | | ENOENT rather than EBADF in such case. [ruby-talk:57177] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_putc): wrong condition to fill or flush onnobu2002-10-121-3/+8
| | | | | | | bccwin32. [ruby-win32:408] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_fclose, rb_w32_close): use closesocket()nobu2002-10-101-24/+63
| | | | | | | | | | | for socket. [ruby-win32:382] * win32/win32.c (StartSockets): set NtSocketsInitialized. * win32/win32.h: prototypes; rb_w32_fclose, rb_w32_close git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (init_sock): no need for special finalizer,nobu2002-10-011-22/+0
| | | | | | | | | | | socket descriptor is no longer duplicated in 1.7. [ruby-talk:50732] * win32/win32.c, win32/win32.h (rb_w32_fddup, rb_w32_fdclose): delete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_open_osfhandle): adjustnobu2002-09-291-122/+111
| | | | | | | | | | | | rb_w32_open_osfhandle() with _open_osfhandle(). * win32/win32.c (rb_w32_accept, rb_w32_socket): return -1 on error. * win32/win32.h: should use file descriptor instead of SOCKET. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (is_socket, rb_w32_select, rb_w32_accept, rb_w32_bind,usa2002-09-281-85/+131
| | | | | | | | | | | | | rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname, rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv, rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt, rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr, rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname, rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport): need to protect WSAGetLastError() by RUBY_CRITICAL. [ruby-talk:51778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_opendir): Corresponds to the unjust path containing ".H_Konishi2002-09-151-18/+25
| | | | | | | (rb_w32_stat) : ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, win32/win32.h (rb_w32_getpid): negate pid under Win9x.usa2002-09-111-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: prototype; time_free() to avoid VC++ warnings.usa2002-09-081-2/+8
| | | | | | | | | | * win32/win32.c (rb_w32_stat): remove S_IWGRP and S_IWOTH bits from st_mode. * win32/win32.h (S_I*): define if not defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (kill): negate pid under Win9x.nobu2002-08-281-9/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.h: define SIGINT and SIGKILL if not defined.usa2002-08-281-7/+0
| | | | | | | * win32/win32.c: remove definition of SIGINT and SIGKILL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * replace of check EPIPE error(in getc()) rutine on bcc32.H_Konishi2002-08-201-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returnseban2002-07-301-0/+3
| | | | | | | | | the same address always, so allocate string by ruby_strdup. * win32/win32.c: prototype; rb_w32_open_osfhandle(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_finalize, pipe_popen): two-way pipe support for win32.usa2002-06-281-121/+162
| | | | | | | | | | | | | * win32/win32.c (ChildRecord, FindFreeChildSlot): ditto. * win32/win32.c, win32/win32.h (pipe_exec): new function for two-way pipe support for win32. * win32/win32.c, win32/win32.h (FindPipedChildSlot, rb_w32_popen, rb_w32_pclose): removed functions for two-way pipe support for win32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_stat): fix buffer overflow. (ruby-bugs:PR#329)usa2002-06-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *bcc32 fix for win9x.H_Konishi2002-06-141-28/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* new platform [bccwin32] merged.H_Konishi2002-06-111-7/+64
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed May 29 18:55:47 2002 KONISHI Hiromasa <H_Konishi@ruby-lang.org>H_Konishi2002-05-291-61/+61
| | | | | | | | | * function renames my* and win32_* to rb_w32_* in win32/win32.c fixed files win32/win32.c, win32/win32.h, win32/dir.h, hash.c, rubysig.h, signal.c, ext/socket/socket.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (insert): fix prototype for ANSI C.eban2002-04-281-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: include <mswsock.h> on __MINGW32__.eban2002-04-191-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (StartSockets): remove duplicated lines.nobu2002-03-151-3/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (mypopen): fixed that mypclose() didn't really closeusa2001-11-261-26/+74
| | | | | | | | | | pipe. * win32/win32.c (CreateChild): set STARTF_USESTDHANDLES flag only when some handles are passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (ruby_setenv): remove USE_WIN32_RTL_ENV block since it'susa2001-11-141-254/+38
| | | | | | | | | obsoleted. * win32/win32.c, win32/win32.h: sort out #if 0 - #endif or others. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (waitpid): fix wait count.usa2001-11-131-5/+5
| | | | | | | * win32/win32.c (poll_child_status): rename from wait_child(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (mypopen): return error status instead of callingusa2001-11-131-5/+5
| | | | | | | | | rb_sys_fail(). * win32/win32.c (do_spawn): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (envix): use GET_ENVIRON and FREE_ENVIRON to get environmentusa2001-11-131-429/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables list. * hash.c (env_keys): ditto. * hash.c (env_each_key): ditto. * hash.c (env_values): ditto. * hash.c (env_keys): ditto. * hash.c (env_each_value): ditto. * hash.c (env_each): ditto. * hash.c (env_inspect): ditto. * hash.c (env_to_a): ditto. * hash.c (env_size): ditto. * hash.c (env_empty_p): ditto. * hash.c (env_has_value): ditto. * hash.c (env_index): ditto. * hash.c (env_to_hash): ditto. * win32/win32.c (win32_getenv): use static buffer. * win32/win32.c, win32/win32.h (win32_get_environ): get environment variables list. [new] * win32/win32.c, win32/win32.h (win32_free_environ): free environment variables list. [new] * win32/win32.c (do_spawn): use CreateChild() instead of calling CreateProcess() directly. Original patches comes from Patrick Cheng. * win32/win32.c (mypopen): ditto. * win32/win32.c (mypclose): use rb_syswait() instead of waiting in this function. * win32/win32.c (waitpid): use wait_child() instead of _cwait(). * win32/win32.c (CreateChild): added. [new] * win32/win32.c (wait_child): added. [new] * win32/win32.c (FindFirstChildSlot): added. [new] * win32/win32.c (FindChildSlot): added. [new] * win32/win32.c (FindPipedChildSlot): added. [new] * win32/win32.c (CloseChildHandle): added. [new] * win32/win32.c (FindFreeChildSlot): added. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (isInternalCmd): check return value of NtMakeCmdVector ↵usa2001-09-251-12/+14
| | | | | | (Tietew <tietew@tietew.net>'s patch). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c (dln_strerror): fix a bug that sometimes made null message onusa2001-08-241-1/+2
| | | | | | | | | win32 (Tietew <tietew@tietew.net>'s patch). * win32/win32.c (mystrerror): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (NtCmdGlob): avoid VC++ warning.usa2001-08-151-1/+1
| | | | | | | * lib/mkmf.rb: add -I$(srcdir) to CPPFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (kill): add support of signal 9 on mswin32/mingw32.usa2001-05-121-9/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forgot some checkins.matz2001-05-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: use ruby's opendir on mingw32.eban2001-04-011-3/+1
| | | | | | | * win32/dir.h, dir.c, Makefile: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (isUNCRoot): multibyte character support.eban2001-03-211-7/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (win32_stat): WinNT/2k "//host/share" support.eban2001-03-211-3/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_iglob -> rb_globieban2001-03-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/dir.h: replace missing/dir.h .usa2001-03-201-5/+3
| | | | | | | | * win32/win32.h: ditto. * win32/win32.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (win32_stat): UNC support.eban2001-03-201-16/+22
| | | | | | | * dir.c (extract_path): fix "./*" problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (gettimeofday): use GetLocalTime() instead of ftime()eban2001-03-051-6/+16
| | | | | | | for high-resolution timing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (myrename): fix error handling.eban2001-02-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: fasten file I/O on mswin32/mingw32.usa2001-02-171-110/+176
| | | | | | | | | * win32/win32.h: ditto. * rubysig.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (win32_stat): replace stat for enable when pathnameusa2001-02-091-0/+21
| | | | | | | | | | | | | | | ends with '/' or '\' for mswin32 on Win9X / Win2k. * win32/win32.h: ditto. * ruby.h: ditto. * dir.c (rb_glob_helper): ditto. * file.c (rb_stat, rb_file_s_stat, eaccess, check3rdbyte): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e