64bit fixes

This commit is contained in:
Wez Furlong 2003-03-15 13:29:56 +00:00
parent b66957c56a
commit 16e705a547
3 changed files with 8 additions and 8 deletions

View file

@ -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);

View file

@ -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:

View file

@ -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;