Re: cvs: php4 /main network.c

From: Date: Sat, 16 Mar 2002 12:09:32 +0000
Subject: Re: cvs: php4 /main network.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10231@lists.php.net to get a copy of this message
On Sat, 16 Mar 2002, Yasuo Ohgaki wrote: > > On Sat, 16 Mar 2002, Yasuo Ohgaki wrote: > > > > > yohgaki Fri Mar 15 22:37:11 2002 EDT > > > > > > Modified files: > > > /php4/main network.c > > > Log: > > > Quick fix build error when ptrdiff_t is not defined in types.h > > > or sys/types.h > > > > Please do NEVER make this kind of quick hacks, but resolve it > > properly, or > > file a bugreport for it. This clutters up teh code way too much. > > > > This breaks build. My patch fix build. > Do you really want to keep CVS source unbuildable? > I think nobody want. There is nothing wrong with a broken build for a few hours, this way the original developer can look into it and fix it properly. > > If you don't understand the reasoning of my patch, ask me ;) I understand, btu I don't agree. > As I said this is quick hack to me. However, I'm also sure this is > right. Then you fix it on your local copy, and notify the oringial author of the code. Never do making quicks so 'it fixes it for me'. Beside I think it's quite rude to fiddle with others new and development code, it doesn't fix the cause, but only the problem. > ptrdiff_t is just a signed int or long. On your platform maybe... not necessairly on others. Derick > > > --- php4/main/network.c:1.32 Fri Mar 15 20:58:13 2002 > > > +++ php4/main/network.c Fri Mar 15 22:37:11 2002 > > > @@ -15,7 +15,7 @@ > > > | Author: Stig Venaas <venaas@uninett.no> > | > > > > +--------------------------------------------------------------------- > -+ > > > */ > > > -/* $Id: network.c,v 1.32 2002/03/16 01:58:13 wez Exp $ */ > > > +/* $Id: network.c,v 1.33 2002/03/16 03:37:11 yohgaki Exp $ */ > > > > > > #define PHP_SOCK_CHUNK_SIZE 8192 > > > #define MAX_CHUNKS_PER_READ 10 > > > @@ -778,7 +778,9 @@ > > > } > > > > > > if(p) { > > > - amount = (ptrdiff_t) p - (ptrdiff_t) READPTR(sock) + 1; > > > +/* FIXME: ptrdiff_t is better, but just not all > system support this type */ > > > +/* amount = (ptrdiff_t) p - (ptrdiff_t) READPTR(sock) + 1; */ > > > + amount = (long) p - (long) READPTR(sock) + 1; > > > } else { > > > amount = TOREAD(sock); > > > } > > > > > > > > > > > > -- > > > PHP CVS Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > Derick Rethans > > > > -------------------------------------------------------------------- > - > > PHP: Scripting the Web - www.php.net - derick@php.net > > All your branches are belong to me! > > SRM: Site Resource Manager - www.vl-srm.net > > -------------------------------------------------------------------- > - > > > > > > > ----------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Site Resource Manager - www.vl-srm.net -----------------------------------------------------------------------

« previous php.cvs (#10231) next »