summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/unix/internal.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-13 18:33:38 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-17 15:10:18 (GMT)
commit714ce728828c267da9a5c0d9f2e48eb5f88a8336 (patch)
tree6b7857ad6dddef5f691ebb609c1d43e695e21d58 /Utilities/cmlibuv/src/unix/internal.h
parent6a2d967de07a52f0460089999349e31741b402f8 (diff)
downloadCMake-714ce728828c267da9a5c0d9f2e48eb5f88a8336.zip
CMake-714ce728828c267da9a5c0d9f2e48eb5f88a8336.tar.gz
CMake-714ce728828c267da9a5c0d9f2e48eb5f88a8336.tar.bz2
bootstrap: Make libuv available during bootstrap
On UNIX, build only the parts of libuv we need for the filesystem, process, and poll abstractions using the POSIX poll() backend. This avoids many platform-specific conditions. On Windows, build all of libuv; there are no conditional alternatives anyway.
Diffstat (limited to 'Utilities/cmlibuv/src/unix/internal.h')
-rw-r--r--Utilities/cmlibuv/src/unix/internal.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/Utilities/cmlibuv/src/unix/internal.h b/Utilities/cmlibuv/src/unix/internal.h
index 2e3afa6..e9f7908 100644
--- a/Utilities/cmlibuv/src/unix/internal.h
+++ b/Utilities/cmlibuv/src/unix/internal.h
@@ -59,7 +59,17 @@
# include <AvailabilityMacros.h>
#endif
-#if defined(__ANDROID__)
+#if defined(CMAKE_BOOTSTRAP)
+# undef pthread_atfork
+# define pthread_atfork(prepare, parent, child) \
+ uv__pthread_atfork(prepare, parent, child)
+int uv__pthread_atfork(void (*prepare)(void), void (*parent)(void),
+ void (*child)(void));
+# undef pthread_sigmask
+# define pthread_sigmask(how, set, oldset) \
+ uv__pthread_sigmask(how, set, oldset)
+int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
+#elif defined(__ANDROID__)
int uv__pthread_sigmask(int how, const sigset_t* set, sigset_t* oset);
# ifdef pthread_sigmask
# undef pthread_sigmask
@@ -261,7 +271,7 @@ FILE* uv__open_file(const char* path);
int uv__getpwuid_r(uv_passwd_t* pwd);
-#if defined(__APPLE__)
+#if defined(__APPLE__) && !defined(CMAKE_BOOTSTRAP)
int uv___stream_fd(const uv_stream_t* handle);
#define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle)))
#else