Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 17, 2013, 21:46 UTC
- Message-ID
- <xmqqsix3w27t.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAHGBnuMgE1zO4=MnJJXcDLJSD2Vsjptk1x2Bc6CpF9GSxmFp8w@mail.gmail.com>
Sebastian Schuberth <sschuberth@gmail.com> writes:
Show 9 quoted lines
> On Tue, Sep 17, 2013 at 6:17 PM, Junio C Hamano <gitster@pobox.com> wrote: > >> Keeping the ugliness to deal with the platform issue (i.e. broken >> string.h) in one place (e.g. compat/mingw) is far more preferrable >> than having a similar ugliness in git-compat-util.h for people on >> all other platforms to see, no? > > I don't think people on other platforms seeing the ugliness is really > an issue. After all, the file is called git-*compat*-util.h;
Well, judging from the way Linus reacted to the patch, I'd have to disagree. After all, that argument leads to the position that nothing is needed in compat/, no?
> Also, your solution does not really keep the ugliness in > one place,...
One ugliness (lack of sane strcasecmp definition whose address can be taken) specific to mingw is worked around in compat/mingw.h, and another ugliness that some people may use compilers without include_next may need help from another configuration in the Makefile to tell it where the platform string.h resides. I am not sure why you see it as a problem.
> I do insist to avoid GCC-ism in C files,...
To that I tend to agree. Unconditionally killing inlining for any mingw compilation in compat/mingw.h may be the simplest (albeit it may be less than optimal) solution.