{"thread":{"id":"38631","subject":"[PATCH] git-compat-util.h: remove redundant code","startedAt":"2015-02-23T00:07:14Z","lastAt":"2015-02-23T00:07:14Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"256491","messageId":"54EA6F32.50301@ramsay1.demon.co.uk","threadId":"38631","inReplyTo":null,"subject":"[PATCH] git-compat-util.h: remove redundant code","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2015-02-23T00:07:14Z","receivedAt":"2015-02-23T00:07:14Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSince commit 3a0a3a89 (\"git-compat-util.h: don't define _XOPEN_SOURCE\non cygwin\", 23-11-2014) removed the definition of _XOPEN_SOURCE on\ncygwin, the code within a pre-processor conditional further down the\nfile became redundant. Remove the redundant code.\n\nThis effectively reverts commit 41b20017 (\"Fix an \"implicit function\ndefinition\" warning\", 03-03-2007).\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Junio,\n\nI have a very vague recollection (back in March 2007) of trying to fix\nthe problem from commit 41b20017 using the solution in commit 3a0a3a89.\nHowever, I can't remember the result! :(\n\nI guess, by implication, there is a chance that it failed because (at\nthat time) something required _XOPEN_SOURCE to be set on cygwin. It is\nclearly not the case for the current version of cygwin (v1.7.34, x86_64).\n(I also tested on my old 32-bit laptop with an older cygwin - it's been\nabout a year since I updated that version of cygwin.)\n\n[Hmm, would it be easier to change the conditional(s) to set _XOPEN_SOURCE\nonly for systems that require it (rather than avoid setting it for those\nthat don't)! I suspect only sun, AIX 5.3L and OpenBSD need it set. dunno.]\n\nATB,\nRamsay Jones\n\n git-compat-util.h | 6 ------\n 1 file changed, 6 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 68c07af..49c0637 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -164,16 +164,10 @@\n typedef long intptr_t;\n typedef unsigned long uintptr_t;\n #endif\n-#if defined(__CYGWIN__)\n-#undef _XOPEN_SOURCE\n-#include <grp.h>\n-#define _XOPEN_SOURCE 600\n-#else\n #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */\n #include <grp.h>\n #define _ALL_SOURCE 1\n #endif\n-#endif\n \n /* used on Mac OS X */\n #ifdef PRECOMPOSE_UNICODE\n-- \n2.3.0\n"}]}