{"thread":{"id":"10838","subject":"[PATCH] Fix a strchrnul() related build error","startedAt":"2007-11-12T21:01:22Z","lastAt":"2007-11-12T22:12:18Z","messageCount":3,"participants":["Emil Medve","Johannes Schindelin","Medve Emilian"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"59573","messageId":"1194901282-2468-1-git-send-email-Emilian.Medve@Freescale.com","threadId":"10838","inReplyTo":null,"subject":"[PATCH] Fix a strchrnul() related build error","fromName":"Emil Medve","fromEmail":"emilian.medve@freescale.com","sentAt":"2007-11-12T21:01:22Z","receivedAt":"2007-11-12T21:01:22Z","isPatch":true,"sender":{"key":"emilian.medve@freescale.com","avatar":null},"body":"Systems/environments without glibc (such as CygWin), and as a consequence whithout the\n__GLIBC_PREREQ() macro, fail to build with the following error message:\n\n    CC git.o\nIn file included from builtin.h:4,\n                 from git.c:1:\ngit-compat-util.h:187:48: missing binary operator before token \"(\"\n\nSigned-off-by: Emil Medve <Emilian.Medve@Freescale.com>\n---\n\nHere is a relevant comment from my Linux box features.h:\n\n/* Convenience macros to test the versions of glibc and gcc.\n   Use them like this:\n   #if __GNUC_PREREQ (2,8)\n   ... code requiring gcc 2.8 or later ...\n   #endif\n   Note - they won't work for gcc1 or glibc1, since the _MINOR macros\n   were not defined then.  */\n\nMy CygWin gcc version is:\n\n$ gcc -dumpversion\n3.4.4\n\nThis applies to next\n\n git-compat-util.h |    8 +++++++-\n 1 files changed, 7 insertions(+), 1 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 3d147b6..c4ed308 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -184,7 +184,13 @@ void *gitmemmem(const void *haystack, size_t haystacklen,\n                 const void *needle, size_t needlelen);\n #endif\n \n-#if !defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 1)\n+#ifndef __GLIBC_PREREQ\n+#define NO_STRCHRNUL\n+#elif !__GLIBC_PREREQ(2, 1)\n+#define NO_STRCHRNUL\n+#endif\n+\n+#ifdef NO_STRCHRNUL\n #define strchrnul gitstrchrnul\n static inline char *gitstrchrnul(const char *s, int c)\n {\n-- \n1.5.3.5.1466.gfa36\n"},{"id":"59575","messageId":"Pine.LNX.4.64.0711122126370.4362@racer.site","threadId":"10838","inReplyTo":"1194901282-2468-1-git-send-email-Emilian.Medve@Freescale.com","subject":"Re: [PATCH] Fix a strchrnul() related build error","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-12T21:27:06Z","receivedAt":"2007-11-12T21:27:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\ndidn't Johannes Sixt provide a (slightly nicer) patch earlier today?\n\nCiao,\nDscho\n"},{"id":"59584","messageId":"598D5675D34BE349929AF5EDE9B03E27017BC128@az33exm24.fsl.freescale.net","threadId":"10838","inReplyTo":"Pine.LNX.4.64.0711122126370.4362@racer.site","subject":"RE: [PATCH] Fix a strchrnul() related build error","fromName":"Medve Emilian","fromEmail":"emilian.medve@freescale.com","sentAt":"2007-11-12T22:12:18Z","receivedAt":"2007-11-12T22:12:18Z","isPatch":true,"sender":{"key":"emilian.medve@freescale.com","avatar":null},"body":"Hi Dscho,\n\n> didn't Johannes Sixt provide a (slightly nicer) patch earlier today?\n\nThat is nicer and should go into the tree.\n\n\nCheers,\nEmil.\n"}]}