From 9b470d448d9fa4beacea532d9e5ab18088a9b38e Mon Sep 17 00:00:00 2001 From: mysterywolf <920369182@qq.com> Date: Wed, 2 Sep 2020 10:18:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88isatty=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=9C=A8=E6=9C=AC=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E8=BD=AC=E7=A7=BB=E5=88=B0=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/termios/posix_termios.c | 9 +-------- components/libc/termios/posix_termios.h | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/components/libc/termios/posix_termios.c b/components/libc/termios/posix_termios.c index 75c876dd33..9c736c3184 100644 --- a/components/libc/termios/posix_termios.c +++ b/components/libc/termios/posix_termios.c @@ -5,7 +5,7 @@ * * Change Logs: * Date Author Notes - * 2017/08/30 Bernard The first version + * 2017/08/30 Bernard The first version */ #include #include @@ -111,13 +111,6 @@ int tcdrain(int fd) return 0; } -int isatty (int fd) -{ - struct termios term; - - return tcgetattr (fd, &term) == 0; -} - #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) void cfmakeraw(struct termios *t) { diff --git a/components/libc/termios/posix_termios.h b/components/libc/termios/posix_termios.h index 6d4be129ff..c61191b7dc 100644 --- a/components/libc/termios/posix_termios.h +++ b/components/libc/termios/posix_termios.h @@ -5,13 +5,13 @@ * * Change Logs: * Date Author Notes - * 2017/08/30 Bernard The first version + * 2017/08/30 Bernard The first version */ #ifndef TERMIOS_H__ #define TERMIOS_H__ #include -#include +#include #ifdef __cplusplus extern "C" {