[vte] build: Remove unnecessary feature test for functions



commit 22318b29a0a982b313458d75193f6389df3018a5
Author: Christian Persch <chpe src gnome org>
Date:   Sat Oct 12 20:10:55 2019 +0200

    build: Remove unnecessary feature test for functions
    
    We can just depend on these functions.

 meson.build    |  2 --
 src/dumpkeys.c | 10 ----------
 src/mev.c      | 10 ----------
 src/pty.cc     |  2 +-
 4 files changed, 1 insertion(+), 23 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7843cd44..d56334d6 100644
--- a/meson.build
+++ b/meson.build
@@ -184,9 +184,7 @@ endforeach
 
 check_functions = [
   # Misc PTY handling functions
-  'cfmakeraw',
   'getpgid',
-  'tcsetattr',
   # Misc I/O routines.
   'explicit_bzero',
   'pread',
diff --git a/src/dumpkeys.c b/src/dumpkeys.c
index 6868931a..f2e0c5f6 100644
--- a/src/dumpkeys.c
+++ b/src/dumpkeys.c
@@ -167,17 +167,7 @@ main(int argc, char **argv)
        }
        original = tcattr;
        signal(SIGINT, sigint_handler);
-       /* Here we approximate what cfmakeraw() would do, for the benefit
-        * of systems which don't actually provide the function. */
-       tcattr.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP |
-                           INLCR | IGNCR | ICRNL | IXON);
-       tcattr.c_oflag &= ~(OPOST);
-       tcattr.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
-       tcattr.c_cflag &= ~(CSIZE | PARENB);
-       tcattr.c_cflag |= CS8;
-#ifdef HAVE_CFMAKERAW
        cfmakeraw(&tcattr);
-#endif
        if (tcsetattr(STDIN_FILENO, TCSANOW, &tcattr) != 0) {
                perror("tcsetattr");
                return 1;
diff --git a/src/mev.c b/src/mev.c
index cff21a8c..2d8b7de1 100644
--- a/src/mev.c
+++ b/src/mev.c
@@ -364,17 +364,7 @@ main(int argc, char **argv)
 
        original = tcattr;
        signal(SIGINT, sigint_handler);
-       /* Here we approximate what cfmakeraw() would do, for the benefit
-        * of systems which don't actually provide the function. */
-       tcattr.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP |
-                           INLCR | IGNCR | ICRNL | IXON);
-       tcattr.c_oflag &= ~(OPOST);
-       tcattr.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
-       tcattr.c_cflag &= ~(CSIZE | PARENB);
-       tcattr.c_cflag |= CS8;
-#ifdef HAVE_CFMAKERAW
        cfmakeraw(&tcattr);
-#endif
        if (tcsetattr(STDIN_FILENO, TCSANOW, &tcattr) != 0) {
                perror("tcsetattr");
                return 1;
diff --git a/src/pty.cc b/src/pty.cc
index 0375f094..b309d8ea 100644
--- a/src/pty.cc
+++ b/src/pty.cc
@@ -697,7 +697,7 @@ _vte_pty_open_foreign(int masterfd /* consumed */)
 bool
 Pty::set_utf8(bool utf8) const noexcept
 {
-#if defined(HAVE_TCSETATTR) && defined(IUTF8)
+#ifdef IUTF8
        struct termios tio;
         if (tcgetattr(fd(), &tio) == -1) {
                 vte::util::restore_errno errsv;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]