Re: MinGW port usable
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 30, 2007, 10:07 UTC
- Message-ID
- <Pine.LNX.4.63.0701301105540.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <45BF0098.8FF978CE@eudaptics.com>
Hi,
On Tue, 30 Jan 2007, Johannes Sixt wrote:
Show 18 quoted lines
> Daniel Barkalow wrote: > > > > On Mon, 29 Jan 2007, 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. > > > > Can you do > > > > #define read(fd, buffer, len) recv(fd, buffer, len, 0) > > #define write(fd, buffer, len) send(fd, buffer, len, 0) > > > > in the appropriate file? > > I doubt that recv and send can operate on regular file descriptors, as > opened by _pipe(), open(), can they?
They can't. Thus, you'd break at least inetd mode.
Of course, you really could start a thread which gets two pipe()d fds, and the proper socket, and just shuffles things back & forth. Not that hard.
Ciao, Dscho