summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-22 09:29:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-22 09:29:01 (GMT)
commit6aae0e2ad2fdb5cc87358d7c4337e145c0b99fe9 (patch)
tree9076d8f060478d6213a1c57599316b073b131847 /Makefile
parent99fe1c606925ecd427af6e0338ec18936407ba48 (diff)
parent6aac70a870fc40482eca943ff0b64003497d69c1 (diff)
downloadgit-6aae0e2ad2fdb5cc87358d7c4337e145c0b99fe9.zip
git-6aae0e2ad2fdb5cc87358d7c4337e145c0b99fe9.tar.gz
git-6aae0e2ad2fdb5cc87358d7c4337e145c0b99fe9.tar.bz2
Merge branch 'jh/simple-ipc-sans-pthread'
The "simple-ipc" did not compile without pthreads support, but the build procedure was not properly account for it. * jh/simple-ipc-sans-pthread: simple-ipc: correct ifdefs when NO_PTHREADS is defined
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 79bf9fe..c3565fc 100644
--- a/Makefile
+++ b/Makefile
@@ -1687,13 +1687,31 @@ ifdef NO_UNIX_SOCKETS
else
LIB_OBJS += unix-socket.o
LIB_OBJS += unix-stream-server.o
- LIB_OBJS += compat/simple-ipc/ipc-shared.o
- LIB_OBJS += compat/simple-ipc/ipc-unix-socket.o
endif
+# Simple IPC requires threads and platform-specific IPC support.
+# Only platforms that have both should include these source files
+# in the build.
+#
+# On Windows-based systems, Simple IPC requires threads and Windows
+# Named Pipes. These are always available, so Simple IPC support
+# is optional.
+#
+# On Unix-based systems, Simple IPC requires pthreads and Unix
+# domain sockets. So support is only enabled when both are present.
+#
ifdef USE_WIN32_IPC
+ BASIC_CFLAGS += -DSUPPORTS_SIMPLE_IPC
LIB_OBJS += compat/simple-ipc/ipc-shared.o
LIB_OBJS += compat/simple-ipc/ipc-win32.o
+else
+ifndef NO_PTHREADS
+ifndef NO_UNIX_SOCKETS
+ BASIC_CFLAGS += -DSUPPORTS_SIMPLE_IPC
+ LIB_OBJS += compat/simple-ipc/ipc-shared.o
+ LIB_OBJS += compat/simple-ipc/ipc-unix-socket.o
+endif
+endif
endif
ifdef NO_ICONV