[PATCH] git-compat-util.h: remove redundant code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).

Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
---

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(-)

diff --git a/git-compat-util.h b/git-compat-util.h
index 68c07af..49c0637 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -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
-- 
2.3.0
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]