Re: cvs: php4 /main streams.c

From: Date: Sun, 25 Aug 2002 11:07:55 +0000
Subject: Re: cvs: php4 /main streams.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13658@lists.php.net to get a copy of this message
Duh, my brain must be missing this morning... This doesn't fix anything... The correct fix follows within next half-hour... --Wez. On 08/25/02, "Wez Furlong" <wez.php@thebrainroom.com> wrote: > wez Sun Aug 25 07:02:05 2002 EDT > > Modified files: > /php4/main streams.c > Log: > Potential fix for Bug#18022: > Streams that are pipes on systems that HAVE_FLUSHIO should not be seeked > as is required for plain files on those systems. > > > Index: php4/main/streams.c > diff -u php4/main/streams.c:1.70 php4/main/streams.c:1.71 > --- php4/main/streams.c:1.70 Sun Aug 25 06:36:08 2002 > +++ php4/main/streams.c Sun Aug 25 07:02:05 2002 > @@ -20,7 +20,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: streams.c,v 1.70 2002/08/25 10:36:08 wez Exp $ */ > +/* $Id: streams.c,v 1.71 2002/08/25 11:02:05 wez Exp $ */ > > #define _GNU_SOURCE > #include "php.h" > @@ -774,7 +774,7 @@ > assert(data != NULL); > > #if HAVE_FLUSHIO > - if (data->last_op == 'r') { > + if (!data->is_pipe && data->last_op == 'r') { > fseek(data->file, 0, SEEK_CUR); > } > data->last_op = 'w'; > @@ -798,7 +798,7 @@ > } > > #if HAVE_FLUSHIO > - if (data->last_op == 'w') > + if (!data->is_pipe && data->last_op == 'w') > fseek(data->file, 0, SEEK_CUR); > data->last_op = 'r'; > #endif > @@ -856,7 +856,7 @@ > > assert(data != NULL); > #if HAVE_FLUSHIO > - if (data->last_op == 'w') { > + if (!data->is_pipe && data->last_op == 'w') { > fseek(data->file, 0, SEEK_CUR); > } > data->last_op = 'r'; > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.cvs (#13658) next »