This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fgetpos() succeeds on nonseekable devices


> 
>   479: fgetpos() succeeds on nonseekable devices (e.g. pipes)
> 

This patch is for glibc 2.0.7. If it is ok, I can port it to glibc 2.1.

Thanks.



H.J.
----
Thu Aug 20 17:14:44 1998  H.J. Lu  (hjl@gnu.org)

	* libio/libioP.h (FILEBUF_LITERAL): Set the _offset field to
	_IO_pos_BAD.

Index: libio/libioP.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc-2.0/libio/libioP.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 libioP.h
--- libioP.h	1997/09/19 18:10:38	1.1.1.1
+++ libioP.h	1998/08/21 00:01:45
@@ -503,12 +503,12 @@
 #define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \
        { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, \
-	   0, 0, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
+	   0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
 #else
 /* check following! */
 #define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \
        { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
-	   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD }
+	   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, FD, 0, _IO_pos_BAD }
 #endif
 
 /* VTABLE_LABEL defines NAME as of the CLASS class.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]