aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
Commit message (Collapse)AuthorAgeFilesLines
* * win32/win32.[ch] (rb_w32_isatty): new function to replace MSVCRT'susa2004-11-181-0/+14
| | | | | | | isatty because it never sets errno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_options): now we cannot call rb_glob() beforeusa2004-11-121-13/+2
| | | | | | | | | | ruby_init(), so call rb_w32_cmdvector() at ruby_options(). * win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and export it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (isUNCRoot): should check NUL after '.'.eban2004-10-251-2/+2
| | | | | | | | [ruby-dev:24590] * win32/win32.c (isUNCRoot): fixed buffer overrun. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_call_handler): workaround for Ctrl-C.usa2004-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_getpid): don't need to use _getpid() onusa2004-09-131-5/+1
| | | | | | | mswin32 and mingw32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bcc32/Makefile.sub: bccwin32 port starts to use RTL dll.ocean2004-09-101-0/+6
| | | | | | | | | (need to rebuild all) [ruby-dev:24138] * win32/win32.{h,c}: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {bcc32,win32,wince}/Makefile.sub (config.h): add fcntl.usa2004-09-071-2/+47
| | | | | | | | | | | | * win32/win32.[ch] (fcntl): ditto. * win32/win32.c (rb_w32_connect): support nonblocking mode. * ext/socket/socket.c (wait_connectable, ruby_connect): support nonblocking connect on various platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_exec): strip trailing spaces. [ruby-dev:24143]nobu2004-08-271-8/+27
| | | | | | | * win32/win32.c (CreateChild): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (init_env): initialize HOME and USER environmentnobu2004-08-181-14/+61
| | | | | | | variables unless set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h (rb_eof_error): should mark as NORETURN.usa2004-08-121-29/+20
| | | | | | | | * win32/win32.c (make_cmdvector): adjust escaped successive double-quote handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.{h,c} (rb_w32_{f,fd,fs}open): workaround for bcc32'socean2004-07-251-0/+52
| | | | | | | | | {f,fd,fs}open bug. set errno EMFILE and EBADF. [ruby-dev:23963] * test/drb/drbtest.rb: fix method duplication. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_opendir): should set errno if error occursusa2004-06-211-0/+1
| | | | | | | when calling OS API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c: remove unused functions and variables.usa2004-06-091-62/+50
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): erred program name should be reported bynobu2004-03-021-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | exceptions, instead of the first argument. * process.c (rb_spawn): ditto. * process.c (proc_spawn_v): use first argument as program name. * win32/win32.c (rb_w32_aspawn): ditto. * win32/win32.c (CreateChild): search executable file if no program name given. * lib/drb/extservm.rb (invoke_service_command): use Process.spawn. [ruby-dev:23103] * lib/rdoc/ri/ri_display.rb (setup_pager): use IO.popen. [ruby-dev:23086], [ruby-dev:23103] * lib/rdoc/diagram.rb (convert_to_png): ditto. * lib/rdoc/generators/chm_generator.rb (compile_project): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (make_cmdvector): adjust successive double-quotenobu2004-02-261-6/+12
| | | | | | | handling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): fix typo.nobu2004-02-201-1/+13
| | | | | | | | * win32/win32.c (CreateChild): first argument to CreateProcess() must have path, not just basename. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, win32/win32.h: fixed prototypes.nobu2004-02-191-22/+15
| | | | | | | * win32/win32.c (wait): same as waitpid() with -1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check functions, fork spawnv.nobu2004-02-161-90/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (rb_io_s_popen): accept argv not only single command line. * process.c (rb_proc_exec_n): export. * process.c (rb_check_argv): check if arguments are safe to invoke. * process.c (rb_fork): retry to fork. * process.c (rb_spawn): spawn child process asynchronously. * process.c (rb_f_system): raise an exception if the command could not execute. * win32/win32.c (rb_w32_argv_size): count necessary size for joined arguments. * win32/win32.c (rb_w32_join_argv): join arguments with quoting. * win32/win32.c (rb_w32_pipe_exec, rb_w32_spawn, rb_w32_aspawn): accept program name adding to command line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (link): raise NotImplementedError on Win9X.usa2004-02-121-3/+2
| | | | | | | | | contributed by Tietew. [ruby-dev:22713] * win32/win32.c, win32/win32.h (link): add const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, configure.in,nobu2004-02-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | runruby.rb: run rdoc, test and so on with compiled extension libraries. [ruby-dev:22688] * ext/extmk.rb, lib/mkmf.rb: make extension libraries in separated directory, similar to the actual directory structure. * lib/fileutils.rb (FileUtils.copy_file): use the mode of the original file to create new file. * lib/rdoc/ri/ri_paths.rb (RI::Paths::SYSDIR): get rid of unexpected influence by envirionment variable. * bcc32/configure.bat, win32/configure.bat: add install-doc options. * win32/win32.c, win32/win32.h (rb_w32_fstat): fix Borland C runtime bug which returns wrong mode. [ruby-dev:22846] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz2004-01-291-1/+1
| | | | | | | [ruby-dev:22761] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/defs.h, win32/win3.c, win32/win32.h, file.c: removenobu2004-01-191-7/+4
| | | | | | | useless casts for Borland C. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/dir.h, win32/win32.c: fix patch miss.usa2004-01-051-22/+0
| | | | | | | * win32/Makefile.sub: fix file dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz2004-01-051-10/+42
| | | | | | | | | | | | [ruby-dev:22486] * pack.c (pack_unpack): unpack requires big endian offet (OFF16B and OFF32B). The patch is from Minero Aoki in [ruby-dev:22489] * pack.c (OFF16B): add big-endian offset again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.matz2004-01-021-0/+22
| | | | | | | | | | | | [ruby-dev:22476] * io.c (argf_eof): ARGF.eof? should not have any side effect. [ruby-dev:22469] * io.c (argf_each_byte): should return self. [ruby-dev:22465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_win32_stat): add "." to buf1 only if it has a drive letter.eban2003-11-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_stat): remove _fullpath() for NUL: device.eban2003-11-271-14/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (make_cmdvector): process backslashes even if a quotenobu2003-11-061-2/+1
| | | | | | | is not enclosed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (do_spawn, do_aspawn): should return child's exitusa2003-10-211-2/+8
| | | | | | | status to parent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (do_spawn, do_aspawn): should wait child process evenusa2003-10-211-0/+2
| | | | | | | if callded with P_OVERLAY. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (CreateChild): need to quote cmd if RUBYSHELL is set.usa2003-09-051-6/+11
| | | | | | | | * win32/win32.c (CreateChild): fix condition about whether to call shell or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (isInternalCmd): stupid miss.nobu2003-09-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/mkmf.rb (have_library, find_library): configure by librarynobu2003-09-051-42/+70
| | | | | | | | | | | | | name. * win32/win32.c (isInternalCmd): distinguish command.com and cmd.exe. * win32/win32.c (make_cmdvector): a character just after wildcard was ignored. [ruby-core:01518] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (map_errno): support winsock error.usa2003-08-261-45/+49
| | | | | | | | | | | | | | | | | | | | * win32/win32.c (pipe_exec, CreateChild, poll_child_status, waitpid, kill, link, rb_w32_rename, unixtime_to_filetime, rb_w32_utime): pass errno to map_errno(). * 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): use map_errno(). * win32/win32.h: add winsock errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_utime): never use utime() of C runtime.usa2003-08-031-15/+16
| | | | | | | [ruby-talk:77782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (isInternalCmd): shouldn't return if find end of str.usa2003-08-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_raise): snprintf() termination moved tonobu2003-07-301-63/+41
| | | | | | | | | | | | | | | | | | | win32/win32.c. * win32/win32.c (valid_filename, str_grow): unused. * win32/win32.c (NTLoginName, ChildRecord): make static. * win32/win32.c (CreateChild): argument check. * win32/win32.c (kill): should not call CloseHandle() when OpenProcess() failed. * win32/win32.c (rb_w32_vsnprintf, rb_w32_snprintf): ensure buffer terminated. [ruby-talk:69672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_fdopen): set errno if it's zero on win32 platforms.usa2003-07-261-16/+0
| | | | | | | | | | * ext/openssl/ossl_ssl.c (TO_SOCKET): define special version when _WIN32 is defined. this is ruby's problem, not OpenSSL. * win32/win32.c: remove some old comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (make_cmdvector): recognize quote within string.usa2003-07-181-211/+173
| | | | | | | based on Nobu's patch ([ruby-win32:450]). [ruby-talk:75853] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_opendir): need to set errno. [ruby-talk:73761]usa2003-06-171-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (_CRTIMP): redefine _CRTIMP on MinGW.eban2003-05-291-3/+4
| | | | | | | | * configure.in: remove '-D__USE_CRTIMP' from XCFLAGS on MinGW. * win32/win32.c (NtMakeCmdVector): handle quotes only if not instring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (kill): set errno after calling raise().usa2003-05-201-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (kill): fix typo and add signal 0 support.usa2003-05-151-2/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (NtInitialize): set the floating-point control wordeban2003-04-201-0/+4
| | | | | | | | | | on bcc32. * win32/win32.h, bcc32/Makefile.sub: use missing/isinf.c, should not use _finite() because it returns 0 if NaN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_stat): check arguments. [ruby-dev:20007]nobu2003-04-111-3/+7
| | | | | | | [ruby-win32:535] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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