Граф коммитов

138 Коммитов

Автор SHA1 Сообщение Дата
usa f598caf621 * win32/win32.c (rb_w32_fdisset): check whether the handle is valid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 05:32:53 +00:00
usa 2f35e1e146 * win32/win32.c (rb_w32_close): need to reset osfhnd().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-14 08:10:32 +00:00
usa 3f56463129 * win32/win32.c (rb_w32_pipe_exec): need to close original socket
handle.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 08:38:59 +00:00
usa 87a77c7174 * win32/win32.c (rb_w32_pipe_exec): must close original handle
before exec. fixed: [ruby-dev:25112]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 04:56:07 +00:00
usa bc4088d768 * win32/win32.c (rb_w32_fclose, rb_w32_close): shutdown socket
before closesocket(). fixed: [ruby-dev:25112]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 02:54:24 +00:00
usa d5b434088a * win32/win32.c (is_socket): reorder of function definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07 16:36:29 +00:00
usa c3ce319d7d * io.c (pipe_open): win32 bidirectional pipe support.
* win32/win32.[ch] (rb_w32_pipe_exec): ditto.

* win32/win32.[ch] (socketpair): new function. POSIX socketpair
  emulation.

* win32/win32.c (socketpair_internal): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07 15:47:59 +00:00
usa 571e1361b6 * io.c (dir_s_mkdir): win32 special processing doesn't need any longer.
* win32/win32.[ch] (rb_w32_mkdir): new function. POSIX.1 compatible
  interface.

* win32/win32.[ch] (rb_w32_rmdir): new function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-07 04:45:46 +00:00
usa 1acf7e6b01 * io.c (is_socket): new function.
* io.c (rb_io_close_read, rb_io_close_write): use is_socket().

* io.c (rb_io_fptr_finalize): need to check fptr->f before calling
  rb_io_fptr_cleanup().

* io.c (pipe_open): win32 pipe support (experimental).

* win32/win32.[ch] (rb_w32_pipe_exec): return file descripters
  instead of FILE structure.

