Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- Sep 13, 2013, 12:33 UTC
- Message-ID
- <CAHGBnuN+HkZt48Pg2sHnYAhYW7EufWhO6rfgKpgaSOGeGA0Z4w@mail.gmail.com>
- In-Reply-To
- <xmqqvc25ol9n.fsf@gitster.dls.corp.google.com>
On Thu, Sep 12, 2013 at 10:08 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>> I'm not too happy with the wording either. As I see it, even on MinGW >> runtime version 4.0 it's not true that "string.h has _only_ inline >> definition of strcasecmp"; there's also "#define strncasecmp >> _strnicmp" which effectively provides a non-inline definition of >> strncasecmp aka _strnicmp. > > I do not get this part. Sure, string.h would have definitions of > things other than strcasecmp, such as strncasecmp. So what?
Sorry, I mixed up "strcasecmp" and "strncasecmp".
> Does it "effectively" provide a non-inline definition of strcasecmp?
Yes, if __NO_INLINE__ is defined string.h provides non-inline definition of both "strcasecmp" and "strncasecmp" by defining them to "_stricmp" and "_strnicmp" respectively.
Show 7 quoted lines
> Perhaps the real issue is that the header file does not give an > equivalent "those who want to take the address of strcasecmp will > get the address of _stricmp instead" macro, e.g. > > #define strcasecmp _stricmp > > or something?
Now it's you who puzzles me, because the header file *does* have exactly the macro that you suggest.
Anyway, I think Peff's reply to my other mail summed it up nicely. I will come up with another patch.
-- Sebastian Schuberth