Date: Sun, 09 Mar 2003 00:39:11 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: dj AT delorie DOT com Message-Id: <557-Sun09Mar2003003910+0200-eliz@elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <200303081703.h28H3Yl05143@envy.delorie.com> (message from DJ Delorie on Sat, 8 Mar 2003 12:03:34 -0500) Subject: Re: New POSIX: pwrite [PATCH] References: <200303071845 DOT h27Ij5d18334 AT envy DOT delorie DOT com> <3E6938EC DOT D9BFE2E4 AT phekda DOT freeserve DOT co DOT uk> <200303080038 DOT h280crk23683 AT envy DOT delorie DOT com> <3E69434C DOT B420FA9D AT phekda DOT freeserve DOT co DOT uk> <200303080130 DOT h281UMb24534 AT envy DOT delorie DOT com> <8361-Sat08Mar2003114656+0200-eliz AT elta DOT co DOT il> <200303081703 DOT h28H3Yl05143 AT envy DOT delorie DOT com> Reply-To: Eli Zaretskii Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sat, 8 Mar 2003 12:03:34 -0500 > From: DJ Delorie > > > I think there are bits there that tell this. These are those two > > bits which `isatty' currently uses. > > > > Why do you think these bits are not enough? > > The two bits are defined as "is stdin" and "is stdout". At the very > least, we should be checking for *either* of those bits, not *both* of > them. IIRC, they are always set both at once. > And there are no bits for the AUX device, which should be considered a > terminal. But DOS terminals are never connected to AUX, are they? Unix terminals are connected to a serial port, but not DOS terminals. > Do we have any other call that looks at just the "is a device" bit > in that dos call? `stat'/`fstat' return a character-device bit set for devices. (I assume you were asking about Posix way of getting at that.)