CVS update: php31/main

From: Date: Tue, 01 Sep 1998 17:43:32 +0000
Subject: CVS update: php31/main
Groups: php.dev 
Request: Send a blank email to php-dev+get-717@lists.php.net to get a copy of this message
Date: Tuesday September 1, 1998 @ 13:43 Author: zeev Update of /repository/php31/main In directory asf:/u2/tmp/cvs-serv27187/main Modified Files: configuration-parser.y language-parser.y language-scanner.l safe_mode.c token_cache.c Log Message: * Apply the fixes for #700 and #703 to 3.1 * Make 3.1 compile under UNIX again. Index: php31/main/configuration-parser.y diff -c php31/main/configuration-parser.y:2.2 php31/main/configuration-parser.y:2.3 *** php31/main/configuration-parser.y:2.2 Tue Sep 1 12:58:41 1998 --- php31/main/configuration-parser.y Tue Sep 1 13:43:30 1998 *************** *** 30,36 **** ! /* $Id: configuration-parser.y,v 2.2 1998/09/01 16:58:41 shane Exp $ */ #define DEBUG_CFG_PARSER 1 #ifdef THREAD_SAFE --- 30,36 ---- ! /* $Id: configuration-parser.y,v 2.3 1998/09/01 17:43:30 zeev Exp $ */ #define DEBUG_CFG_PARSER 1 #ifdef THREAD_SAFE *************** *** 361,367 **** #ifndef THREAD_SAFE pval dummy; ! php3_dl($3.value.str.val,MODULE_PERSISTENT,&dummy); #else php3_dladd($3.value.str.val); #endif --- 361,367 ---- #ifndef THREAD_SAFE pval dummy; ! _php3_dl($3.value.str.val,MODULE_PERSISTENT,&dummy); #else php3_dladd($3.value.str.val); #endif Index: php31/main/language-parser.y diff -c php31/main/language-parser.y:2.7 php31/main/language-parser.y:2.8 *** php31/main/language-parser.y:2.7 Mon Aug 24 15:12:53 1998 --- php31/main/language-parser.y Tue Sep 1 13:43:31 1998 *************** *** 31,37 **** */ ! /* $Id: language-parser.y,v 2.7 1998/08/24 19:12:53 zeev Exp $ */ /* --- 31,37 ---- */ ! /* $Id: language-parser.y,v 2.8 1998/09/01 17:43:31 zeev Exp $ */ /* *************** *** 554,560 **** possible_function_call { cs_functioncall_end(&$$,&$4,&$8,1 _INLINE_TLS); } | NEW var { assign_new_object(&$$,&$2,1 _INLINE_TLS); } | NEW var { assign_new_object(&$$,&$2,0 _INLINE_TLS); } ! '(' { if (!GLOBAL(shutdown_requested) && GLOBAL(Execute)) { pval object_pointer; object_pointer.value.varptr.yystype = &$3; cs_functioncall_pre_variable_passing(&$2, &object_pointer, 1 _INLINE_TLS); } } function_call_parameter_list ')' { cs_functioncall_post_variable_passing(&$2 _INLINE_TLS); } possible_function_call { cs_functioncall_end(&$$, &$2, &$7, 1 _INLINE_TLS); $$ = $3; } | INT_CAST expr { if (GLOBAL(Execute)) { convert_to_long(&$2); $$ = $2; } } --- 554,560 ---- possible_function_call { cs_functioncall_end(&$$,&$4,&$8,1 _INLINE_TLS); } | NEW var { assign_new_object(&$$,&$2,1 _INLINE_TLS); } | NEW var { assign_new_object(&$$,&$2,0 _INLINE_TLS); } ! '(' { if (!GLOBAL(shutdown_requested)) { pval object_pointer; object_pointer.value.varptr.yystype = &$3; cs_functioncall_pre_variable_passing(&$2, &object_pointer, 1 _INLINE_TLS); } } function_call_parameter_list ')' { cs_functioncall_post_variable_passing(&$2 _INLINE_TLS); } possible_function_call { cs_functioncall_end(&$$, &$2, &$7, 1 _INLINE_TLS); $$ = $3; } | INT_CAST expr { if (GLOBAL(Execute)) { convert_to_long(&$2); $$ = $2; } } Index: php31/main/language-scanner.l diff -c php31/main/language-scanner.l:2.8 php31/main/language-scanner.l:2.9 *** php31/main/language-scanner.l:2.8 Fri Aug 28 16:35:34 1998 --- php31/main/language-scanner.l Tue Sep 1 13:43:31 1998 *************** *** 81,89 **** #endif #ifndef YY_TLS_VARS ! /* NOTE, YY_TLS_VARS; CANNOT have a semicolon after in ! in the code or it will break compilation in msvc5 */ ! #define YY_TLS_VARS; #endif #ifndef TLS_VARS /* just to make sure ;) */ --- 81,87 ---- #endif #ifndef YY_TLS_VARS ! #define YY_TLS_VARS #endif #ifndef TLS_VARS /* just to make sure ;) */ *************** *** 151,161 **** int include_file(pval *file, int display_source) { FILE *tmp; - YY_TLS_VARS; YY_BUFFER_STATE buffer_state = YY_CURRENT_BUFFER; PHPLexState lex_state; char *filename; int issock=0, socketd=0; TLS_VARS; convert_to_string(file); --- 149,159 ---- int include_file(pval *file, int display_source) { FILE *tmp; YY_BUFFER_STATE buffer_state = YY_CURRENT_BUFFER; PHPLexState lex_state; char *filename; int issock=0, socketd=0; + YY_TLS_VARS; TLS_VARS; convert_to_string(file); *************** *** 198,205 **** void eval_string(pval *str,pval *return_offset, int display_source INLINE_TLS) { PHPLexState lex_state; - YY_TLS_VARS; YY_BUFFER_STATE buffer_state = YY_CURRENT_BUFFER; convert_to_string(str); --- 196,203 ---- void eval_string(pval *str,pval *return_offset, int display_source INLINE_TLS) { PHPLexState lex_state; YY_BUFFER_STATE buffer_state = YY_CURRENT_BUFFER; + YY_TLS_VARS; convert_to_string(str); *************** *** 248,258 **** int conditional_include_file(pval *file,pval *return_offset INLINE_TLS) { PHPLexState lex_state; - YY_TLS_VARS; YY_BUFFER_STATE buffer_state = YY_CURRENT_BUFFER; FILE *tmp; char *filename; int issock=0, socketd=0;; convert_to_string(file); --- 246,256 ---- int conditional_include_file(pval *file,pval *return_offset INLINE_TLS) { PHPLexState lex_state; YY_BUFFER_STATE buffer_state = YY_CURRENT_BUFFER; FILE *tmp; char *filename; int issock=0, socketd=0;; + YY_TLS_VARS; convert_to_string(file); *************** *** 293,298 **** --- 291,297 ---- int end_current_file_execution(INLINE_TLS_VOID) { YY_TLS_VARS; + if (stack_is_empty(&GLOBAL(input_source_stack))) { return 0; } else { Index: php31/main/safe_mode.c diff -c php31/main/safe_mode.c:2.1 php31/main/safe_mode.c:2.2 *** php31/main/safe_mode.c:2.1 Sun Aug 30 02:45:23 1998 --- php31/main/safe_mode.c Tue Sep 1 13:43:31 1998 *************** *** 26,32 **** | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: safe_mode.c,v 2.1 1998/08/30 06:45:23 shane Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 26,32 ---- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: safe_mode.c,v 2.2 1998/09/01 17:43:31 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 164,176 **** free(username); LocalFree(uid); #else ! if(sapi_info->page_uid<0){ if (!GLOBAL(sapi_rqst)->filename || (stat(GLOBAL(sapi_rqst)->filename,&statbuf)==-1)) { return empty_string; } uid = statbuf.st_uid; ! }else{ ! uid=sapi_info->page_uid; } if ((pwd=getpwuid(uid))==NULL) { return empty_string; --- 164,176 ---- free(username); LocalFree(uid); #else ! if(sapi_rqst->page_uid<0){ if (!GLOBAL(sapi_rqst)->filename || (stat(GLOBAL(sapi_rqst)->filename,&statbuf)==-1)) { return empty_string; } uid = statbuf.st_uid; ! } else { ! uid=sapi_rqst->page_uid; } if ((pwd=getpwuid(uid))==NULL) { return empty_string; Index: php31/main/token_cache.c diff -c php31/main/token_cache.c:2.4 php31/main/token_cache.c:2.5 *** php31/main/token_cache.c:2.4 Fri Aug 28 16:35:37 1998 --- php31/main/token_cache.c Tue Sep 1 13:43:32 1998 *************** *** 29,35 **** */ ! /* $Id: token_cache.c,v 2.4 1998/08/28 20:35:37 shane Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 29,35 ---- */ ! /* $Id: token_cache.c,v 2.5 1998/09/01 17:43:32 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 202,210 **** Token *temp_tokens, middle_token; int first_chunk, second_chunk, i; ! start -= (tcm->active)*MAX_TOKENS_PER_CACHE; ! end -= (tcm->active)*MAX_TOKENS_PER_CACHE; ! middle -= (tcm->active)*MAX_TOKENS_PER_CACHE; if (start < 0 || end >= tc->count || middle < start || middle > end) { return FAILURE; --- 202,210 ---- Token *temp_tokens, middle_token; int first_chunk, second_chunk, i; ! start %= MAX_TOKENS_PER_CACHE; ! end %= MAX_TOKENS_PER_CACHE; ! middle %= MAX_TOKENS_PER_CACHE; if (start < 0 || end >= tc->count || middle < start || middle > end) { return FAILURE; *************** *** 245,251 **** { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset -= tcm->active * MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } --- 245,251 ---- { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset %= MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } *************** *** 258,264 **** { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset -= tcm->active * MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } --- 258,264 ---- { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset %= MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } *************** *** 275,281 **** { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset -= tcm->active * MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } --- 275,281 ---- { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset %= MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } *************** *** 289,295 **** { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset -= tcm->active * MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } --- 289,295 ---- { TokenCache *tc = &tcm->token_caches[offset / MAX_TOKENS_PER_CACHE]; ! offset %= MAX_TOKENS_PER_CACHE; if (offset < 0 || offset >= tc->count) { return FAILURE; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#717) next »