summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e79f00)
raw | patch | inline | side by side (parent: 9e79f00)
author | Johannes Sixt <j.sixt@viscovery.net> | |
Mon, 12 Nov 2007 10:09:05 +0000 (11:09 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Nov 2007 02:16:34 +0000 (18:16 -0800) |
Apart from the error in the condition (&& should actually be ||), the
construct
#if !defined(A) || !A
leads to a syntax error in the C preprocessor if A is indeed not defined.
Tested-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
construct
#if !defined(A) || !A
leads to a syntax error in the C preprocessor if A is indeed not defined.
Tested-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h | patch | blob | history |
diff --git a/git-compat-util.h b/git-compat-util.h
index 92d79673f8eddeb48b15dbbc3bff85fa39542b77..ede9408bbd14880b3534110586562c2e6df8b07b 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
const void *needle, size_t needlelen);
#endif
-#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)
{