From daf5ef1bbd4b8ceb005294c512004010010897b8 Mon Sep 17 00:00:00 2001 From: "David Adam (zanchey)" Date: Sun, 24 Feb 2013 23:00:54 +0800 Subject: [PATCH] Kill termio.h and sys/termios.h On FreeBSD, compilation complains that "this file includes which is deprecated, use instead". On Linux and FreeBSD, literally just pulls in . On OS X and Solaris, pulls in . doesn't exist on FreeBSD or Mac OS X, and on Linux is marked as deprecated and just includes . It does exist on Solaris, but no `struct termio` is ever actually used in the codebase. --- common.cpp | 8 -------- configure.ac | 13 +++---------- env.cpp | 4 ---- fallback.cpp | 4 ---- fish_pager.cpp | 7 ------- input.cpp | 9 --------- io.cpp | 8 -------- output.cpp | 8 -------- proc.cpp | 8 -------- reader.cpp | 8 -------- screen.cpp | 8 -------- 11 files changed, 3 insertions(+), 82 deletions(-) diff --git a/common.cpp b/common.cpp index e5b298ee8..b25e6c96b 100644 --- a/common.cpp +++ b/common.cpp @@ -25,10 +25,6 @@ parts of fish. #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -56,10 +52,6 @@ parts of fish. #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/configure.ac b/configure.ac index c94fa5a66..f5a54837c 100644 --- a/configure.ac +++ b/configure.ac @@ -537,7 +537,7 @@ LIBS=$LIBS_COMMON # Check presense of various header files # -AC_CHECK_HEADERS([getopt.h termio.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h sys/termios.h execinfo.h spawn.h]) +AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h]) if test x$local_gettext != xno; then AC_CHECK_HEADERS([libintl.h]) @@ -620,13 +620,6 @@ for i in "" "-D_POSIX_C_SOURCE=200112L" "-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=2 #include #endif - #ifdef HAVE_SYS_TERMIOS_H - /* Neither POSIX, C89 nor C99: a common extension. - * For: TIOCGWINSZ and struct winsize (under at least - * Solaris, NetBSD and (dual-listed) FreeBSD). */ - #include - #endif - #ifdef HAVE_SYS_IOCTL_H /* As above (under at least Linux and FreeBSD). */ #include @@ -750,8 +743,8 @@ AC_LINK_IFELSE( [ AC_LANG_PROGRAM( [ - #ifdef HAVE_SYS_TERMIOS_H - #include + #ifdef HAVE_TERMIOS_H + #include #endif #ifdef HAVE_SYS_IOCTL_H diff --git a/env.cpp b/env.cpp index 5539218e0..112b5cf6d 100644 --- a/env.cpp +++ b/env.cpp @@ -25,10 +25,6 @@ #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/fallback.cpp b/fallback.cpp index b52a6330c..2095a88c9 100644 --- a/fallback.cpp +++ b/fallback.cpp @@ -33,10 +33,6 @@ #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/fish_pager.cpp b/fish_pager.cpp index fb819fab2..fac704977 100644 --- a/fish_pager.cpp +++ b/fish_pager.cpp @@ -11,9 +11,6 @@ #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif #ifdef HAVE_SYS_IOCTL_H #include @@ -32,10 +29,6 @@ #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/input.cpp b/input.cpp index 9710db83d..e23a1b7ac 100644 --- a/input.cpp +++ b/input.cpp @@ -15,10 +15,6 @@ #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -32,11 +28,6 @@ #include #endif - -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/io.cpp b/io.cpp index b7df04168..eb7d432d0 100644 --- a/io.cpp +++ b/io.cpp @@ -15,10 +15,6 @@ Utilities for io redirection. #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -32,10 +28,6 @@ Utilities for io redirection. #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/output.cpp b/output.cpp index 3b5f9d4b0..855eecdf3 100644 --- a/output.cpp +++ b/output.cpp @@ -12,10 +12,6 @@ #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -30,10 +26,6 @@ #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/proc.cpp b/proc.cpp index fdaaed8ca..dd94da18b 100644 --- a/proc.cpp +++ b/proc.cpp @@ -22,10 +22,6 @@ Some of the code in this file is based on code from the Glibc manual. #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -41,10 +37,6 @@ Some of the code in this file is based on code from the Glibc manual. #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/reader.cpp b/reader.cpp index 824d8a270..2c7d57062 100644 --- a/reader.cpp +++ b/reader.cpp @@ -30,10 +30,6 @@ commence. #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #ifdef HAVE_SYS_IOCTL_H #include #endif @@ -53,10 +49,6 @@ commence. #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H diff --git a/screen.cpp b/screen.cpp index 3670f5676..68f78ad7f 100644 --- a/screen.cpp +++ b/screen.cpp @@ -15,10 +15,6 @@ efficient way for transforming that to the desired screen content. #include #include -#ifdef HAVE_SYS_TERMIOS_H -#include -#endif - #include #include @@ -28,10 +24,6 @@ efficient way for transforming that to the desired screen content. #include #endif -#if HAVE_TERMIO_H -#include -#endif - #if HAVE_TERM_H #include #elif HAVE_NCURSES_TERM_H