diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-08-24 23:06:11 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-08-24 23:06:11 +0000 |
commit | 2c11fe3a7cab56152aa20d409e2b0105bd298ea5 (patch) | |
tree | 9b5fb07e99ae65b313b358b618d75f9a64399286 /libio | |
parent | b8d8a25b24c25e264d912968d2563de760554754 (diff) |
(fopencookie): Set _fileno to -2.
Diffstat (limited to 'libio')
-rw-r--r-- | libio/iofopncook.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c index 122966ecb4..7b233b82b3 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -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; } |