From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 11:50:53 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FA5916A4CE for ; Tue, 2 Mar 2004 11:50:53 -0800 (PST) Received: from jkh-gw.brierdr.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7D1443D2D for ; Tue, 2 Mar 2004 11:50:52 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from [64.173.15.98] (IDENT:3729-ident-is-a-completely-pointless-protocol-that-offers-no-security-or-traceability-at-all-so-tak@adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by jkh-gw.brierdr.com (8.12.10/8.12.10) with ESMTP id i22JoErF018277; Tue, 2 Mar 2004 11:50:14 -0800 (PST) (envelope-from jkh@queasyweasel.com) In-Reply-To: <20040302213412.X1223@gamplex.bde.org> References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> <20040302213412.X1223@gamplex.bde.org> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-4--981882491; protocol="application/pkcs7-signature" Message-Id: From: "Jordan K. Hubbard" Date: Tue, 2 Mar 2004 11:50:48 -0800 To: Bruce Evans X-Mailer: Apple Mail (2.612) X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-arch@freebsd.org Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 19:50:53 -0000 --Apple-Mail-4--981882491 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Thanks to everyone (not just bde) for reviewing the fix. Linux was right, I was wrong, EBADF it is! On Mar 2, 2004, at 4:03 AM, Bruce Evans wrote: > Should be EBADF, as in Linux. > >> return (EOF); >> + } > > Otherwise, I agree with this change except for its style bugs > (unsorting > of the #includes and tab lossage). Change committed with #includes sorted and proper use of tabs (change is consistent with the rest of the file's style). It's also not clear to me why ENODEV is being returned, though I'm not as inclined to blame isatty() since it appears to do the right thing: #include #include #include main() { int fd, ret; fd = open("/dev/null", O_RDONLY); ret = isatty(fd); printf("ret = %d, errno = %d\n", ret, errno); close(fd); } Prints: ret = 0, errno = 25 All isatty() does is call tcgetattr(), it doesn't do an ioctl(...TIOCGETA...). -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer --Apple-Mail-4--981882491--