cvs: /php4 SAPI.c main.c

From: Date: Sun, 05 Mar 2000 21:38:17 +0000
Subject: cvs: /php4 SAPI.c main.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-11542@lists.php.net to get a copy of this message
rubys Sun Mar 5 13:38:17 2000 EDT Modified files: /php4 SAPI.c main.c Log: Fix traps due to sapi_global not being initialized when ZTS is set Don't trap if php.ini can't be read Index: php4/SAPI.c diff -u php4/SAPI.c:1.65 php4/SAPI.c:1.66 --- php4/SAPI.c:1.65 Sat Feb 26 06:29:27 2000 +++ php4/SAPI.c Sun Mar 5 13:37:47 2000 @@ -57,6 +57,13 @@ sapi_globals_struct sapi_globals; #endif +#ifdef ZTS +static void sapi_globals_ctor(sapi_globals_struct *sapi_globals) +{ + memset(sapi_globals,0,sizeof(*sapi_globals)); +} + +#endif /* True globals (no need for thread safety) */ sapi_module_struct sapi_module; @@ -71,7 +78,7 @@ sapi_register_post_entries(supported_post_entries); #ifdef ZTS - sapi_globals_id = ts_allocate_id(sizeof(sapi_globals_struct), NULL, NULL); + sapi_globals_id = ts_allocate_id(sizeof(sapi_globals_struct), sapi_globals_ctor, NULL); #endif reentrancy_startup(); Index: php4/main.c diff -u php4/main.c:1.224 php4/main.c:1.225 --- php4/main.c:1.224 Sat Feb 26 15:50:11 2000 +++ php4/main.c Sun Mar 5 13:37:47 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.224 2000/02/26 23:50:11 zeev Exp $ */ +/* $Id: main.c,v 1.225 2000/03/05 21:37:47 rubys Exp $ */ #include <stdio.h> @@ -961,7 +961,7 @@ php_import_environment_variables(ELS_C PLS_CC); } - while(*p) { + while(p && *p) { switch(*p++) { case 'p': case 'P':

« previous php.version4 (#11542) next »