From: "U.Nakamura" Date: 2011-01-14T15:03:23+09:00 Subject: [ruby-core:34490] Re: Windows sockets and CRT fds Hello, In message "[ruby-core:34485] Re: Windows sockets and CRT fds" on Jan.14,2011 13:35:42, wrote: > I understand it would have to be rewritten to change it, but why was > it written that way to begin with? Aside from the effort to change it, > is there anything lost or gained by switching? Q: why was it written that way to begin with? A: Sorry, I don't know. I guess that the author might not want to put many #ifdef-s into ruby core source. Q: Aside from the effort to change it, is there anything lost or gained by switching? A: Currently the programmer of an extension library doesn't need to know about Windows if the extension library is not linked to outer libraries. After the switching, he must write two code for Unix and Windows. Of course, if the extension library depends on outer libraries which treat Unix and Windows by different way, his time will decrease because of omitting the code for ruby's faked FD. > So, I think by switching to SOCKET handles right now, more extensions > would start working on Windows than do today. I have yet to find one > which would be broken by the switch. Anyway, the patch is welcomed. If the patch is better enough than current, it will be applied naturally. (However, the timing is not certain because we must take care of ABI compatiblity.) Regards, -- U.Nakamura