tony2001 Wed Jul 23 11:25:15 2008 UTC Modified files: (Branch: PHP_5_3) /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.12.2.5&r2=1.14.2.3.2.12.2.6&diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.5 php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.6 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.5 Wed Jul 23 08:56:29 2008 +++ php-src/ext/bz2/bz2.c Wed Jul 23 11:25:14 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c,v 1.14.2.3.2.12.2.5 2008/07/23 08:56:29 tony2001 Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.12.2.6 2008/07/23 11:25:14 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.12.2.7&r2=1.147.2.3.2.12.2.8&diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.147.2.3.2.12.2.7 php-src/ext/standard/dir.c:1.147.2.3.2.12.2.8 --- php-src/ext/standard/dir.c:1.147.2.3.2.12.2.7 Wed Jun 11 09:01:56 2008 +++ php-src/ext/standard/dir.c Wed Jul 23 11:25:14 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.147.2.3.2.12.2.7 2008/06/11 09:01:56 dmitry Exp $ */ +/* $Id: dir.c,v 1.147.2.3.2.12.2.8 2008/07/23 11:25:14 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.28.2.18&r2=1.409.2.6.2.28.2.19&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.18 php-src/ext/standard/file.c:1.409.2.6.2.28.2.19 --- php-src/ext/standard/file.c:1.409.2.6.2.28.2.18 Tue Jul 22 14:09:24 2008 +++ php-src/ext/standard/file.c Wed Jul 23 11:25:14 2008 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.409.2.6.2.28.2.18 2008/07/22 14:09:24 felipe Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28.2.19 2008/07/23 11:25:14 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -856,8 +856,6 @@ stream = php_stream_fopen_tmpfile(); if (stream) { - stream->flags |= PHP_STREAM_FLAG_FCLOSE; - php_stream_to_zval(stream, return_value); } else { RETURN_FALSE; @@ -888,8 +886,6 @@ RETURN_FALSE; } - stream->flags |= PHP_STREAM_FLAG_FCLOSE; - php_stream_to_zval(stream, return_value); } /* }}} */ @@ -907,7 +903,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.1.2.2&r2=1.121.2.1.2.1.2.3&diff_format=u Index: php-src/ext/standard/fsock.c diff -u php-src/ext/standard/fsock.c:1.121.2.1.2.1.2.2 php-src/ext/standard/fsock.c:1.121.2.1.2.1.2.3 --- php-src/ext/standard/fsock.c:1.121.2.1.2.1.2.2 Tue Jul 22 14:09:24 2008 +++ php-src/ext/standard/fsock.c Wed Jul 23 11:25:14 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.121.2.1.2.1.2.2 2008/07/22 14:09:24 felipe Exp $ */ +/* $Id: fsock.c,v 1.121.2.1.2.1.2.3 2008/07/23 11:25:14 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.17.2.3&r2=1.36.2.1.2.17.2.4&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.17.2.3 php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.4 --- php-src/ext/standard/proc_open.c:1.36.2.1.2.17.2.3 Tue Jul 22 14:09:24 2008 +++ php-src/ext/standard/proc_open.c Wed Jul 23 11:25:14 2008 @@ -15,7 +15,7 @@ | Author: Wez Furlong <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.c,v 1.36.2.1.2.17.2.3 2008/07/22 14:09:24 felipe Exp $ */ +/* $Id: proc_open.c,v 1.36.2.1.2.17.2.4 2008/07/23 11:25:14 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.15.2.18&r2=1.58.2.6.2.15.2.19&diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.18 php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.19 --- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.18 Tue Jul 22 14:09:24 2008 +++ php-src/ext/standard/streamsfuncs.c Wed Jul 23 11:25:14 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.18 2008/07/22 14:09:24 felipe Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.19 2008/07/23 11:25:14 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -155,8 +155,6 @@ RETURN_FALSE; } - stream->flags |= PHP_STREAM_FLAG_FCLOSE; - if (errstr) { efree(errstr); } @@ -204,8 +202,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); } @@ -271,8 +267,6 @@ &tv, &errstr TSRMLS_CC) && clistream) { - clistream->flags |= PHP_STREAM_FLAG_FCLOSE; - if (peername) { ZVAL_STRINGL(zpeername, peername, peername_len, 0); } http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip_stream.c?r1=1.1.2.5.2.1&r2=1.1.2.5.2.2&diff_format=u Index: php-src/ext/zip/zip_stream.c diff -u php-src/ext/zip/zip_stream.c:1.1.2.5.2.1 php-src/ext/zip/zip_stream.c:1.1.2.5.2.2 --- php-src/ext/zip/zip_stream.c:1.1.2.5.2.1 Wed Jul 23 09:09:10 2008 +++ php-src/ext/zip/zip_stream.c Wed Jul 23 11:25:14 2008 @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c,v 1.1.2.5.2.1 2008/07/23 09:09:10 tony2001 Exp $ */ +/* $Id: zip_stream.c,v 1.1.2.5.2.2 2008/07/23 11:25:14 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.4.2.5&r2=1.103.2.1.2.4.2.6&diff_format=u Index: php-src/main/php_streams.h diff -u php-src/main/php_streams.h:1.103.2.1.2.4.2.5 php-src/main/php_streams.h:1.103.2.1.2.4.2.6 --- php-src/main/php_streams.h:1.103.2.1.2.4.2.5 Tue Jul 22 14:09:24 2008 +++ php-src/main/php_streams.h Wed Jul 23 11:25:14 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_streams.h,v 1.103.2.1.2.4.2.5 2008/07/22 14:09:24 felipe Exp $ */ +/* $Id: php_streams.h,v 1.103.2.1.2.4.2.6 2008/07/23 11:25:14 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.22.2.9&r2=1.129.2.13.2.22.2.10&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.22.2.9 php-src/sapi/cli/php_cli.c:1.129.2.13.2.22.2.10 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.22.2.9 Tue Jul 22 14:09:24 2008 +++ php-src/sapi/cli/php_cli.c Wed Jul 23 11:25:14 2008 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.22.2.9 2008/07/22 14:09:24 felipe Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.22.2.10 2008/07/23 11:25:14 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -502,10 +502,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