CVS update: php31/sapi

From: Date: Sat, 22 Aug 1998 15:08:29 +0000
Subject: CVS update: php31/sapi
Groups: php.dev 
Request: Send a blank email to php-dev+get-479@lists.php.net to get a copy of this message
Date: Saturday August 22, 1998 @ 11:08 Author: rasmus Update of /repository/php31/sapi In directory asf:/export/home/rasmus/php31/sapi Modified Files: Makefile.am apache_sapi.c php3_apache.h Log Message: Apache module is very close to compiling now. Just need to figure out how to get at globals from apache_sapi.c Index: php31/sapi/Makefile.am diff -c php31/sapi/Makefile.am:2.4 php31/sapi/Makefile.am:2.5 *** php31/sapi/Makefile.am:2.4 Thu Aug 20 17:50:32 1998 --- php31/sapi/Makefile.am Sat Aug 22 11:08:29 1998 *************** *** 1,5 **** ## Process this file with automake to produce Makefile.in ! INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/main LDADD=../main/libphpcore.a ../ext/libphpext.a @LDADD@ ! noinst_PROGRAMS=php php_SOURCES=cgi_sapi.c --- 1,7 ---- ## Process this file with automake to produce Makefile.in ! INCLUDES=@INCLUDES@ @APACHE_INCLUDE@ -I@top_srcdir@ -I@top_srcdir@/main LDADD=../main/libphpcore.a ../ext/libphpext.a @LDADD@ ! EXTRA_PROGRAMS = php libmodphp3.a ! noinst_PROGRAMS=@BINNAME@ php_SOURCES=cgi_sapi.c + libmodphp3_a_SOURCES=apache_sapi.c Index: php31/sapi/apache_sapi.c diff -c php31/sapi/apache_sapi.c:2.8 php31/sapi/apache_sapi.c:2.9 *** php31/sapi/apache_sapi.c:2.8 Fri Aug 21 17:15:19 1998 --- php31/sapi/apache_sapi.c Sat Aug 22 11:08:29 1998 *************** *** 69,75 **** char *sapi_getenv(SAPI_GLOBAL_INCLUDE char *string) { char *ptr; ! SAPI_FUNC_VARS; ptr = table_get(php3_rqst->subprocess_env, string); if (!ptr) ptr = getenv(string); --- 69,75 ---- char *sapi_getenv(SAPI_GLOBAL_INCLUDE char *string) { char *ptr; ! SAPI_FUNC_VARS ptr = table_get(php3_rqst->subprocess_env, string); if (!ptr) ptr = getenv(string); *************** *** 78,84 **** int sapi_readclient(SAPI_GLOBAL_INCLUDE unsigned char *buf, int length) { ! SAPI_FUNC_VARS; long bytes; #if MODULE_MAGIC_NUMBER > 19961007 char argsbuffer[HUGE_STRING_LEN]; --- 78,84 ---- int sapi_readclient(SAPI_GLOBAL_INCLUDE unsigned char *buf, int length) { ! SAPI_FUNC_VARS long bytes; #if MODULE_MAGIC_NUMBER > 19961007 char argsbuffer[HUGE_STRING_LEN]; *************** *** 117,123 **** long myuid = 0L; char temp2[32]; char *r; ! SAPI_FUNC_VARS; /* * Not entirely sure this is the right way to support the header --- 117,123 ---- long myuid = 0L; char temp2[32]; char *r; ! SAPI_FUNC_VARS /* * Not entirely sure this is the right way to support the header *************** *** 183,189 **** { CookieList *cookie; int len = 0; ! SAPI_FUNC_VARS; if (!php3_rqst) { /* we're not in a request, allow output */ --- 183,189 ---- { CookieList *cookie; int len = 0; ! SAPI_FUNC_VARS if (!php3_rqst) { /* we're not in a request, allow output */ *************** *** 222,228 **** char *user, *type; int len; char *escaped_str; ! SAPI_FUNC_VARS; if (php3_rqst->headers_in) s = table_get(php3_rqst->headers_in, "Authorization"); --- 222,228 ---- char *user, *type; int len; char *escaped_str; ! SAPI_FUNC_VARS if (php3_rqst->headers_in) s = table_get(php3_rqst->headers_in, "Authorization"); *************** *** 276,282 **** int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len) { ! SAPI_FUNC_VARS; if (php3_rqst) { --- 276,282 ---- int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len) { ! SAPI_FUNC_VARS if (php3_rqst) { *************** *** 292,298 **** int sapi_flush(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS; #if MODULE_MAGIC_NUMBER > 19970110 rflush(php3_rqst); #else --- 292,298 ---- int sapi_flush(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS #if MODULE_MAGIC_NUMBER > 19970110 rflush(php3_rqst); #else *************** *** 320,326 **** /* code from main.c in php3_log_err() */ void sapi_log(SAPI_GLOBAL_INCLUDE char *log_message) { ! SAPI_FUNC_VARS; if (php3_rqst) { #if MODULE_MAGIC_NUMBER >= 19970831 --- 320,326 ---- /* code from main.c in php3_log_err() */ void sapi_log(SAPI_GLOBAL_INCLUDE char *log_message) { ! SAPI_FUNC_VARS if (php3_rqst) { #if MODULE_MAGIC_NUMBER >= 19970831 *************** *** 336,348 **** void sapi_register_cleanup(SAPI_GLOBAL_INCLUDE void *arg1, void *arg2, void *arg3) { ! SAPI_FUNC_VARS; register_cleanup(php3_rqst->pool, arg1, arg2, arg3); } /* int sapi_aborted(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS; return php3_rqst->connection->aborted; } */ --- 336,348 ---- void sapi_register_cleanup(SAPI_GLOBAL_INCLUDE void *arg1, void *arg2, void *arg3) { ! SAPI_FUNC_VARS register_cleanup(php3_rqst->pool, arg1, arg2, arg3); } /* int sapi_aborted(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS return php3_rqst->connection->aborted; } */ *************** *** 352,358 **** /*****************************************************************************/ void sapi_debug_log(SAPI_GLOBAL_INCLUDE char *message) { ! SAPI_FUNC_VARS; { char log_message[256]; --- 352,358 ---- /*****************************************************************************/ void sapi_debug_log(SAPI_GLOBAL_INCLUDE char *message) { ! SAPI_FUNC_VARS { char log_message[256]; *************** *** 377,383 **** void sapi_print_info(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS; module *modp = NULL; #if !defined(WIN32) && !defined(WINNT) char name[64]; --- 377,383 ---- void sapi_print_info(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS module *modp = NULL; #if !defined(WIN32) && !defined(WINNT) char name[64]; *************** *** 487,493 **** /*****************************************************************************/ void sapi__php3_hash_server_env(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS; pval *tmp_ptr, tmp2, tmp; char *t; register int i; --- 487,493 ---- /*****************************************************************************/ void sapi__php3_hash_server_env(SAPI_GLOBAL_INCLUDE_V) { ! SAPI_FUNC_VARS pval *tmp_ptr, tmp2, tmp; char *t; register int i; Index: php31/sapi/php3_apache.h diff -c php31/sapi/php3_apache.h:2.1 php31/sapi/php3_apache.h:2.2 *** php31/sapi/php3_apache.h:2.1 Thu Aug 20 19:06:43 1998 --- php31/sapi/php3_apache.h Sat Aug 22 11:08:29 1998 *************** *** 7,14 **** #if HAVE_AP_CONFIG_H #include "ap_config.h" #endif ! #if HAVE_AP_COMPAT_H #include "compat.h" #endif #include "httpd.h" #include "http_main.h" --- 7,17 ---- #if HAVE_AP_CONFIG_H #include "ap_config.h" #endif ! # if HAVE_OLD_COMPAT_H #include "compat.h" + # endif + #if HAVE_AP_COMPAT_H + #include "ap_compat.h" #endif #include "httpd.h" #include "http_main.h" *************** *** 42,52 **** #define GLOBAL(a) a #endif #define SAPI_FUNC_VARS \ php3_globals_struct *php3_globals=(php3_globals_struct *)php3_globals_var;\ struct sapi_request_info *sapi_info=(struct sapi_request_info *)php3_globals->sapi_rqst;\ ! request_rec *php3_rqst=(request_rec *)sapi_info->scid ! /* We are still using a PHP2-style Push/Pop list here as opposed --- 45,58 ---- #define GLOBAL(a) a #endif + #ifdef THREAD_SAFE #define SAPI_FUNC_VARS \ php3_globals_struct *php3_globals=(php3_globals_struct *)php3_globals_var;\ struct sapi_request_info *sapi_info=(struct sapi_request_info *)php3_globals->sapi_rqst;\ ! request_rec *php3_rqst=(request_rec *)sapi_info->scid; ! #else ! #define SAPI_FUNC_VARS ! #endif /* We are still using a PHP2-style Push/Pop list here as opposed -- 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 (#479) next »