diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-08 11:59:45 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-08 11:59:45 +0000 |
commit | 110215a9a76594e808903af957f3273e3bc11a87 (patch) | |
tree | 36ffca48f1168e282af19e00d3909597a5573dff /libio/iofopncook.c | |
parent | 94e365c61202e2472c8aea42c7c95ce40f5b843c (diff) | |
download | glibc-110215a9a76594e808903af957f3273e3bc11a87.zip glibc-110215a9a76594e808903af957f3273e3bc11a87.tar.gz glibc-110215a9a76594e808903af957f3273e3bc11a87.tar.bz2 |
Update.
1999-07-08 Andreas Schwab <schwab@suse.de>
* libio/iofopncook.c (fopencookie): Set _fileno to -2.
* libio/libioP.h (_IO_file_is_open): Only check for -1, not all
negative numbers.
* libio/fileops.c (_IO_new_file_close_it): Set _fileno to -1, not
EOF.
* libio/oldfileops.c (_IO_old_file_close_it): Likewise.
1999-07-08 Andreas Schwab <schwab@suse.de>
* stdio-common/vfprintf.c (buffered_vfprintf): Initialize _mode.
1999-07-08 Andreas Schwab <schwab@suse.de>
* libio/fileno.c: Return -1 instead of EOF and set errno if the
stream is not a real file stream.
1999-07-08 Andreas Schwab <schwab@suse.de>
* manual/charset.texi: Fix typos.
Diffstat (limited to 'libio/iofopncook.c')
-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 85ea35c..7b76826 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -167,5 +167,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; } |