From: Junio C Hamano Date: Wed, 11 Sep 2013 18:39:39 GMT Subject: Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined Message-ID: In-Reply-To: <523094F0.9000509@gmail.com> Sebastian Schuberth writes: > This is necessary so that read_mailmap() can obtain a pointer to the > function. Whoa, I didn't think it is even legal for a C library to supply strcmp() or strcasecmp() that are purely inline you cannot take the address of. The "solution" looks a bit too large a hammer that affects everybody, not just those who have such a set of header files. > > +#define __NO_INLINE__ /* do not inline strcasecmp() */ > +#include > +#ifdef HAVE_STRINGS_H > +#include /* for strcasecmp() */ > +#endif > +#undef __NO_INLINE__ > + > #ifdef WIN32 /* Both MinGW and MSVC */ > #define _WIN32_WINNT 0x0502 > #define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */ > @@ -99,10 +106,6 @@ > #include > #include > #include > -#include > -#ifdef HAVE_STRINGS_H > -#include /* for strcasecmp() */ > -#endif > #include > #include > #ifdef NEEDS_SYS_PARAM_H