Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:47

Possibly related (same subject, not in this thread)

Sebastian Schuberth [off-list ref] writes:
On Tue, Sep 17, 2013 at 6:17 PM, Junio C Hamano [off-list ref] wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help