diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-02-24 21:03:00 +0100 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-02-25 11:52:11 -0600 |
commit | 739fda16a93cadcefb59190669cfb7765d2fb8fa (patch) | |
tree | 1d5f67f417248902910f604cc6f227ac1e76ed7a /deps/uv/src/unix/tty.c | |
parent | 06ee782f2462f2658ecda600044cf1e2abfdea53 (diff) | |
download | android-node-v8-739fda16a93cadcefb59190669cfb7765d2fb8fa.tar.gz android-node-v8-739fda16a93cadcefb59190669cfb7765d2fb8fa.tar.bz2 android-node-v8-739fda16a93cadcefb59190669cfb7765d2fb8fa.zip |
deps: update libuv to 1.4.1
PR-URL: https://github.com/iojs/io.js/pull/940
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'deps/uv/src/unix/tty.c')
-rw-r--r-- | deps/uv/src/unix/tty.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c index a1ea433f81..b1782df95b 100644 --- a/deps/uv/src/unix/tty.c +++ b/deps/uv/src/unix/tty.c @@ -103,6 +103,24 @@ skip: return 0; } +static void uv__tty_make_raw(struct termios* tio) { + assert(tio != NULL); + +#ifdef __sun + /* + * This implementation of cfmakeraw for Solaris and derivatives is taken from + * http://www.perkin.org.uk/posts/solaris-portability-cfmakeraw.html. + */ + tio->c_iflag &= ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | + IGNCR | ICRNL | IXON); + tio->c_oflag &= ~OPOST; + tio->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); + tio->c_cflag &= ~(CSIZE | PARENB); + tio->c_cflag |= CS8; +#else + cfmakeraw(tio); +#endif /* #ifdef __sun */ +} int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { struct termios tmp; @@ -138,7 +156,7 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) { tmp.c_cc[VTIME] = 0; break; case UV_TTY_MODE_IO: - cfmakeraw(&tmp); + uv__tty_make_raw(&tmp); break; } |