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

74 Коммитов

Автор SHA1 Сообщение Дата
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
usa ad8c8144d4 * win32/win32.c (rb_w32_stat): fix buffer overflow. (ruby-bugs:PR#329)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-27 14:57:10 +00:00
H_Konishi 42c59aa317 *bcc32 fix for win9x.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-14 12:21:50 +00:00
H_Konishi d0b3651906 new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 01:27:48 +00:00
H_Konishi d7c1784297 Wed May 29 18:55:47 2002 KONISHI Hiromasa <H_Konishi@ruby-lang.org>
* 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
2002-05-29 10:22:19 +00:00
eban c85ab121ff * win32/win32.c (insert): fix prototype for ANSI C.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-28 09:15:02 +00:00
eban 5898798b80 * win32/win32.c: include <mswsock.h> on __MINGW32__.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-19 07:33:18 +00:00
nobu 2a86587d95 * win32/win32.c (StartSockets): remove duplicated lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 10:49:05 +00:00
usa 43271e97ab * win32/win32.c (mypopen): fixed that mypclose() didn't really close
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
2001-11-26 07:59:01 +00:00
usa a79f85e6cf * hash.c (ruby_setenv): remove USE_WIN32_RTL_ENV block since it's
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
2001-11-14 18:41:46 +00:00
usa d51279d862 * win32/win32.c (waitpid): fix wait count.
* 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
2001-11-13 16:14:42 +00:00
usa 90ff4f01ab * win32/win32.c (mypopen): return error status instead of calling
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
2001-11-13 07:50:20 +00:00
usa c5ca1bc929 * hash.c (envix): use GET_ENVIRON and FREE_ENVIRON to get environment
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
2001-11-13 03:59:20 +00:00
usa 906d9cc83b * win32/win32.c (isInternalCmd): check return value of NtMakeCmdVector (Tietew <tietew@tietew.net>'s patch).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-25 01:47:47 +00:00
usa 3a42901a80 * dln.c (dln_strerror): fix a bug that sometimes made null message on
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
2001-08-24 05:45:55 +00:00
usa e5de410caf * win32/win32.c (NtCmdGlob): avoid VC++ warning.
* 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
2001-08-15 18:51:58 +00:00
usa 0f55389d96 * win32/win32.c (kill): add support of signal 9 on mswin32/mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-12 06:47:24 +00:00
matz 1d3d27b42d forgot some checkins.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-06 15:06:00 +00:00
eban 2ed9c79bbb * win32/win32.c: use ruby's opendir on mingw32.
* win32/dir.h, dir.c, Makefile: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-01 16:22:13 +00:00
eban 22198c30b1 * win32/win32.c (isUNCRoot): multibyte character support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-21 15:18:05 +00:00
eban 424c3fb43d * win32/win32.c (win32_stat): WinNT/2k "//host/share" support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-21 14:12:09 +00:00
eban 7aaceb6d9a rb_iglob -> rb_globi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-21 04:18:10 +00:00
usa 98e25a542a * win32/dir.h: replace missing/dir.h .
* 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
2001-03-20 23:10:05 +00:00
eban a84d087d3c * win32/win32.c (win32_stat): UNC support.
* dir.c (extract_path): fix "./*" problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-20 14:50:43 +00:00
eban 551ab77c38 * win32/win32.c (gettimeofday): use GetLocalTime() instead of ftime()
for high-resolution timing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-05 08:29:01 +00:00
eban 9ce5d1f0f5 * win32/win32.c (myrename): fix error handling.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-24 13:19:13 +00:00
usa 92e4b1b06e * win32/win32.c: fasten file I/O on mswin32/mingw32.
* win32/win32.h: ditto.

* rubysig.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-17 15:17:10 +00:00
usa 08f8ab9c37 * win32/win32.c (win32_stat): replace stat for enable when pathname
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
2001-02-09 15:02:14 +00:00
matz ed520cf6e9 * parse.y (parse_quotedwords): %w should allow parenthesis escape.
* parse.y (parse_qstring): %q should allow terminator escape.

* re.c (rb_reg_options): new method to give an option values.

* parse.y (cond0): disable special treating of integer literal in
  conditional unless option -e is supplied.  changes current
  behavior.  experimental.

* parse.y (cond0): give warning for string/integer literals and
  dot operators in conditionals unless option -e is supplied.

* re.c (rb_reg_equal): all option flags should be same to be equal.

* error.c (Init_Exception): make Interrupt a subclass of
  SignalException.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-08 09:19:27 +00:00
usa ac8a2a31c2 *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-14 09:22:24 +00:00
matz e6bf7809f3 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-22 09:00:23 +00:00
matz 2322a13127 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-08 07:10:38 +00:00
eban 3634fde44d eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-20 01:24:28 +00:00
matz 074203d270 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-16 07:24:21 +00:00
matz 46620a8772 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-14 07:10:31 +00:00
eban e9cf3b3bf5 eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-13 10:11:31 +00:00
matz c90b1ecaf8 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-31 08:37:47 +00:00