From: Wez Furlong Date: Sat, 15 Mar 2003 13:29:56 +0000 (+0000) Subject: 64bit fixes X-Git-Tag: RELEASE_0_5~464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16e705a5479aceef8b51b696dd723099139a9b87;p=php 64bit fixes --- diff --git a/main/streams/cast.c b/main/streams/cast.c index 1ebc6af877..feae2653f4 100644 --- a/main/streams/cast.c +++ b/main/streams/cast.c @@ -163,7 +163,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show if (castas == PHP_STREAM_AS_STDIO) { if (stream->stdiocast) { if (ret) { - *ret = stream->stdiocast; + *(FILE**)ret = stream->stdiocast; } goto exit_success; } @@ -183,7 +183,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show 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; @@ -226,7 +226,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show 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)) { @@ -275,7 +275,7 @@ exit_success: } 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); diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index b8fd2cd0f4..262c249c07 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -487,7 +487,7 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) data->file = fdopen(data->fd, stream->mode); } - *ret = data->file; + *(FILE**)ret = data->file; data->fd = -1; } return SUCCESS; @@ -505,7 +505,7 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) fflush(data->file); } if (ret) { - *ret = (void*)fd; + *(int*)ret = fd; } return SUCCESS; default: diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index eff166f91a..10674fff9f 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -267,7 +267,7 @@ static int php_sockop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) switch(castas) { case PHP_STREAM_AS_STDIO: if (ret) { - *ret = fdopen(sock->socket, stream->mode); + *(FILE**)ret = fdopen(sock->socket, stream->mode); if (*ret) return SUCCESS; return FAILURE; @@ -276,7 +276,7 @@ static int php_sockop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) case PHP_STREAM_AS_FD: case PHP_STREAM_AS_SOCKETD: if (ret) - *ret = (void*)sock->socket; + *(int*)ret = sock->socket; return SUCCESS; default: return FAILURE;