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.