Bug #6942: php sockets unusable with irix-OS
| From: | melchers at cis dot fu-berlin dot de | Date: | Fri, 29 Sep 2000 20:49:24 +0000 |
| Subject: | Bug #6942: php sockets unusable with irix-OS | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33868@lists.php.net to get a copy of this message | ||
From: melchers@cis.fu-berlin.de
Operating system: IRIX-6.5.8
PHP version: 3.0.16
PHP Bug Type: Compile Warning
Bug description: php sockets unusable with irix-OS
(using php-3.0.17RC1)
file functions/fsock.c line 677:
cc: WARNING File = functions/fsock.c, Line = 677
An unsigned integer is being compared to zero.
size_t _php3_sock_fread(char *ptr, size_t size, int socket)
{
size_t ret = 0;
SOCK_FIND_AND_READ_MAX(size);
if(size < 0) return ret;
^
irix defines these types:
typedef unsigned int size_t;
typedef int ssize_t;
or
typedef unsigned long size_t;
typedef long ssize_t;
(dependent of 32/64 bit interface)
In both cases size_t is unsigned.
Therefore the function _php3_sock_fread()
returns never 0, if there are no data
at the socket to read. This makes socket
communication unusable with irix.