tony2001                Wed Jul 23 11:24:35 2008 UTC

  Modified files:              
    /php-src/ext/bz2    bz2.c 
    /php-src/ext/standard       dir.c file.c fsock.c proc_open.c 
                                streamsfuncs.c 
    /php-src/ext/zip    zip_stream.c 
    /php-src/main       php_streams.h 
    /php-src/sapi/cli   php_cli.c 
  Log:
  invert the logics - FLAG_FCLOSE -> FLAG_NO_FCLOSE
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.36&r2=1.37&diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.36 php-src/ext/bz2/bz2.c:1.37
--- php-src/ext/bz2/bz2.c:1.36  Wed Jul 23 08:55:59 2008
+++ php-src/ext/bz2/bz2.c       Wed Jul 23 11:24:34 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
  
-/* $Id: bz2.c,v 1.36 2008/07/23 08:55:59 tony2001 Exp $ */
+/* $Id: bz2.c,v 1.37 2008/07/23 11:24:34 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -247,7 +247,6 @@
                        if (SUCCESS == php_stream_cast(stream, 
PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) {
                                bz_file = BZ2_bzdopen(fd, mode);
                        }
-                       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
                }
 
                /* remove the file created by php_stream_open_wrapper(), it is 
not needed since BZ2 functions
@@ -261,7 +260,6 @@
        if (bz_file) {
                retstream = _php_stream_bz2open_from_BZFILE(bz_file, mode, 
stream STREAMS_REL_CC TSRMLS_CC);
                if (retstream) {
-                       retstream->flags |= PHP_STREAM_FLAG_FCLOSE;
                        return retstream;
                }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.176&r2=1.177&diff_format=u
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.176 php-src/ext/standard/dir.c:1.177
--- php-src/ext/standard/dir.c:1.176    Wed Jun 11 09:01:44 2008
+++ php-src/ext/standard/dir.c  Wed Jul 23 11:24:34 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dir.c,v 1.176 2008/06/11 09:01:44 dmitry Exp $ */
+/* $Id: dir.c,v 1.177 2008/07/23 11:24:34 tony2001 Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -230,6 +230,8 @@
        if (dirp == NULL) {
                goto opendir_cleanup;
        }
+
+       dirp->flags |= PHP_STREAM_FLAG_NO_FCLOSE;
                
        php_set_default_dir(dirp->rsrc_id TSRMLS_CC);
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.521&r2=1.522&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.521 php-src/ext/standard/file.c:1.522
--- php-src/ext/standard/file.c:1.521   Tue Jul 22 14:06:16 2008
+++ php-src/ext/standard/file.c Wed Jul 23 11:24:34 2008
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: file.c,v 1.521 2008/07/22 14:06:16 felipe Exp $ */
+/* $Id: file.c,v 1.522 2008/07/23 11:24:34 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -965,8 +965,6 @@
        stream = php_stream_fopen_tmpfile();
 
        if (stream) {
-               stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
                php_stream_to_zval(stream, return_value);
        } else {
                RETURN_FALSE;
@@ -1001,8 +999,6 @@
                RETURN_FALSE;
        }
        
-       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
        php_stream_to_zval(stream, return_value);
 }
 /* }}} */
@@ -1020,7 +1016,7 @@
 
        PHP_STREAM_TO_ZVAL(stream, arg1);
        
