[Cmake-commits] CMake branch, next, updated. v3.6.1-1608-gfdeb50d
Brad King
brad.king at kitware.com
Tue Aug 30 09:37:25 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via fdeb50d6b51a8e189ebdb4da88b464cd981e0ad4 (commit)
via a9cc3756b63bb064850b3d56e60edf755738fcaa (commit)
via 7a64c3a1859fa90ee44909a412fafcbf7de6a6e7 (commit)
via 38069fd6637b062806a812bbc490bd2ee3406913 (commit)
from 98c49311ea16241edfb240eced28628677cc18cb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdeb50d6b51a8e189ebdb4da88b464cd981e0ad4
commit fdeb50d6b51a8e189ebdb4da88b464cd981e0ad4
Merge: 98c4931 a9cc375
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 30 09:37:24 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 30 09:37:24 2016 -0400
Merge topic 'import-libuv' into next
a9cc3756 Revert "Do not build libuv on HP-UX"
7a64c3a1 Merge branch 'upstream-libuv' into import-libuv
38069fd6 libuv 2016-08-30 (897738b1)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9cc3756b63bb064850b3d56e60edf755738fcaa
commit a9cc3756b63bb064850b3d56e60edf755738fcaa
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 30 09:34:23 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 30 09:34:23 2016 -0400
Revert "Do not build libuv on HP-UX"
This reverts commit f0a0e4559c17020101e3e0be18bac54e27a263cb.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aab8416..65876d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -484,9 +484,6 @@ int main(void) { return 0; }
elseif(CYGWIN)
# libuv does not support Cygwin
set(CMAKE_USE_LIBUV 0)
- elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
- # libuv does not support HP-UX
- set(CMAKE_USE_LIBUV 0)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
# Disable until it can be ported.
set(CMAKE_USE_LIBUV 0)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a64c3a1859fa90ee44909a412fafcbf7de6a6e7
commit 7a64c3a1859fa90ee44909a412fafcbf7de6a6e7
Merge: 87ff791 38069fd
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 30 09:33:44 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 30 09:33:44 2016 -0400
Merge branch 'upstream-libuv' into import-libuv
* upstream-libuv:
libuv 2016-08-30 (897738b1)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38069fd6637b062806a812bbc490bd2ee3406913
commit 38069fd6637b062806a812bbc490bd2ee3406913
Author: libuv upstream <libuv at googlegroups.com>
AuthorDate: Tue Aug 30 01:32:24 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 30 09:33:44 2016 -0400
libuv 2016-08-30 (897738b1)
Code extracted from:
https://github.com/libuv/libuv.git
at commit 897738b160cd5950503a96c9fd5b1e9aab92b0ff (v1.x).
diff --git a/include/pthread-barrier.h b/include/pthread-barrier.h
index 68468ad..3e01705 100644
--- a/include/pthread-barrier.h
+++ b/include/pthread-barrier.h
@@ -39,7 +39,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2 * sizeof(sem_t) + \
2 * sizeof(unsigned int) - \
sizeof(void *)
-#elif defined(__MVS__)
+#else
# define UV_BARRIER_STRUCT_PADDING 0
#endif
diff --git a/src/unix/timer.c b/src/unix/timer.c
index ca3ec3d..f46bdf4 100644
--- a/src/unix/timer.c
+++ b/src/unix/timer.c
@@ -31,8 +31,8 @@ static int timer_less_than(const struct heap_node* ha,
const uv_timer_t* a;
const uv_timer_t* b;
- a = container_of(ha, const uv_timer_t, heap_node);
- b = container_of(hb, const uv_timer_t, heap_node);
+ a = container_of(ha, uv_timer_t, heap_node);
+ b = container_of(hb, uv_timer_t, heap_node);
if (a->timeout < b->timeout)
return 1;
@@ -135,7 +135,7 @@ int uv__next_timeout(const uv_loop_t* loop) {
if (heap_node == NULL)
return -1; /* block indefinitely */
- handle = container_of(heap_node, const uv_timer_t, heap_node);
+ handle = container_of(heap_node, uv_timer_t, heap_node);
if (handle->timeout <= loop->time)
return 0;
diff --git a/src/win/tty.c b/src/win/tty.c
index 9bb7879..0975b33 100644
--- a/src/win/tty.c
+++ b/src/win/tty.c
@@ -57,6 +57,9 @@
#define MAX_INPUT_BUFFER_LENGTH 8192
+#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
+#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
+#endif
static void uv_tty_capture_initial_style(CONSOLE_SCREEN_BUFFER_INFO* info);
static void uv_tty_update_virtual_window(CONSOLE_SCREEN_BUFFER_INFO* info);
@@ -121,6 +124,14 @@ static char uv_tty_default_fg_bright = 0;
static char uv_tty_default_bg_bright = 0;
static char uv_tty_default_inverse = 0;
+typedef enum {
+ UV_SUPPORTED,
+ UV_UNCHECKED,
+ UV_UNSUPPORTED
+} uv_vtermstate_t;
+/* Determine whether or not ANSI support is enabled. */
+static uv_vtermstate_t uv__vterm_state = UV_UNCHECKED;
+static void uv__determine_vterm_state(HANDLE handle);
void uv_console_init() {
InitializeCriticalSection(&uv_tty_output_lock);
@@ -163,6 +174,9 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, uv_file fd, int readable) {
/* shared between all uv_tty_t handles. */
EnterCriticalSection(&uv_tty_output_lock);
+ if (uv__vterm_state == UV_UNCHECKED)
+ uv__determine_vterm_state(handle);
+
/* Store the global tty output handle. This handle is used by TTY read */
/* streams to update the virtual window when a CONSOLE_BUFFER_SIZE_EVENT */
/* is received. */
@@ -1616,6 +1630,33 @@ static int uv_tty_write_bufs(uv_tty_t* handle,
uv_buf_t buf = bufs[i];
unsigned int j;
+ if (uv__vterm_state == UV_SUPPORTED) {
+ utf16_buf_used = MultiByteToWideChar(CP_UTF8,
+ 0,
+ buf.base,
+ buf.len,
+ NULL,
+ 0);
+
+ if (utf16_buf_used == 0) {
+ *error = GetLastError();
+ break;
+ }
+
+ if (!MultiByteToWideChar(CP_UTF8,
+ 0,
+ buf.base,
+ buf.len,
+ utf16_buf,
+ utf16_buf_used)) {
+ *error = GetLastError();
+ break;
+ }
+
+ FLUSH_TEXT();
+ continue;
+ }
+
for (j = 0; j < buf.len; j++) {
unsigned char c = buf.base[j];
@@ -2173,3 +2214,24 @@ int uv_tty_reset_mode(void) {
/* Not necessary to do anything. */
return 0;
}
+
+/* Determine whether or not this version of windows supports
+ * proper ANSI color codes. Should be supported as of windows
+ * 10 version 1511, build number 10.0.10586.
+ */
+static void uv__determine_vterm_state(HANDLE handle) {
+ DWORD dwMode = 0;
+
+ if (!GetConsoleMode(handle, &dwMode)) {
+ uv__vterm_state = UV_UNSUPPORTED;
+ return;
+ }
+
+ dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+ if (!SetConsoleMode(handle, dwMode)) {
+ uv__vterm_state = UV_UNSUPPORTED;
+ return;
+ }
+
+ uv__vterm_state = UV_SUPPORTED;
+}
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 3 --
Utilities/cmlibuv/include/pthread-barrier.h | 2 +-
Utilities/cmlibuv/src/unix/timer.c | 6 +--
Utilities/cmlibuv/src/win/tty.c | 62 +++++++++++++++++++++++++++
4 files changed, 66 insertions(+), 7 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list