*BSD News Article 2621


Return to BSD News archive

Xref: sserve comp.sys.sgi:19664 comp.unix.bsd:2665
Path: sserve!manuel!munnari.oz.au!uunet!ki.com!dwatts
From: dwatts@ki.com (Dan Watts)
Newsgroups: comp.sys.sgi,comp.unix.bsd
Subject: Re: Beware of fileno()
Keywords: sunos, ultrix, stdio, fileno, lossage, irix
Message-ID: <1217@ki.com>
Date: 28 Jul 92 00:21:34 GMT
References: <14njaeINNvk@agate.berkeley.edu> <1992Jul24.062320.2170@kithrup.COM> <1992Jul24.141048.10911@aosg.gsf.dec.com>
Followup-To: comp.unix.bsd
Organization: ki Research, Inc
Lines: 24

In article <1992Jul24.141048.10911@aosg.gsf.dec.com> reeves@decvax.dec.com writes:
||> >Sean Eric Fagan   |> Andreas Stolcke
||> >... fileno() returns a char field in the FILE structure...one has to use
||> >	(unsigned char)fileno(stream) 
||> Current BSD sources have the _file element as a short.
|
|The same change went into ULTRIX over a year ago; I believe it's been released
|for nearly a year (it was definitely in V4.2, which isn't even the current
|release any more).
|-- 
|Jon Reeves	Digital Equipment Corporation, Alpha Open Systems Group
|		5 Wentworth Drive, MS GSF1-1K13, Hudson NH 03051-4929 USA
|+1 603 884 5859	reeves@decvax.dec.com	FAX: +1 603 884 1685

SGI Irix 4.0.1 still has it as "char _file;".  I wonder if they've
fixed it yet?  Luckily, the default behaviour for the SGI C compiler
is to treat all chars as unsigned.


-- 
######################## Have A Nice Nude Day #########################
# CompuServe: >INTERNET:uunet.UU.NET!ki.com!dwatts  Dan Watts         #
# UUCP      : ...!uunet!ki.com!dwatts               ki Research, Inc. #
# The Bill Of Rights: Void Where Prohibited by Law. Vote Libertarian ##