-       if (!(stream->flags & PHP_STREAM_FLAG_FCLOSE)) {
+       if ((stream->flags & PHP_STREAM_FLAG_NO_FCLOSE) != 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "%d is not a valid 
stream resource", stream->rsrc_id);
                RETURN_FALSE;
        }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/fsock.c?r1=1.128&r2=1.129&diff_format=u
Index: php-src/ext/standard/fsock.c
diff -u php-src/ext/standard/fsock.c:1.128 php-src/ext/standard/fsock.c:1.129
--- php-src/ext/standard/fsock.c:1.128  Tue Jul 22 14:06:16 2008
+++ php-src/ext/standard/fsock.c        Wed Jul 23 11:24:34 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fsock.c,v 1.128 2008/07/22 14:06:16 felipe Exp $ */
+/* $Id: fsock.c,v 1.129 2008/07/23 11:24:34 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -79,8 +79,6 @@
        stream = php_stream_xport_create(hostname, hostname_len, REPORT_ERRORS,
                        STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT, hashkey, 
&tv, NULL, &errstr, &err);
 
-       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
        if (port > 0) {
                efree(hostname);
        }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.62&r2=1.63&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.62 
php-src/ext/standard/proc_open.c:1.63
--- php-src/ext/standard/proc_open.c:1.62       Tue Jul 22 14:06:16 2008
+++ php-src/ext/standard/proc_open.c    Wed Jul 23 11:24:35 2008
@@ -15,7 +15,7 @@
    | Author: Wez Furlong <[EMAIL PROTECTED]>                           |
    +----------------------------------------------------------------------+
  */
-/* $Id: proc_open.c,v 1.62 2008/07/22 14:06:16 felipe Exp $ */
+/* $Id: proc_open.c,v 1.63 2008/07/23 11:24:35 tony2001 Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE           /* linux wants this when XOPEN mode is on */
@@ -971,7 +971,7 @@
                                        zval *retfp;
 
                                        /* nasty hack; don't copy it */
-                                       stream->flags |= 
PHP_STREAM_FLAG_NO_SEEK | PHP_STREAM_FLAG_FCLOSE;
+                                       stream->flags |= 
PHP_STREAM_FLAG_NO_SEEK;
 
                                        if (UG(unicode) && !binary_pipes) {
                                                if (write_stream) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.119&r2=1.120&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.119 
php-src/ext/standard/streamsfuncs.c:1.120
--- php-src/ext/standard/streamsfuncs.c:1.119   Tue Jul 22 14:06:16 2008
+++ php-src/ext/standard/streamsfuncs.c Wed Jul 23 11:24:35 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: streamsfuncs.c,v 1.119 2008/07/22 14:06:16 felipe Exp $ */
+/* $Id: streamsfuncs.c,v 1.120 2008/07/23 11:24:35 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -156,8 +156,6 @@
                RETURN_FALSE;
        }
        
-       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-       
        if (errstr) {
                efree(errstr);
        }
@@ -205,8 +203,6 @@
                        STREAM_XPORT_SERVER | flags,
                        NULL, NULL, context, &errstr, &err);
                        
-       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
        if (stream == NULL) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect 
to %s (%s)", host, errstr == NULL ? "Unknown error" : errstr);
        }
@@ -273,8 +269,6 @@
                                &tv, &errstr
                                TSRMLS_CC) && clistream) {
                
-               clistream->flags |= PHP_STREAM_FLAG_FCLOSE;
-               
                if (peername) {
                        ZVAL_RT_STRINGL(zpeername, peername, peername_len, 
ZSTR_AUTOFREE);
                }
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/zip/zip_stream.c
diff -u php-src/ext/zip/zip_stream.c:1.7 php-src/ext/zip/zip_stream.c:1.8
--- php-src/ext/zip/zip_stream.c:1.7    Wed Jul 23 09:09:02 2008
+++ php-src/ext/zip/zip_stream.c        Wed Jul 23 11:24:35 2008
@@ -1,4 +1,4 @@
-/* $Id: zip_stream.c,v 1.7 2008/07/23 09:09:02 tony2001 Exp $ */
+/* $Id: zip_stream.c,v 1.8 2008/07/23 11:24:35 tony2001 Exp $ */
 #ifdef HAVE_CONFIG_H
 #   include "config.h"
 #endif
@@ -140,7 +140,6 @@
        if (!stream) {
                return NULL;
        } else {
-               stream->flags |= PHP_STREAM_FLAG_FCLOSE;
                return stream;
        }
 
http://cvs.php.net/viewvc.cgi/php-src/main/php_streams.h?r1=1.136&r2=1.137&diff_format=u
Index: php-src/main/php_streams.h
diff -u php-src/main/php_streams.h:1.136 php-src/main/php_streams.h:1.137
--- php-src/main/php_streams.h:1.136    Tue Jul 22 14:06:17 2008
+++ php-src/main/php_streams.h  Wed Jul 23 11:24:35 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_streams.h,v 1.136 2008/07/22 14:06:17 felipe Exp $ */
+/* $Id: php_streams.h,v 1.137 2008/07/23 11:24:35 tony2001 Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -191,7 +191,7 @@
        
 #define PHP_STREAM_FLAG_IS_DIR                                         64
 
-#define PHP_STREAM_FLAG_FCLOSE                                         128
+#define PHP_STREAM_FLAG_NO_FCLOSE                                      128
 
 struct _php_stream  {
        php_stream_ops *ops;
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.190&r2=1.191&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.190 php-src/sapi/cli/php_cli.c:1.191
--- php-src/sapi/cli/php_cli.c:1.190    Tue Jul 22 14:06:17 2008
+++ php-src/sapi/cli/php_cli.c  Wed Jul 23 11:24:35 2008
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.190 2008/07/22 14:06:17 felipe Exp $ */
+/* $Id: php_cli.c,v 1.191 2008/07/23 11:24:35 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -517,10 +517,6 @@
                return;
        }
        
-       s_in->flags  |= PHP_STREAM_FLAG_FCLOSE;
-       s_out->flags |= PHP_STREAM_FLAG_FCLOSE;
-       s_err->flags |= PHP_STREAM_FLAG_FCLOSE;
-
 #if PHP_DEBUG
        /* do not close stdout and stderr */
        s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE;

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

Reply via email to