Re: cvs: php4 /main network.c
| From: | Yasuo Ohgaki | Date: | Sat, 16 Mar 2002 11:43:43 +0000 |
| Subject: | Re: cvs: php4 /main network.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-10228@lists.php.net to get a copy of this message | ||
> 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.
>
> Derick
This breaks build. My patch fix build.
Do you really want to keep CVS source unbuildable?
I think nobody want.
If you don't understand the reasoning of my patch, ask me ;)
As I said this is quick hack to me. However, I'm also sure this is
right.
ptrdiff_t is just a signed int or long.
--
Yasuo Ohgaki
>
> >
> >
> > Index: php4/main/network.c
> > diff -u php4/main/network.c:1.32 php4/main/network.c:1.33
> > --- 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
> --------------------------------------------------------------------
-
>
>