Conrad T. Pino wrote: >Unfortunately "sizeof((int)) == sizeof((SOCKET))" so telling them >apart isn't easy. The problem is they are seperate overlapping >number spaces. This program illustrates it nicely: >
Two thoughts. First, assuming that you have a single fd namespace, which I am not sure of, then you could wrap only the open() functions used by CVS to store an index into a private array or hash which retained whatever information about the new file descriptor that you wished. Secondly, I think all this determining the difference between sockets and files is all moot - Windows handling is already so different for sockets and files that we have to use recv() with sockets instead of read(), which is why we were dealing with all that socket-client stuff last week. All CVS sockets on Windows are wrapped in socket_buffers rather than fd_buffers. Anyhow, the select() function in fd_buffer_input() will only ever need to tell the difference between a pipe and a file descriptor on Windows, for that reason. Regards, Derek -- Derek R. Price CVS Solutions Architect Ximbiot <http://ximbiot.com> v: +1 717.579.6168 f: +1 717.234.3125 <mailto:[EMAIL PROTECTED]> _______________________________________________ Bug-cvs mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/bug-cvs
