(fopencookie): Set _fileno to -2.

This commit is contained in:
Ulrich Drepper 1999-08-24 23:06:11 +00:00
parent b8d8a25b24
commit 2c11fe3a7c

View File

@ -171,5 +171,10 @@ fopencookie (cookie, mode, io_functions)
_IO_mask_flags (&new_f->cfile.__file, read_write,
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
/* We use a negative number different from -1 for _fileno to mark that
this special stream is not associated with a real file, but still has
to be treated as such. */
new_f->cfile.__file._fileno = -2;
return &new_f->cfile.__file;
}