Call it NO_IPV6 rather than hard-coding __CYGWIN__
hpa committed
Sep 28, 2005 at 16:52 UTC
49744d63e9c5ffdfb4677bd3aaeafb3371c3fdc1
2 files changed
+14
-4
Makefile
+11
-1
@@ -29,6 +29,8 @@
29
#
30
# Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
31
#
32
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
33
+#
34
# Define COLLISION_CHECK below if you believe that SHA1's
35
# 1461501637330902918203684832716283019655932542976 hashes do not give you
36
# sufficient guarantee that no collisions between objects will ever happen.
@@ -97,7 +99,11 @@ SCRIPT_PYTHON = \
99
# The ones that do not have to link with lcrypto nor lz.
100
SIMPLE_PROGRAMS = \
101
git-get-tar-commit-id git-mailinfo git-mailsplit git-stripspace \
100
- git-daemon git-var
102
+ git-var
103
+ifndef NO_IPV6
104
+# Not supported to IPv6-challenged platforms yet
105
+SIMPLE_PROGRAMS += git-daemon
106
+endif
107
108
# ... and all the rest
109
PROGRAMS = \
@@ -175,6 +181,7 @@ endif
181
ifeq ($(shell uname -o),Cygwin)
182
NO_STRCASESTR = YesPlease
183
NEEDS_LIBICONV = YesPlease
184
+ NO_IPV6 = YesPlease
185
endif
186
ifneq (,$(findstring arm,$(shell uname -m)))
187
ARM_SHA1 = YesPlease
@@ -231,6 +238,9 @@ ifdef NO_STRCASESTR
238
DEFINES += -Dstrcasestr=gitstrcasestr
239
LIB_OBJS += compat/strcasestr.o
240
endif
241
+ifdef NO_IPV6
242
+ DEFINES += -DNO_IPV6
243
+endif
244
245
ifdef PPC_SHA1
246
SHA1_HEADER = "ppc/sha1.h"
connect.c
+3
-3
@@ -290,7 +290,7 @@ static enum protocol get_protocol(const char *name)
290
#define STR_(s) # s
291
#define STR(s) STR_(s)
292
293
-#ifndef __CYGWIN__
293
+#ifndef NO_IPV6
294
295
static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
296
{
@@ -348,7 +348,7 @@ static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
348
return 0;
349
}
350
351
-#else /* __CYGWIN__ */
351
+#else /* NO_IPV6 */
352
353
static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
354
{
@@ -417,7 +417,7 @@ static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
417
return 0;
418
}
419
420
-#endif /* __CYGWIN__ */
420
+#endif /* NO_IPV6 */
421
422
/*
423
* Yeah, yeah, fixme. Need to pass in the heads etc.