summaryrefslogtreecommitdiffstats
path: root/lib/socketpair.h
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2023-12-06 07:11:44 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-12 01:23:24 (GMT)
commitfe5ffe06a9e09b7be5ff432049cb427894a78dcb (patch)
tree90d6d6bc37c5f29a13e8e6dea024ea4821ebfda2 /lib/socketpair.h
parente6a6c1abc1e6b6e3ca9fa77947279509b55e2b01 (diff)
downloadCMake-fe5ffe06a9e09b7be5ff432049cb427894a78dcb.zip
CMake-fe5ffe06a9e09b7be5ff432049cb427894a78dcb.tar.gz
CMake-fe5ffe06a9e09b7be5ff432049cb427894a78dcb.tar.bz2
curl 2023-12-06 (7161cb17)
Code extracted from: https://github.com/curl/curl.git at commit 7161cb17c01dcff1dc5bf89a18437d9d729f1ecd (curl-8_5_0).
Diffstat (limited to 'lib/socketpair.h')
-rw-r--r--lib/socketpair.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/socketpair.h b/lib/socketpair.h
index 306ab5d..bd499ab 100644
--- a/lib/socketpair.h
+++ b/lib/socketpair.h
@@ -25,6 +25,23 @@
***************************************************************************/
#include "curl_setup.h"
+
+#ifdef HAVE_PIPE
+
+#define wakeup_write write
+#define wakeup_read read
+#define wakeup_close close
+#define wakeup_create pipe
+
+#else /* HAVE_PIPE */
+
+#define wakeup_write swrite
+#define wakeup_read sread
+#define wakeup_close sclose
+#define wakeup_create(p) Curl_socketpair(AF_UNIX, SOCK_STREAM, 0, p)
+
+#endif /* HAVE_PIPE */
+
#ifndef HAVE_SOCKETPAIR
#include <curl/curl.h>