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

110 Коммитов

Автор SHA1 Сообщение Дата
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
eban e617fd0bf8 * win32/win32.c (_CRTIMP): redefine _CRTIMP on MinGW.
* 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
2003-05-29 09:11:18 +00:00
usa 3b68b107e9 * win32/win32.c (kill): set errno after calling raise().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-20 04:32:52 +00:00
usa 277d89447a * win32/win32.c (kill): fix typo and add signal 0 support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-15 00:33:57 +00:00
eban b7e6fc019c * win32/win32.c (NtInitialize): set the floating-point control word
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
2003-04-20 14:35:41 +00:00
nobu 6e4a83c0a3 * win32/win32.c (rb_w32_stat): check arguments. [ruby-dev:20007]
[ruby-win32:535]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 10:02:37 +00:00
usa 63f3bb891c * win32/win32.c (map_errno): map OS error to errno. [new]
* 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
2003-02-28 15:01:56 +00:00
nobu 801406cb5d * win32/win32.c (flock): supports larger files, and maps error
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
2003-02-28 13:54:14 +00:00
nobu d019ce0ad1 * win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-17 05:36:59 +00:00
usa 396f32c98e * win32/win32.c (link): implement with CreateHardLink().
* 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
2003-02-17 05:17:46 +00:00
usa 0243dab598 * win32/win32.c (pipe_exec): remove unnecessary SetStdHandle().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-22 14:21:07 +00:00
usa a8bb4ed577 * process.c (proc_exec_v): follow to proc_spawn_v(). call do_aspawn()
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
2003-01-06 04:30:27 +00:00
usa b369eea79f * file.c (utimbuf): use utimbuf instead of _utimbuf if defined _WIN32.
* 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
2003-01-04 18:17:30 +00:00
usa d80285a9fe * process.c (rb_proc_exec): use same logic as DJGPP on win32 ports.
* 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
2003-01-04 06:26:10 +00:00
matz 90c4dae08f WinCE patch merged
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-02 07:57:17 +00:00
nobu c405dbf692 * win32/win32.c (rb_w32_stat): empty path is invalid, and return
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
2002-12-01 13:47:06 +00:00
nobu 1de50c518b * win32/win32.c (rb_w32_putc): wrong condition to fill or flush on
bccwin32.  [ruby-win32:408]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-12 14:47:07 +00:00
nobu 31ab445fea * win32/win32.c (rb_w32_fclose, rb_w32_close): use closesocket()
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
2002-10-10 21:07:16 +00:00
nobu c691d09dc1 * ext/socket/socket.c (init_sock): no need for special finalizer,
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
2002-10-01 15:26:39 +00:00
nobu 7345d0efd4 * win32/win32.c (rb_w32_open_osfhandle): adjust
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
2002-09-29 09:31:58 +00:00
usa 62280094cd * win32/win32.c (is_socket, 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):
  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
2002-09-28 21:39:57 +00:00
H_Konishi 94e5dc3416 * win32/win32.c (rb_w32_opendir): Corresponds to the unjust path containing ".
(rb_w32_stat) : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-15 13:02:09 +00:00
usa d0c6f63804 * win32/win32.c, win32/win32.h (rb_w32_getpid): negate pid under Win9x.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 08:50:13 +00:00
usa d1a4bf7d3a * time.c: prototype; time_free() to avoid VC++ warnings.
* 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
2002-09-08 10:06:40 +00:00
nobu 8790d9b76e * win32/win32.c (kill): negate pid under Win9x.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 08:56:25 +00:00
usa c1454b3acb * win32/win32.h: define SIGINT and SIGKILL if not defined.
* 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
2002-08-28 02:39:29 +00:00
H_Konishi 5738d62912 * replace of check EPIPE error(in getc()) rutine on bcc32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-20 13:03:22 +00:00
eban 7f2348488f * ext/tcltklib/stubs.c (ruby_tcltk_stubs): win32_getenv returns
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
2002-07-30 06:34:27 +00:00
usa 2f2143a2be * io.c (pipe_finalize, pipe_popen): two-way pipe support for win32.
* 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
2002-06-28 18:26:01 +00:00