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

Re: [PATCH] Clean up compatibility definitions.

From
Alex Riesen <raa.lkml@gmail.com>
Date
Dec 6, 2005, 07:15 UTC
Message-ID
<81b0412b0512052315p1917a04ek264c14abf41a1027@mail.gmail.com>
In-Reply-To
<7vr78r9pg0.fsf@assigned-by-dhcp.cox.net>
On 12/5/05, Junio C Hamano <junkio@cox.net> wrote:
Show 8 quoted lines
> >> This attempts to clean up the way various compatibility
> >> functions are defined and used.
> >> --- a/compat/mmap.c
> >> +++ b/compat/mmap.c
> >
> > I still think that compat functions should stand alone.
> > Especially if it does not costs us much (or even less than that).
> Sorry, you lost me.  What do you mean by "standing alone"?

Do not depend nor use anything from the calling code (do not take anything from git). If it has to serve as compatibility wrapper to mmap, it better should be mmap(2): return MAP_FAILED if error, do not exit process, do no output. I wouldn't expect open(2) to print "File not found", would you?

Besides, MAP_FAILED is perfectly handled in calling layers. If they even print out errno, the case is completely covered and simplier handled.

Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 23 in “make gitfakemmap standalone to fix linking error in git.c”
  1. Alex RiesenDec 5, 2005
  2. Alex RiesenDec 5, 2005
  3. Petr BaudisDec 5, 2005
  4. Alex RiesenDec 5, 2005
  5. Junio C HamanoDec 5, 2005
  6. Clean up compatibility definitions.Junio C Hamano, Dec 5, 2005
  7. Johannes SchindelinDec 5, 2005
  8. Junio C HamanoDec 5, 2005
  9. Alex RiesenDec 5, 2005
  10. Alex RiesenDec 6, 2005
  11. Junio C HamanoDec 6, 2005
  12. Alex RiesenDec 5, 2005
  13. Junio C HamanoDec 5, 2005
  14. Alex RiesenDec 6, 2005
  15. Junio C HamanoDec 6, 2005
  16. Alex RiesenDec 6, 2005
  17. Junio C HamanoDec 6, 2005
  18. Petr BaudisDec 5, 2005
  19. Junio C HamanoDec 6, 2005
  20. Petr BaudisDec 6, 2005
  21. Alex RiesenDec 5, 2005
  22. Junio C HamanoDec 5, 2005
  23. Alex RiesenDec 6, 2005

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.