tony2001                Wed Jul 23 11:25:51 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /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:
  MFH: invert the logics - FLAG_FCLOSE -> FLAG_NO_FCLOSE
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.14&r2=1.14.2.3.2.15&diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.14 php-src/ext/bz2/bz2.c:1.14.2.3.2.15
--- php-src/ext/bz2/bz2.c:1.14.2.3.2.14 Wed Jul 23 08:56:37 2008
+++ php-src/ext/bz2/bz2.c       Wed Jul 23 11:25:50 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
  
-/* $Id: bz2.c,v 1.14.2.3.2.14 2008/07/23 08:56:37 tony2001 Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.15 2008/07/23 11:25:50 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.147.2.3.2.17&r2=1.147.2.3.2.18&diff_format=u
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.147.2.3.2.17 
php-src/ext/standard/dir.c:1.147.2.3.2.18
--- php-src/ext/standard/dir.c:1.147.2.3.2.17   Wed Jun 11 09:02:09 2008
+++ php-src/ext/standard/dir.c  Wed Jul 23 11:25:50 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dir.c,v 1.147.2.3.2.17 2008/06/11 09:02:09 dmitry Exp $ */
+/* $Id: dir.c,v 1.147.2.3.2.18 2008/07/23 11:25:50 tony2001 Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -220,6 +220,8 @@
        if (dirp == NULL) {
                RETURN_FALSE;
        }
+
+       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.409.2.6.2.33&r2=1.409.2.6.2.34&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.33 
php-src/ext/standard/file.c:1.409.2.6.2.34
--- php-src/ext/standard/file.c:1.409.2.6.2.33  Tue Jul 22 14:11:25 2008
+++ php-src/ext/standard/file.c Wed Jul 23 11:25:50 2008
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.409.2.6.2.33 2008/07/22 14:11:25 felipe Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.34 2008/07/23 11:25:50 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -861,8 +861,6 @@
        stream = php_stream_fopen_tmpfile();
 
        if (stream) {
-               stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
                php_stream_to_zval(stream, return_value);
        } else {
                RETURN_FALSE;
@@ -894,8 +892,6 @@
                RETURN_FALSE;
        }
        
-       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-
        php_stream_to_zval(stream, return_value);
 
        if (zcontext) {
@@ -917,7 +913,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.121.2.1.2.3&r2=1.121.2.1.2.4&diff_format=u
Index: php-src/ext/standard/fsock.c
diff -u php-src/ext/standard/fsock.c:1.121.2.1.2.3 
php-src/ext/standard/fsock.c:1.121.2.1.2.4
--- php-src/ext/standard/fsock.c:1.121.2.1.2.3  Tue Jul 22 14:11:25 2008
+++ php-src/ext/standard/fsock.c        Wed Jul 23 11:25:50 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fsock.c,v 1.121.2.1.2.3 2008/07/22 14:11:25 felipe Exp $ */
+/* $Id: fsock.c,v 1.121.2.1.2.4 2008/07/23 11:25:50 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -79,8 +79,6 @@
        stream = php_stream_xport_create(hostname, hostname_len, 
ENFORCE_SAFE_MODE | 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.36.2.1.2.20&r2=1.36.2.1.2.21&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.20 
php-src/ext/standard/proc_open.c:1.36.2.1.2.21
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.20      Tue Jul 22 14:11:25 2008
+++ php-src/ext/standard/proc_open.c    Wed Jul 23 11:25:50 2008
@@ -15,7 +15,7 @@
    | Author: Wez Furlong <[EMAIL PROTECTED]>                           |
    +----------------------------------------------------------------------+
  */
-/* $Id: proc_open.c,v 1.36.2.1.2.20 2008/07/22 14:11:25 felipe Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.21 2008/07/23 11:25:50 tony2001 Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE           /* linux wants this when XOPEN mode is on */
@@ -969,7 +969,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;
                                        
                                        MAKE_STD_ZVAL(retfp);
                                        php_stream_to_zval(stream, retfp);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.22&r2=1.58.2.6.2.23&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.22 
php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.23
--- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.22   Tue Jul 22 14:11:25 2008
+++ php-src/ext/standard/streamsfuncs.c Wed Jul 23 11:25:50 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.22 2008/07/22 14:11:25 felipe Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.23 2008/07/23 11:25:50 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -151,8 +151,6 @@
                RETURN_FALSE;
        }
        
-       stream->flags |= PHP_STREAM_FLAG_FCLOSE;
-       
        if (errstr) {
                efree(errstr);
        }
@@ -199,8 +197,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);
        }
@@ -268,8 +264,6 @@
                                &tv, &errstr
                                TSRMLS_CC) && clistream) {
                
-               clistream->flags |= PHP_STREAM_FLAG_FCLOSE;
-               
                if (peername) {
                        Z_TYPE_P(peername) = IS_STRING;
                }
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.6&r2=1.1.2.7&diff_format=u
Index: php-src/ext/zip/zip_stream.c
diff -u php-src/ext/zip/zip_stream.c:1.1.2.6 
php-src/ext/zip/zip_stream.c:1.1.2.7
--- php-src/ext/zip/zip_stream.c:1.1.2.6        Wed Jul 23 09:09:20 2008
+++ php-src/ext/zip/zip_stream.c        Wed Jul 23 11:25:50 2008
@@ -1,4 +1,4 @@
-/* $Id: zip_stream.c,v 1.1.2.6 2008/07/23 09:09:20 tony2001 Exp $ */
+/* $Id: zip_stream.c,v 1.1.2.7 2008/07/23 11:25:50 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.103.2.1.2.7&r2=1.103.2.1.2.8&diff_format=u
Index: php-src/main/php_streams.h
diff -u php-src/main/php_streams.h:1.103.2.1.2.7 
php-src/main/php_streams.h:1.103.2.1.2.8
--- php-src/main/php_streams.h:1.103.2.1.2.7    Tue Jul 22 14:11:25 2008
+++ php-src/main/php_streams.h  Wed Jul 23 11:25:50 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_streams.h,v 1.103.2.1.2.7 2008/07/22 14:11:25 felipe Exp $ */
+/* $Id: php_streams.h,v 1.103.2.1.2.8 2008/07/23 11:25:50 tony2001 Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -183,7 +183,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.129.2.13.2.25&r2=1.129.2.13.2.26&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.25 
php-src/sapi/cli/php_cli.c:1.129.2.13.2.26
--- php-src/sapi/cli/php_cli.c:1.129.2.13.2.25  Tue Jul 22 14:11:25 2008
+++ php-src/sapi/cli/php_cli.c  Wed Jul 23 11:25:50 2008
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.129.2.13.2.25 2008/07/22 14:11:25 felipe Exp $ */
+/* $Id: php_cli.c,v 1.129.2.13.2.26 2008/07/23 11:25:50 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -505,10 +505,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