From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114501 invoked by alias); 18 Jan 2018 08:21:30 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 114255 invoked by uid 9078); 18 Jan 2018 08:21:29 -0000 Date: Thu, 18 Jan 2018 08:21:00 -0000 Message-ID: <20180118082129.114253.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] RISC-V: isatty: return 0 on error X-Act-Checkin: newlib-cygwin X-Git-Author: Chih-Mao Chen X-Git-Refname: refs/heads/master X-Git-Oldrev: cba678ba02428b02e08a9a169d57e70f271d789f X-Git-Newrev: f2c9e55faf6fa560c25d448afa7e2d1ad61468f2 X-SW-Source: 2018-q1/txt/msg00022.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f2c9e55faf6fa560c25d448afa7e2d1ad61468f2 commit f2c9e55faf6fa560c25d448afa7e2d1ad61468f2 Author: Chih-Mao Chen Date: Thu Nov 16 16:08:16 2017 +0800 RISC-V: isatty: return 0 on error Diff: --- libgloss/riscv/sys_isatty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgloss/riscv/sys_isatty.c b/libgloss/riscv/sys_isatty.c index 0dc3db1..8857f48 100644 --- a/libgloss/riscv/sys_isatty.c +++ b/libgloss/riscv/sys_isatty.c @@ -13,5 +13,5 @@ _isatty(int file) { struct stat s; int ret = _fstat (file, &s); - return ret == -1 ? -1 : !!(s.st_mode & S_IFCHR); + return ret == -1 ? 0 : !!(s.st_mode & S_IFCHR); }