]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(fopencookie): Set _fileno to -2.
authorUlrich Drepper <drepper@redhat.com>
Tue, 24 Aug 1999 23:06:11 +0000 (23:06 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 24 Aug 1999 23:06:11 +0000 (23:06 +0000)
libio/iofopncook.c

index 122966ecb4e7d57e90def2cdd7e69d99ccd7350c..7b233b82b33f08b40f6565cc491424fcb7516209 100644 (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;
 }