Date: 05/31/98
- Next message: Rasmus Lerdorf: "[PHP-DEV] Re: [PHP3] Apache + mod_php3 + mod_frontpage"
- Previous message: shane: "[PHP-DEV] CVS update: php31/sapi"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/sapi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sunday May 31, 1998 @ 18:23
Author: shane
Update of /repository/php31/sapi
In directory asf:/tmp/cvs-serv830/sapi
Modified Files:
cgi_sapi.c
Log Message:
cgi now compilable staticly and non-thread safe.
Index: php31/sapi/cgi_sapi.c
diff -c php31/sapi/cgi_sapi.c:1.7 php31/sapi/cgi_sapi.c:1.8
*** php31/sapi/cgi_sapi.c:1.7 Sun May 31 18:10:52 1998
--- php31/sapi/cgi_sapi.c Sun May 31 18:23:02 1998
***************
*** 26,31 ****
--- 26,33 ----
#define SAPI_FUNC_VARS
/* for non-thread safe static compiles */
struct sapi_request_info *sapi_rqst;
+ extern int _php3_sapi_process_start();
+ extern int _php3_sapi_process_end();
#endif
***************
*** 126,135 ****
void sapi_init(void)
{
char *buf;
- sapi_info=malloc(sizeof(struct sapi_request_info));
- #ifndef THREAD_SAFE
- sapi_rqst=sapi_info;
- #endif
/* for cgi we dont use request id's */
sapi_info->scid=NULL;
--- 128,133 ----
***************
*** 218,226 ****
void sapi_end(void){
if(sapi_info->argv0)free(sapi_info->argv0);
- if(sapi_info->ini_path)free(sapi_info->ini_path);
if(sapi_info->script_filename)free(sapi_info->script_filename);
if(sapi_info->rqst_filename)free(sapi_info->rqst_filename);
}
/* php cgi functions */
--- 216,224 ----
void sapi_end(void){
if(sapi_info->argv0)free(sapi_info->argv0);
if(sapi_info->script_filename)free(sapi_info->script_filename);
if(sapi_info->rqst_filename)free(sapi_info->rqst_filename);
+ free(sapi_info);
}
/* php cgi functions */
***************
*** 265,270 ****
--- 263,272 ----
wVersionRequested = MAKEWORD( 2, 0 );
#endif
+ sapi_info=malloc(sizeof(struct sapi_request_info));
+ #ifndef THREAD_SAFE
+ sapi_rqst=sapi_info;
+ #endif
sapi_info->cgi=0;
sapi_info->quiet_mode=0;
sapi_info->preprocess=0;
***************
*** 376,384 ****
sapi_info->rqst_filename=NULL;
}
! sapi_init();
ret=php3_sapi_main(sapi_info);
#if WIN32|WINNT
/*close down sockets*/
--- 378,394 ----
sapi_info->rqst_filename=NULL;
}
! sapi_init();
!
! #ifndef THREAD_SAFE
! _php3_sapi_process_start();
! #endif
ret=php3_sapi_main(sapi_info);
+
+ #ifndef THREAD_SAFE
+ _php3_sapi_process_end();
+ #endif
#if WIN32|WINNT
/*close down sockets*/
- Next message: Rasmus Lerdorf: "[PHP-DEV] Re: [PHP3] Apache + mod_php3 + mod_frontpage"
- Previous message: shane: "[PHP-DEV] CVS update: php31/sapi"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/sapi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

