Re: MinGW port usable
- From
Johannes Sixt <j.sixt@eudaptics.com>
- Date
- Feb 1, 2007, 10:34 UTC
- Message-ID
- <45C1C24A.471F40AD@eudaptics.com>
- In-Reply-To
- <45C18A3B.2070004@zytor.com>
"H. Peter Anvin" wrote:
Show 14 quoted lines
> > Johannes Sixt wrote: > > (*) The reason is that on Windows read() and write() cannot operate on > > descriptors created by socket(). A work-around is to implement a (threaded) > > proxy, but that's almost the same as if netcat were used as > > GIT_PROXY_COMMAND. > > > > Actually, I believe it can for the NT series kernels (at least 2000 or > later, not sure about the earlier ones), but not for the DOS-based ones. > > The trick is to use _open_osfhandle() to convert the file handle (a > WinAPI construct) to a file descriptor (which in Windows is a construct > of the C library.)
I tried this, but it doesn't seem to work. I get an EINVAL at the first write() to the socket. I conclude that the things returned by socket() are not WinAPI file handles that are valid for WriteFile(). :(
-- Hannes