Re: [PATCH] Simplify strchrnul() compat code
- From
David Symonds <dsymonds@gmail.com>
- Date
- Nov 12, 2007, 09:24 UTC
- Message-ID
- <ee77f5c20711120124m6281fddfs9403a46cf354b993@mail.gmail.com>
- In-Reply-To
- <473818FA.1060400@viscovery.net>
On Nov 12, 2007 8:12 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 25 quoted lines
> David Symonds schrieb:
> > On Nov 11, 2007 9:44 PM, Junio C Hamano <gitster@pobox.com> wrote:
> >> @@ -183,7 +183,7 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
> >> const void *needle, size_t needlelen);
> >> #endif
> >>
> >> -#if !defined(__GLIBC__) && !__GLIBC_PREREQ(2, 1)
> >> +#if !defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 1)
> >> #define strchrnul gitstrchrnul
> >> static inline char *gitstrchrnul(const char *s, int c)
> >> {
> >
> > I just tested it on my machine (OS X Tiger) now that it's in 'next',
> > and this breaks the build:
> >
> > CC git.o
> > In file included from builtin.h:4,
> > from git.c:1:
> > git-compat-util.h:187:48: error: missing binary operator before token "("
> > make: *** [git.o] Error 1
> >
> >
> > I don't think I have __GLIBC_PREREQ defined anywhere I can find.
>
> Turn the && in that line into || and it should work.Nope, no dice. Plus, that'd change the logic. I also tried turning the (!X && !Y) into (X || Y) to no avail.
Dave.