* win32/win32.[ch] (rb_w32_is_socket): new function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06 11:19:27 +00:00
usa 0412ddfd24 * win32/win32.c (CreateChild): push back the last space before next
loop because CharNext() eats it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 04:17:05 +00:00
usa fce2bb5ea8 * win32/win32.[ch] (rb_w32_isatty): new function to replace MSVCRT's
isatty because it never sets errno.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 11:52:46 +00:00
usa c4ce79084f * eval.c (ruby_options): now we cannot call rb_glob() before
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
2004-11-12 06:15:40 +00:00
eban b088595db7 * win32/win32.c (isUNCRoot): should check NUL after '.'.
[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
2004-10-25 09:40:55 +00:00
usa 56173249ef * win32/win32.c (rb_w32_call_handler): workaround for Ctrl-C.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22 04:05:11 +00:00
usa 977eb1bae7 * win32/win32.c (rb_w32_getpid): don't need to use _getpid() on
mswin32 and mingw32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-13 01:50:32 +00:00
ocean 6302bcf022 * bcc32/Makefile.sub: bccwin32 port starts to use RTL dll.
(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
2004-09-10 10:24:08 +00:00
usa f4d60b5f63 * {bcc32,win32,wince}/Makefile.sub (config.h): add fcntl.
* 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
2004-09-07 03:52:15 +00:00
nobu e8d486e119 * process.c (rb_proc_exec): strip trailing spaces. [ruby-dev:24143]
* win32/win32.c (CreateChild): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-27 01:14:30 +00:00
nobu c41cefd492 * win32/win32.c (init_env): initialize HOME and USER environment
variables unless set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-18 02:22:59 +00:00
usa 564538541e * rubyio.h (rb_eof_error): should mark as NORETURN.
* 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
2004-08-12 01:56:25 +00:00
ocean 9d07076bef * win32/win32.{h,c} (rb_w32_{f,fd,fs}open): workaround for bcc32's
{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
2004-07-25 02:25:25 +00:00
usa f43b8e20c0 * win32/win32.c (rb_w32_opendir): should set errno if error occurs
when calling OS API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-21 00:27:39 +00:00
usa b1469c134c * win32/win32.c: remove unused functions and variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-09 03:47:08 +00:00
nobu 5aad820604 * io.c (pipe_open): erred program name should be reported by
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
2004-03-02 07:30:35 +00:00
nobu 0ff6bcae35 * win32/win32.c (make_cmdvector): adjust successive double-quote
handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-26 03:15:08 +00:00
nobu d6a70ac44c * io.c (pipe_open): fix typo.
* 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
2004-02-20 03:57:36 +00:00
nobu ea5679c979 * win32/win32.c, win32/win32.h: fixed prototypes.
* 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
2004-02-19 09:08:23 +00:00
nobu 03d8c88b87 * configure.in: check functions, fork spawnv.
* 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
2004-02-16 06:45:32 +00:00
usa eca7c7bdf0 * win32/win32.c (link): raise NotImplementedError on Win9X.
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
2004-02-12 04:35:30 +00:00
nobu ff9c34b3f4 * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, configure.in,
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
2004-02-09 08:48:55 +00:00
matz 7a987b9bcd * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.
[ruby-dev:22761]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-29 08:05:29 +00:00
nobu 224021104d * ext/digest/defs.h, win32/win3.c, win32/win32.h, file.c: remove
useless casts for Borland C.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-19 12:28:14 +00:00
usa 573b35d45e * win32/dir.h, win32/win32.c: fix patch miss.
* win32/Makefile.sub: fix file dependency.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-05 16:01:54 +00:00
matz caaac4db27 * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.
[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
2004-01-05 10:01:54 +00:00
matz 59dbfa3e4c * dir.c: merge tuning from H.Yamamoto <ocean@m2.ccsnet.ne.jp>.
[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
2004-01-02 16:21:26 +00:00
eban 66598727ef win32/win32.c (rb_win32_stat): add "." to buf1 only if it has a drive letter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27 09:13:50 +00:00
eban 4539512afc * win32/win32.c (rb_w32_stat): remove _fullpath() for NUL: device.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27 08:00:23 +00:00
nobu 113423bdff * win32/win32.c (make_cmdvector): process backslashes even if a quote
is not enclosed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-06 02:42:10 +00:00
usa 9292a6254e * win32/win32.c (do_spawn, do_aspawn): should return child's exit
status to parent.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-21 06:23:51 +00:00
usa d820362c50 * win32/win32.c (do_spawn, do_aspawn): should wait child process even
if callded with P_OVERLAY.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-21 06:10:12 +00:00
usa 05ea0b76e6 * win32/win32.c (CreateChild): need to quote cmd if RUBYSHELL is set.
* 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
2003-09-05 16:25:55 +00:00
nobu b6367d64f4 * win32/win32.c (isInternalCmd): stupid miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 15:36:21 +00:00
nobu 01e3a55648 * lib/mkmf.rb (have_library, find_library): configure by library
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
2003-09-05 15:00:33 +00:00
usa 92dbabb0a4 * win32/win32.c (map_errno): support winsock error.
* 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
2003-08-26 20:17:18 +00:00
usa 381ff05505 * win32/win32.c (rb_w32_utime): never use utime() of C runtime.
[ruby-talk:77782]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-03 17:48:51 +00:00
usa f3999874e4 * win32/win32.c (isInternalCmd): shouldn't return if find end of str.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01 06:54:28 +00:00
nobu 3404b920d6 * error.c (rb_raise): snprintf() termination moved to
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
2003-07-30 06:10:09 +00:00
usa b431230396 * io.c (rb_fdopen): set errno if it's zero on win32 platforms.
* 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
2003-07-26 12:27:04 +00:00
usa 5b1008a005 * win32/win32.c (make_cmdvector): recognize quote within string.
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
2003-07-18 06:00:24 +00:00
usa 77e941269f * win32/win32.c (rb_w32_opendir): need to set errno. [ruby-talk:73761]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-17 12:30:15 +00:00