]> granicus.if.org Git - php/commitdiff
64 bit fixes
authorWez Furlong <wez@php.net>
Sat, 15 Mar 2003 13:25:38 +0000 (13:25 +0000)
committerWez Furlong <wez@php.net>
Sat, 15 Mar 2003 13:25:38 +0000 (13:25 +0000)
main/network.c
main/streams.c

index a1edd016a0cf70e3c227f173bde1d10a8caae5fe..5084fbd14ccbbd996bf11ba31428c10a2697c5a8 100644 (file)
@@ -1081,7 +1081,7 @@ static int php_sockop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
                                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 @@ static int php_sockop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
                                return FAILURE;
 #endif
                        if (ret)
-                               *ret = (void*)sock->socket;
+                               *(int*)ret = sock->socket;
                        return SUCCESS;
                default:
                        return FAILURE;
index 4ba8b317932700b906362211fe87a44981a665cf..406ec0ddd554efc042482af11ebb9501ae0c5063 100755 (executable)
@@ -1517,7 +1517,7 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
        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 @@ static int php_stdiop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC)
                        }
                        if (ret) {
                                fflush(data->file);
-                               *ret = (void*)fd;
+                               *(int**)ret = fd;
                        }
                        return SUCCESS;
                default:
@@ -1959,7 +1959,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;
                }
@@ -1979,7 +1979,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;
@@ -2022,7 +2022,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)) {
@@ -2071,7 +2071,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);