cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h

From: Date: Tue, 05 Sep 2006 15:50:08 +0000
Subject: cvs: ZendEngine2(PHP_5_2) / zend_vm_def.h zend_vm_execute.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5225@lists.php.net to get a copy of this message
iliaa Tue Sep 5 15:50:08 2006 UTC Modified files: (Branch: PHP_5_2) /ZendEngine2 zend_vm_def.h zend_vm_execute.h Log: 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.59.2.29.2.24&r2=1.59.2.29.2.25&diff_format=u Index: ZendEngine2/zend_vm_def.h diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.24 ZendEngine2/zend_vm_def.h:1.59.2.29.2.25 --- ZendEngine2/zend_vm_def.h:1.59.2.29.2.24 Mon Sep 4 13:58:54 2006 +++ ZendEngine2/zend_vm_def.h Tue Sep 5 15:50:07 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_vm_def.h,v 1.59.2.29.2.24 2006/09/04 13:58:54 dmitry Exp $ */ +/* $Id: zend_vm_def.h,v 1.59.2.29.2.25 2006/09/05 15:50:07 iliaa Exp $ */ /* If you change this file, please regenerate the zend_vm_execute.h and * zend_vm_opcodes.h files by running: @@ -2773,19 +2773,23 @@ 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); - if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && +#ifndef PHP_WIN32 + if (state.cwd_length > 0 && !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.62.2.30.2.24&r2=1.62.2.30.2.25&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.24 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.25 --- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.24 Mon Sep 4 13:58:54 2006 +++ ZendEngine2/zend_vm_execute.h Tue Sep 5 15:50:07 2006 @@ -1937,19 +1937,23 @@ 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); - if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && +#ifndef PHP_WIN32 + if (state.cwd_length > 0 && !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)); @@ -4455,19 +4459,23 @@ 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); - if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && +#ifndef PHP_WIN32 + if (state.cwd_length > 0 && !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)); @@ -7555,19 +7563,23 @@ 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); - if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && +#ifndef PHP_WIN32 + if (state.cwd_length > 0 && !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)); @@ -19951,19 +19963,23 @@ 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); - if (!virtual_file_ex(&state, Z_STRVAL_P(inc_filename), NULL, 1) && +#ifndef PHP_WIN32 + if (state.cwd_length > 0 && !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));

« previous php.zend-engine.cvs (#5225) next »