Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src

On Thu, Mar 13, 2008 at 03:40:01PM +0000, Christos Zoulas wrote:
> Log Message:
> Since _file is a short, check that the fd fits in it, otherwise bail with
> EMFILE. We treat _file as an unsigned short to double our range, with a
> special case for -1 (closed). Make a note of what we should do about stdio
> if we ever bump libc. We could change _file in the future compatibly to an
> int by putting it in the extension space but for now we don't bother.

I don't think that it is the correct approach. The change still broke
fileno usage as the macro will return a short value and that isn't
usable. If breaking fileno users is not considered a problem the best
fix is to actually just put the real _file field into the extended area
and put -1 into _file iff the real _file is -1 or larger than 32767.


Home | Main Index | Thread Index | Old Index