git-compat-util.h: remove redundant code
PATCH 1/1 git-compat-util.h: remove redundant code
Since commit 3a0a3a89 ("git-compat-util.h: don't define _XOPEN_SOURCE on cygwin", 23-11-2014) removed the definition of _XOPEN_SOURCE on cygwin, the code within a pre-processor conditional further down the file became redundant. Remove the redundant code.
This effectively reverts commit 41b20017 ("Fix an "implicit function definition" warning", 03-03-2007).
---
Hi Junio,
I have a very vague recollection (back in March 2007) of trying to fix the problem from commit 41b20017 using the solution in commit 3a0a3a89. However, I can't remember the result! :(
I guess, by implication, there is a chance that it failed because (at that time) something required _XOPEN_SOURCE to be set on cygwin. It is clearly not the case for the current version of cygwin (v1.7.34, x86_64). (I also tested on my old 32-bit laptop with an older cygwin - it's been about a year since I updated that version of cygwin.)
[Hmm, would it be easier to change the conditional(s) to set _XOPEN_SOURCE only for systems that require it (rather than avoid setting it for those that don't)! I suspect only sun, AIX 5.3L and OpenBSD need it set. dunno.]
ATB,
Ramsay Jones
git-compat-util.h | 6 ------ 1 file changed, 6 deletions(-)
git-compat-util.h +0 -6
@@ -164,16 +164,10 @@typedef long intptr_t ;typedef unsigned long uintptr_t ;#endif -#if defined(__CYGWIN__) -#undef _XOPEN_SOURCE -#include <grp.h> -#define _XOPEN_SOURCE 600 -#else #undef _ALL_SOURCE/* AIX 5.3L defines a struct list with _ALL_SOURCE. */ #include <grp.h> #define _ALL_SOURCE 1#endif -#endif /* used on Mac OS X */ #ifdef PRECOMPOSE_UNICODE
Signature · 1 line
2.3.0