This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: fgetpos() succeeds on nonseekable devices
- To: aj@arthur.rhein-neckar.de (Andreas Jaeger)
- Subject: Re: fgetpos() succeeds on nonseekable devices
- From: hjl@lucon.org (H.J. Lu)
- Date: Thu, 20 Aug 1998 17:18:32 -0700 (PDT)
- Cc: drepper@cygnus.com, libc-hacker@cygnus.com, jay@gnu.org
>
> 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.
- References:
- Re: status
- From: Andreas Jaeger <aj@arthur.rhein-neckar.de>