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

index 1ebc6af8773f6101a6f644158869d917f993aa7c..feae2653f478cf63a9de99c5708a9606a3da3635 100644 (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);
index b8fd2cd0f4d059d0414fb2b80f7b158b7844195a..262c249c07dbdb1f5f1c5f0ba500606bf2edf2b6 100644 (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:
index eff166f91aba910ebf73e8ba695236c91aa4f39b..10674fff9f2038b3daa1bf12709ae2e5e9cca11c 100644 (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;