cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h
| From: | Ilia Alshanetsky | Date: | Tue, 05 Sep 2006 15:52:42 +0000 |
| Subject: | cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5226@lists.php.net to get a copy of this message | ||
iliaa Tue Sep 5 15:52:42 2006 UTC
Modified files:
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
MFB: Fixed bug #38579 require_once/include_once optimization causes files
to be loaded multiple times.
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.138&r2=1.139&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.138 ZendEngine2/zend_vm_def.h:1.139
--- ZendEngine2/zend_vm_def.h:1.138 Mon Sep 4 13:59:07 2006
+++ ZendEngine2/zend_vm_def.h Tue Sep 5 15:52:42 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.138 2006/09/04 13:59:07 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.139 2006/09/05 15:52:42 iliaa Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -2833,20 +2833,23 @@
zend_file_handle file_handle;
char cwd[MAXPATHLEN];
cwd_state state;
-
+#ifndef PHP_WIN32
if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) {
cwd[0] = '\0';
} else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) {
cwd[0] = '\0';
}
-
+#endif
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
+#ifndef PHP_WIN32
if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)) {
failure_retval=1;
- } else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
+ } else
+#endif
+ if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.142&r2=1.143&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.142 ZendEngine2/zend_vm_execute.h:1.143
--- ZendEngine2/zend_vm_execute.h:1.142 Mon Sep 4 13:59:07 2006
+++ ZendEngine2/zend_vm_execute.h Tue Sep 5 15:52:42 2006
@@ -1914,20 +1914,23 @@
zend_file_handle file_handle;
char cwd[MAXPATHLEN];
cwd_state state;
-
+#ifndef PHP_WIN32
if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) {
cwd[0] = '\0';
} else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) {
cwd[0] = '\0';
}
-
+#endif
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
+#ifndef PHP_WIN32
if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)) {
failure_retval=1;
- } else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
+ } else
+#endif
+ if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
}
@@ -4500,20 +4503,23 @@
zend_file_handle file_handle;
char cwd[MAXPATHLEN];
cwd_state state;
-
+#ifndef PHP_WIN32
if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) {
cwd[0] = '\0';
} else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) {
cwd[0] = '\0';
}
-
+#endif
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
+#ifndef PHP_WIN32
if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)) {
failure_retval=1;
- } else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
+ } else
+#endif
+ if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
}
@@ -7683,20 +7689,23 @@
zend_file_handle file_handle;
char cwd[MAXPATHLEN];
cwd_state state;
-
+#ifndef PHP_WIN32
if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) {
cwd[0] = '\0';
} else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) {
cwd[0] = '\0';
}
-
+#endif
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
+#ifndef PHP_WIN32
if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)) {
failure_retval=1;
- } else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
+ } else
+#endif
+ if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
}
@@ -20586,20 +20595,23 @@
zend_file_handle file_handle;
char cwd[MAXPATHLEN];
cwd_state state;
-
+#ifndef PHP_WIN32
if (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename))) {
cwd[0] = '\0';
} else if (!VCWD_GETCWD(cwd, MAXPATHLEN)) {
cwd[0] = '\0';
}
-
+#endif
state.cwd_length = strlen(cwd);
state.cwd = zend_strndup(cwd, state.cwd_length);
+#ifndef PHP_WIN32
if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) &&
zend_hash_exists(&EG(included_files), state.cwd, state.cwd_length+1)) {
failure_retval=1;
- } else if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
+ } else
+#endif
+ if (SUCCESS == zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) {
if (!file_handle.opened_path) {
file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename));
}