At 2007-12-04T15:18:18-0800, Zack Weinberg wrote: > On Dec 4, 2007 12:11 PM, Matthew Gregan <[EMAIL PROTECTED]> wrote: > > Right, that code is an implementation of socketpair() for Windows because it > > is not provided by the Windows socket API. Cross platform refers to the > > rest of the code--all platforms can use socketpair() and almost all of the > > rest of the code can be shared between platforms (except for process > > creation, but we probably already have sufficient wrappers for these in the > > $platform/ directories already). > > There is one wrinkle - if I understand that code correctly, it's > necessary to call closesocket() instead of close() on the fds returned > from that socketpair implementation. I guess we could just #define > closesocket(n) close(n) on Unix...
Yeah, true. The problem is that there is no close() on Windows (there's _close() for CRT file descriptors, closesocket() for WinSock sockets, and CloseHandle() for most other things). It shouldn't be a big deal to abstract away--either with a #define or by adding a closesocket() into our platform code. Cheers, -mjg -- Matthew Gregan |/ /| [EMAIL PROTECTED] _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel