ext/libuv/src/unix/tty.c in libuv-2.0.12 vs ext/libuv/src/unix/tty.c in libuv-3.0.0
- old
+ new
@@ -28,17 +28,21 @@
#include <unistd.h>
#include <termios.h>
#include <errno.h>
#include <sys/ioctl.h>
+#if defined(__MVS__) && !defined(IMAXBEL)
+#define IMAXBEL 0
+#endif
+
static int orig_termios_fd = -1;
static struct termios orig_termios;
static uv_spinlock_t termios_spinlock = UV_SPINLOCK_INITIALIZER;
static int uv__tty_is_slave(const int fd) {
int result;
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
int dummy;
result = ioctl(fd, TIOCGPTN, &dummy) != 0;
#elif defined(__APPLE__)
char dummy[256];
@@ -166,10 +170,10 @@
}
static void uv__tty_make_raw(struct termios* tio) {
assert(tio != NULL);
-#ifdef __sun
+#if defined __sun || defined __MVS__
/*
* 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 |