diff options
author | Brad King <brad.king@kitware.com> | 2017-09-13 18:33:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-17 15:10:18 (GMT) |
commit | 714ce728828c267da9a5c0d9f2e48eb5f88a8336 (patch) | |
tree | 6b7857ad6dddef5f691ebb609c1d43e695e21d58 /Utilities/cmlibuv/include | |
parent | 6a2d967de07a52f0460089999349e31741b402f8 (diff) | |
download | CMake-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/include')
-rw-r--r-- | Utilities/cmlibuv/include/uv-unix.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Utilities/cmlibuv/include/uv-unix.h b/Utilities/cmlibuv/include/uv-unix.h index d775450..ff59bcb 100644 --- a/Utilities/cmlibuv/include/uv-unix.h +++ b/Utilities/cmlibuv/include/uv-unix.h @@ -44,7 +44,9 @@ #include "uv-threadpool.h" -#if defined(__linux__) +#ifdef CMAKE_BOOTSTRAP +# include "uv-posix.h" +#elif defined(__linux__) # include "uv-linux.h" #elif defined (__MVS__) # include "uv-os390.h" @@ -124,6 +126,17 @@ typedef int uv_file; typedef int uv_os_sock_t; typedef int uv_os_fd_t; +#ifdef CMAKE_BOOTSTRAP +#define UV_ONCE_INIT 0 +typedef int uv_once_t; +typedef int uv_thread_t; +typedef int uv_mutex_t; +typedef int uv_rwlock_t; +typedef int uv_sem_t; +typedef int uv_cond_t; +typedef int uv_key_t; +typedef int uv_barrier_t; +#else #define UV_ONCE_INIT PTHREAD_ONCE_INIT typedef pthread_once_t uv_once_t; @@ -134,6 +147,7 @@ typedef UV_PLATFORM_SEM_T uv_sem_t; typedef pthread_cond_t uv_cond_t; typedef pthread_key_t uv_key_t; typedef pthread_barrier_t uv_barrier_t; +#endif /* Platform-specific definitions for uv_spawn support. */ |