From: Yasuo Ohgaki Date: Sat, 16 Mar 2002 03:37:11 +0000 (+0000) Subject: Quick fix build error when ptrdiff_t is not defined in types.h or sys/types.h X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~1362 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31fe5e46cb86e9d7441c5bad14144cdc415d5c79;p=php Quick fix build error when ptrdiff_t is not defined in types.h or sys/types.h --- diff --git a/main/network.c b/main/network.c index 82bb4c5dca..33dcfbf0c5 100644 --- a/main/network.c +++ b/main/network.c @@ -778,7 +778,9 @@ static char *php_sockop_gets(php_stream *stream, char *buf, size_t maxlen) } 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); }