]> granicus.if.org Git - php/commitdiff
Quick fix build error when ptrdiff_t is not defined in types.h or sys/types.h
authorYasuo Ohgaki <yohgaki@php.net>
Sat, 16 Mar 2002 03:37:11 +0000 (03:37 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Sat, 16 Mar 2002 03:37:11 +0000 (03:37 +0000)
main/network.c

index 82bb4c5dca926afe26d6658b56c54bb7b6cb1c0f..33dcfbf0c5d64d4c53431a85ef912fcc460342f9 100644 (file)
@@ -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);
        }