[#37050] [Feature #735] Date#inspect — "rubikitch ." <redmine@...>

Feature #735: Date#inspect

14 messages 2008/11/09

[#37075] [Feature #747] /\A/u ignores BOM — Shyouhei Urabe <redmine@...>

Feature #747: /\A/u ignores BOM

14 messages 2008/11/12

[#37161] m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...>

Yuguiです。

35 messages 2008/11/24
[#37183] Re: m17n of irb — keiju@... (keiju ISHITSUKA) 2008/11/25

けいじゅ@いしつかです.

[#37203] Re: m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...> 2008/11/26

keiju ISHITSUKA さんは書きました:

[#37292] Re: m17n of irb — Yukihiro Matsumoto <matz@...> 2008/12/06

まつもと ゆきひろです

[#37293] Re: m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...> 2008/12/07

Yuguiです。

[#37298] Re: m17n of irb — Yukihiro Matsumoto <matz@...> 2008/12/07

まつもと ゆきひろです

[#37210] RSS::Maker.create(version) — "Akinori MUSHA" <knu@...>

 RSS::Maker で、 "2.0" 等の文字列でフィードのフォーマットを渡す

15 messages 2008/11/27

[#37213] Re: [ruby-cvs:27586] Ruby:r20368 (trunk): * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return — Tadayoshi Funaba <tadf@...>

> * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return

8 messages 2008/11/27

[ruby-dev:37092] ruby-1.8.7-p72 (mswin32) socket protocol missing

From: arton <artonx@...>
Date: 2008-11-13 12:10:43 UTC
List: ruby-dev #37092
artonです。

Ruby-1.8.7-p72 ですが、WSAEnumProtocolsで列挙されないプロトコルがあるた
め、Socket作成に失敗します。1.9.1でも同様だと思います。
具体的には、Vista64(32ビット互換レイヤ上)でAF_INET、PROTO_ICMP、
SOCK_RAWを指定してSocket.newを呼ぶと、上記の組み合わせがWSAEnumProtocols
では返らないため、エラーとなります。
しかし、実際には、WSASocketに対してLPWSAPROTOCOL_INFOパラメータにNULLを
設定すると、期待通りのsocketが作成されます。したがって、WSAEnumProtocols
で見つからなかった場合であっても、LPWSAPROTOCL_INFOにNULLを設定して
WSASocketを呼び出していただけないでしょうか。
パッチを添付します。
テストプログラムとしては、http://svn.arton.no-ip.info/raa/trunk/icmpping/
の、icmpping.rbとpingtest.rbでテストできると思います(Administratorの必
要がありますけど)。

よろしくお願いします。

-- 
arton <artonx@yahoo.co.jp>

Attachments (1)

win32.diff (1.09 KB, text/x-diff)
*** win32.c~	Fri Jun 06 19:39:57 2008
--- win32.c	Thu Nov 13 21:03:04 2008
*************** open_ifs_socket(int af, int type, int pr
*** 2633,2638 ****
--- 2633,2639 ----
  		WSAEnumProtocols(NULL, proto_buffers, &proto_buffers_len);
  	    if (protocols_available != SOCKET_ERROR) {
  		int i;
+                 WSAPROTOCOL_INFO *pinfo = NULL;
  		for (i = 0; i < protocols_available; i++) {
  		    if ((af != AF_UNSPEC && af != proto_buffers[i].iAddressFamily) ||
  			(type != proto_buffers[i].iSocketType) ||
*************** open_ifs_socket(int af, int type, int pr
*** 2642,2650 ****
  		    if ((proto_buffers[i].dwServiceFlags1 & XP1_IFS_HANDLES) == 0)
  			continue;
  
! 		    out = WSASocket(af, type, protocol, &(proto_buffers[i]), 0, 0);
  		    break;
  		}
  	    }
  
  	    free(proto_buffers);
--- 2643,2652 ----
  		    if ((proto_buffers[i].dwServiceFlags1 & XP1_IFS_HANDLES) == 0)
  			continue;
  
! 		    pinfo = &(proto_buffers[i]);
  		    break;
  		}
+                 out = WSASocket(af, type, protocol, pinfo, 0, 0);
  	    }
  
  	    free(proto_buffers);

In This Thread

Prev Next