cvs: php4 /main main.c

From: Date: Sun, 27 Aug 2000 19:51:50 +0000
Subject: cvs: php4 /main main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1424@lists.php.net to get a copy of this message
andi Sun Aug 27 12:51:50 2000 EDT Modified files: /php4/main main.c Log: - Reverting Sascha's patch although I don't like doing these kind of things - but as it is Sascha who has reverted a zillion patches I don't feel that - bad about it :) - The patch is morally incorrect and it actually also has a crash bug which - I won't point out because it shouldn't be there. - SG(path_translated) should be set by the SAPI module correctly and if it - isn't the SAPI module should be fixed and not add code to PHP. There is - enough special case code in PHP and I would like to clean it up and not - add more. - Last but not least, old_cwd takes 4KB of stack space. We should probably - malloc() it because in ISAPI we only have 10KB of stack space. Index: php4/main/main.c diff -u php4/main/main.c:1.300 php4/main/main.c:1.301 --- php4/main/main.c:1.300 Sun Aug 27 12:40:21 2000 +++ php4/main/main.c Sun Aug 27 12:51:50 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.300 2000/08/27 19:40:21 sas Exp $ */ +/* $Id: main.c,v 1.301 2000/08/27 19:51:50 andi Exp $ */ #include <stdio.h> @@ -1106,10 +1106,9 @@ zend_file_handle *prepend_file_p, *append_file_p; zend_file_handle prepend_file, append_file; char old_cwd[4096]; - char new_path[4096]; SLS_FETCH(); - old_cwd[0] = new_path[0] = '\0'; + old_cwd[0] = '\0'; php_hash_environment(ELS_C SLS_CC PLS_CC); zend_activate_modules(); @@ -1149,13 +1148,6 @@ if (primary_file->type == ZEND_HANDLE_FILENAME && primary_file->filename) { V_GETCWD(old_cwd, sizeof(old_cwd)-1); - - if (!IS_ABSOLUTE_PATH(primary_file->filename, strlen(primary_file->filename))) { - snprintf(new_path, sizeof(new_path), "%s%c%s", old_cwd, PHP_DIR_SEPARATOR, primary_file->filename); - new_path[sizeof(new_path)-1] = '\0'; - primary_file->filename = new_path; - } - V_CHDIR_FILE(primary_file->filename); }

« previous php.cvs (#1424) next »