wez             Sat Mar 15 08:29:56 2003 EDT

  Modified files:              
    /php4/main/streams  cast.c plain_wrapper.c xp_socket.c 
  Log:
  64bit fixes
  
Index: php4/main/streams/cast.c
diff -u php4/main/streams/cast.c:1.5 php4/main/streams/cast.c:1.6
--- php4/main/streams/cast.c:1.5        Thu Feb 27 12:43:38 2003
+++ php4/main/streams/cast.c    Sat Mar 15 08:29:56 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: cast.c,v 1.5 2003/02/27 17:43:38 wez Exp $ */
+/* $Id: cast.c,v 1.6 2003/03/15 13:29:56 wez Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -163,7 +163,7 @@
        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 @@
                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 @@
                                        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 @@
        }
        
        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: php4/main/streams/plain_wrapper.c
diff -u php4/main/streams/plain_wrapper.c:1.9 php4/main/streams/plain_wrapper.c:1.10
--- php4/main/streams/plain_wrapper.c:1.9       Sat Mar  1 12:27:23 2003
+++ php4/main/streams/plain_wrapper.c   Sat Mar 15 08:29:56 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: plain_wrapper.c,v 1.9 2003/03/01 17:27:23 wez Exp $ */
+/* $Id: plain_wrapper.c,v 1.10 2003/03/15 13:29:56 wez Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -487,7 +487,7 @@
                                        data->file = fdopen(data->fd, stream->mode);
                                }
                                
-                               *ret = data->file;
+                               *(FILE**)ret = data->file;
                                data->fd = -1;
                        }
                        return SUCCESS;
@@ -505,7 +505,7 @@
                                fflush(data->file);
                        }
                        if (ret) {
-                               *ret = (void*)fd;
+                               *(int*)ret = fd;
                        }
                        return SUCCESS;
                default:
Index: php4/main/streams/xp_socket.c
diff -u php4/main/streams/xp_socket.c:1.7 php4/main/streams/xp_socket.c:1.8
--- php4/main/streams/xp_socket.c:1.7   Mon Mar  3 14:57:18 2003
+++ php4/main/streams/xp_socket.c       Sat Mar 15 08:29:56 2003
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: xp_socket.c,v 1.7 2003/03/03 19:57:18 iliaa Exp $ */
+/* $Id: xp_socket.c,v 1.8 2003/03/15 13:29:56 wez Exp $ */
 
 #include "php.h"
 #include "ext/standard/file.h"
@@ -267,7 +267,7 @@
        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 @@
                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;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to