aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-12-02 23:27:23 +0100
committerGravatar wm4 <wm4@nowhere>2017-12-02 23:27:23 +0100
commit0601e48ef4eac0b62ecf3ab5ed654e27e2a20215 (patch)
treebb3255823a0529f8be2abb77d2e43ea6095d0849
parentd7a02bcb3b25a9e3e80e9b80e46a494f97e684a9 (diff)
build: remove termios check
Also should be fully covered by POSIX.
-rw-r--r--osdep/terminal-unix.c14
-rw-r--r--wscript4
2 files changed, 0 insertions, 18 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index eca6c69461..da6ccfe7f2 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -28,15 +28,7 @@
#include <pthread.h>
#include <assert.h>
-#if HAVE_TERMIOS
-#if HAVE_TERMIOS_H
#include <termios.h>
-#endif
-#if HAVE_SYS_TERMIOS_H
-#include <sys/termios.h>
-#endif
-#endif
-
#include <unistd.h>
#include <poll.h>
@@ -50,10 +42,8 @@
#include "misc/ctype.h"
#include "terminal.h"
-#if HAVE_TERMIOS
static volatile struct termios tio_orig;
static volatile int tio_orig_set;
-#endif
struct key_entry {
const char *seq;
@@ -282,7 +272,6 @@ static void do_activate_getch2(void)
enable_kx(true);
-#if HAVE_TERMIOS
struct termios tio_new;
tcgetattr(0,&tio_new);
@@ -295,7 +284,6 @@ static void do_activate_getch2(void)
tio_new.c_cc[VMIN] = 1;
tio_new.c_cc[VTIME] = 0;
tcsetattr(0,TCSANOW,&tio_new);
-#endif
getch2_active = 1;
}
@@ -307,13 +295,11 @@ static void do_deactivate_getch2(void)
enable_kx(false);
-#if HAVE_TERMIOS
if (tio_orig_set) {
// once set, it will never be set again
// so we can cast away volatile here
tcsetattr(0, TCSANOW, (const struct termios *) &tio_orig);
}
-#endif
getch2_active = 0;
}
diff --git a/wscript b/wscript
index 4941c53774..b8c6edc7d4 100644
--- a/wscript
+++ b/wscript
@@ -224,10 +224,6 @@ iconv support use --disable-iconv.",
'deps': 'os-win32 || os-cygwin',
'func': check_true
}, {
- 'name': '--termios',
- 'desc': 'termios',
- 'func': check_headers('termios.h', 'sys/termios.h'),
- }, {
'name': 'nanosleep',
'desc': 'nanosleep',
'func': check_statement('time.h', 'nanosleep(0,0)')