On Tue, May 18, 2021 at 09:37:38AM -0400, Randall S. Becker wrote: > >+# All simple-ipc requires threads, and then individual # mechanisms > >+have their own requirements. > >+ifndef NO_PTHREADS > >+ BASIC_CFLAGS += -DSUPPORTS_SIMPLE_IPC > > LIB_OBJS += compat/simple-ipc/ipc-shared.o > >+ifndef NO_UNIX_SOCKETS > > LIB_OBJS += compat/simple-ipc/ipc-unix-socket.o > > endif > >- > > ifdef USE_WIN32_IPC > >- LIB_OBJS += compat/simple-ipc/ipc-shared.o > > LIB_OBJS += compat/simple-ipc/ipc-win32.o endif > >+endif > > > > ifdef NO_ICONV > > BASIC_CFLAGS += -DNO_ICONV > >diff --git a/simple-ipc.h b/simple-ipc.h index dc3606e30b..0f58be7945 100644 > >--- a/simple-ipc.h > >+++ b/simple-ipc.h > >@@ -4,11 +4,6 @@ > > /* > > * See Documentation/technical/api-simple-ipc.txt > > */ > >- > >-#if defined(GIT_WINDOWS_NATIVE) || !defined(NO_UNIX_SOCKETS) -#define SUPPORTS_SIMPLE_IPC -#endif > >- > > #ifdef SUPPORTS_SIMPLE_IPC > > #include "pkt-line.h" > > I'm not sure this is going to work. The platform *does* support UNIX > sockets (and not disabled) and pthreads, but we have disabled pthreads > in our build. So in the above, ipc-unix-socket.o will be included at > the ifndef NO_UNIX_SOCKETS. If NO_PTHREADS, not being pedantic, there > should be no pthread references, regardless of other considerations. > Although, at some point, I hope to resolve why pthreads (PUT) is > having issues in git on the platform but not at this point. Unless I screwed something up, it shouldn't be. There's an outer ifndef for NO_PTHREADS. Double negation aside, that means that we don't even hit the ifndef NO_UNIX_SOCKETS inside it unless we now pthreads are supported. And so we do not include ipc-unix-socket.o. For the SUPPORTS_SIMPLE_IPC flag, I just moved the logic into the Makefile. It could continue to live in simple-ipc.h, too (but then that is basically a repetition of the Makefile logic; it would have to learn the same "only if pthreads are available" conditional, too). -Peff