git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: MinGW port usable

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Feb 1, 2007, 06:35 UTC
Message-ID
<45C18A3B.2070004@zytor.com>
In-Reply-To
<200701292320.43888.johannes.sixt@telecom.at>
Johannes Sixt wrote:
Show 13 quoted lines
> 
> The README.MinGW at 
> http://repo.or.cz/w/git/mingw.git?a=blob_plain;f=README.MinGW;hb=master gives 
> an overview on the state. The transfer via native git protocol does not work 
> and cannot be made working without major surgery(*). Theoretically, using 
> netcat (nc) as GIT_PROXY_COMMAND should work, but not in my setup for some 
> reason that I still do not know.
> 
> (*) 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.)

In 9x/ME, a socket isn't represented by a file handle, so _open_osfhandle() doesn't work on a socket object.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt__open_osfhandle.asp
	-hpa
Previous: Junio C HamanoNext: Johannes Sixt
Message 33 of 39 in “MinGW port usable”
  1. Johannes SixtJan 29, 2007
  2. Shawn O. PearceJan 29, 2007
  3. Christian MICHONJan 29, 2007
  4. Shawn O. PearceJan 29, 2007
  5. Christian MICHONJan 29, 2007
  6. Christian MICHONJan 30, 2007
  7. Christian MICHONJan 30, 2007
  8. Johannes SchindelinJan 30, 2007
  9. Shawn O. PearceJan 30, 2007
  10. Johannes SixtJan 30, 2007
  11. Johannes SixtJan 30, 2007
  12. Linus TorvaldsJan 29, 2007
  13. Christian MICHONJan 29, 2007
  14. Johannes SchindelinJan 30, 2007
  15. Christian MICHONJan 30, 2007
  16. Johannes SixtJan 30, 2007
  17. Johannes SchindelinJan 30, 2007
  18. Shawn O. PearceJan 30, 2007
  19. Johannes SchindelinJan 30, 2007
  20. Shawn O. PearceJan 30, 2007
  21. Johannes SchindelinJan 30, 2007
  22. Shawn O. PearceJan 30, 2007
  23. Johannes SchindelinJan 30, 2007
  24. Daniel BarkalowJan 30, 2007
  25. Johannes SixtJan 30, 2007
  26. Andreas EricssonJan 30, 2007
  27. Johannes SchindelinJan 30, 2007
  28. Daniel BarkalowJan 30, 2007
  29. Johannes SchindelinJan 30, 2007
  30. Daniel BarkalowJan 30, 2007
  31. Johannes SixtJan 30, 2007
  32. Junio C HamanoJan 30, 2007
  33. H. Peter AnvinFeb 1, 2007
  34. Johannes SixtFeb 1, 2007
  35. H. Peter AnvinFeb 1, 2007
  36. H. Peter AnvinFeb 2, 2007
  37. Davide LibenziFeb 2, 2007
  38. Johannes SixtFeb 2, 2007
  39. H. Peter AnvinFeb 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.