wez Sat Mar 15 08:25:38 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main network.c streams.c Log: 64 bit fixes Index: php4/main/network.c diff -u php4/main/network.c:1.83.2.4 php4/main/network.c:1.83.2.5 --- php4/main/network.c:1.83.2.4 Tue Mar 4 20:28:45 2003 +++ php4/main/network.c Sat Mar 15 08:25:36 2003 @@ -16,7 +16,7 @@ | Streams work by Wez Furlong <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: network.c,v 1.83.2.4 2003/03/05 01:28:45 wez Exp $ */ +/* $Id: network.c,v 1.83.2.5 2003/03/15 13:25:36 wez Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -1081,7 +1081,7 @@ return FAILURE; #endif if (ret) { - *ret = fdopen(sock->socket, stream->mode); + *(FILE**)ret = fdopen(sock->socket, stream->mode); if (*ret) return SUCCESS; return FAILURE; @@ -1094,7 +1094,7 @@ return FAILURE; #endif if (ret) - *ret = (void*)sock->socket; + *(int*)ret = sock->socket; return SUCCESS; default: return FAILURE; Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.37 php4/main/streams.c:1.125.2.38 --- php4/main/streams.c:1.125.2.37 Thu Mar 6 15:58:19 2003 +++ php4/main/streams.c Sat Mar 15 08:25:38 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.125.2.37 2003/03/06 20:58:19 sesser Exp $ */ +/* $Id: streams.c,v 1.125.2.38 2003/03/15 13:25:38 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1517,7 +1517,7 @@ switch (castas) { case PHP_STREAM_AS_STDIO: if (ret) { - *ret = data->file; + *(FILE**)ret = data->file; data->fd = -1; } return SUCCESS; @@ -1532,7 +1532,7 @@ } if (ret) { fflush(data->file); - *ret = (void*)fd; + *(int**)ret = fd; } return SUCCESS; default: @@ -1959,7 +1959,7 @@ if (castas == PHP_STREAM_AS_STDIO) { if (stream->stdiocast) { if (ret) { - *ret = stream->stdiocast; + *(FILE**)ret = stream->stdiocast; } goto exit_success; } @@ -1979,7 +1979,7 @@ if (ret == NULL) goto exit_success; - *ret = fopencookie(stream, stream->mode, PHP_STREAM_COOKIE_FUNCTIONS); + *(FILE**)ret = fopencookie(stream, stream->mode, PHP_STREAM_COOKIE_FUNCTIONS); if (*ret != NULL) { off_t pos; @@ -2022,7 +2022,7 @@ int retcode = php_stream_cast(newstream, castas | flags, ret, show_err); if (retcode == SUCCESS) - rewind((FILE*)*ret); + rewind(*(FILE**)ret); /* do some specialized cleanup */ if ((flags & PHP_STREAM_CAST_RELEASE)) { @@ -2071,7 +2071,7 @@ } if (castas == PHP_STREAM_AS_STDIO && ret) - stream->stdiocast = *ret; + stream->stdiocast = *(FILE**)ret; if (flags & PHP_STREAM_CAST_RELEASE) { php_stream_free(stream, PHP_STREAM_FREE_CLOSE_CASTED);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php