diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-05-22 18:29:01 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-22 18:29:01 +0900 |
commit | 6aae0e2ad2fdb5cc87358d7c4337e145c0b99fe9 (patch) | |
tree | 9076d8f060478d6213a1c57599316b073b131847 /compat | |
parent | 99fe1c606925ecd427af6e0338ec18936407ba48 (diff) | |
parent | 6aac70a870fc40482eca943ff0b64003497d69c1 (diff) | |
download | git-6aae0e2ad2fdb5cc87358d7c4337e145c0b99fe9.tar.gz |
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 'compat')
-rw-r--r-- | compat/simple-ipc/ipc-shared.c | 10 | ||||
-rw-r--r-- | compat/simple-ipc/ipc-unix-socket.c | 8 | ||||
-rw-r--r-- | compat/simple-ipc/ipc-win32.c | 8 |
3 files changed, 19 insertions, 7 deletions
diff --git a/compat/simple-ipc/ipc-shared.c b/compat/simple-ipc/ipc-shared.c index 1edec81595..1b9d359ab6 100644 --- a/compat/simple-ipc/ipc-shared.c +++ b/compat/simple-ipc/ipc-shared.c @@ -4,7 +4,13 @@ #include "pkt-line.h" #include "thread-utils.h" -#ifdef SUPPORTS_SIMPLE_IPC +#ifndef SUPPORTS_SIMPLE_IPC +/* + * This source file should only be compiled when Simple IPC is supported. + * See the top-level Makefile. + */ +#error SUPPORTS_SIMPLE_IPC not defined +#endif int ipc_server_run(const char *path, const struct ipc_server_opts *opts, ipc_server_application_cb *application_cb, @@ -24,5 +30,3 @@ int ipc_server_run(const char *path, const struct ipc_server_opts *opts, return ret; } - -#endif /* SUPPORTS_SIMPLE_IPC */ diff --git a/compat/simple-ipc/ipc-unix-socket.c b/compat/simple-ipc/ipc-unix-socket.c index 38689b278d..1927e6ef4b 100644 --- a/compat/simple-ipc/ipc-unix-socket.c +++ b/compat/simple-ipc/ipc-unix-socket.c @@ -6,8 +6,12 @@ #include "unix-socket.h" #include "unix-stream-server.h" -#ifdef NO_UNIX_SOCKETS -#error compat/simple-ipc/ipc-unix-socket.c requires Unix sockets +#ifndef SUPPORTS_SIMPLE_IPC +/* + * This source file should only be compiled when Simple IPC is supported. + * See the top-level Makefile. + */ +#error SUPPORTS_SIMPLE_IPC not defined #endif enum ipc_active_state ipc_get_active_state(const char *path) diff --git a/compat/simple-ipc/ipc-win32.c b/compat/simple-ipc/ipc-win32.c index 8f89c02037..8dc7bda087 100644 --- a/compat/simple-ipc/ipc-win32.c +++ b/compat/simple-ipc/ipc-win32.c @@ -4,8 +4,12 @@ #include "pkt-line.h" #include "thread-utils.h" -#ifndef GIT_WINDOWS_NATIVE -#error This file can only be compiled on Windows +#ifndef SUPPORTS_SIMPLE_IPC +/* + * This source file should only be compiled when Simple IPC is supported. + * See the top-level Makefile. + */ +#error SUPPORTS_SIMPLE_IPC not defined #endif static int initialize_pipe_name(const char *path, wchar_t *wpath, size_t alloc) |