David Symonds wrote: > On Nov 12, 2007 8:50 PM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote: >> -#if !defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 1) >> +#ifdef __GLIBC_PREREQ >> +#if __GLIBC_PREREQ(2, 1) >> +#define HAVE_STRCHRNUL >> +#endif >> +#endif >> + >> +#ifndef HAVE_STRCHRNUL >> >> #define strchrnul gitstrchrnul >> static inline char *gitstrchrnul(const char *s, int c) >> { > > Yep, that works just fine. Ack. This version has also the following advantage that you can set HAVE_STRCHRNULL if above test does not detect it in your library. Althought you'd better write then: +#if __GLIBC_PREREQ(2, 1) && !defined(HAVE_STRCHRNUL) Ack. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html