holger Mon Jun 2 13:14:10 2003 EDT Modified files: (Branch: PHP_4_3) /php4/sapi/pi3web pi3web_sapi.c pi3web_sapi.h Log: Merged with main trunk 1.53/1.5. Index: php4/sapi/pi3web/pi3web_sapi.c diff -u php4/sapi/pi3web/pi3web_sapi.c:1.46.2.5 php4/sapi/pi3web/pi3web_sapi.c:1.46.2.6 --- php4/sapi/pi3web/pi3web_sapi.c:1.46.2.5 Fri May 30 21:37:45 2003 +++ php4/sapi/pi3web/pi3web_sapi.c Mon Jun 2 13:14:10 2003 @@ -21,7 +21,9 @@ +----------------------------------------------------------------------+ */ -/* $Id: pi3web_sapi.c,v 1.46.2.5 2003/05/31 01:37:45 sniper Exp $ */ +/* $Id: pi3web_sapi.c,v 1.46.2.6 2003/06/02 17:14:10 holger Exp $ */ + +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS #include "pi3web_sapi.h" #include "php.h" @@ -38,9 +40,7 @@ #include "PiAPI.h" #include "Pi3API.h" -#define MAX_STATUS_LENGTH sizeof("xxxx LONGEST STATUS DESCRIPTION") #define PI3WEB_SERVER_VAR_BUF_SIZE 1024 -#define PI3WEB_POST_DATA_BUF 1024 int IWasLoaded=0; @@ -78,7 +78,7 @@ PUTS("<table border=0 cellpadding=3 cellspacing=1 width=600 align=center>\n"); PUTS("<tr><th colspan=2 bgcolor=\"" PHP_HEADER_COLOR "\">Pi3Web Server Information</th></tr>\n"); php_info_print_table_header(2, "Information Field", "Value"); - php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id: pi3web_sapi.c,v 1.46.2.5 2003/05/31 01:37:45 sniper Exp $"); + php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id: pi3web_sapi.c,v 1.46.2.6 2003/06/02 17:14:10 holger Exp $"); php_info_print_table_row(2, "Server Name Stamp", HTTPCore_getServerStamp()); snprintf(variable_buf, 511, "%d", HTTPCore_debugEnabled()); php_info_print_table_row(2, "Debug Enabled", variable_buf); @@ -231,7 +231,7 @@ DWORD read_from_input=0; DWORD total_read=0; - if (SG(read_post_bytes) < lpCB->cbAvailable) { + if ((DWORD)SG(read_post_bytes) < lpCB->cbAvailable) { read_from_buf = MIN(lpCB->cbAvailable-SG(read_post_bytes), count_bytes); memcpy(buffer, lpCB->lpbData+SG(read_post_bytes), read_from_buf); total_read += read_from_buf; @@ -250,7 +250,9 @@ } total_read += cbRead; } - SG(read_post_bytes) += total_read; + + /* removed after re-testing POST with Pi3Web 2.0.2 */ + /* SG(read_post_bytes) += total_read; */ return total_read; } @@ -379,13 +381,11 @@ sapi_pi3web_read_cookies, /* read Cookies */ sapi_pi3web_register_variables, /* register server variables */ NULL, /* Log message */ - NULL, /* Block interruptions */ - NULL, /* Unblock interruptions */ STANDARD_SAPI_MODULE_PROPERTIES }; -DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB) +MODULE_API DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB) { zend_file_handle file_handle = {0}; int iRet = PIAPI_COMPLETED; @@ -454,7 +454,7 @@ return iRet; } -BOOL PHP4_startup() { +MODULE_API BOOL PHP4_startup() { tsrm_startup(1, 1, 0, NULL); sapi_startup(&pi3web_sapi_module); if (pi3web_sapi_module.startup) { @@ -464,7 +464,7 @@ return IWasLoaded; }; -BOOL PHP4_shutdown() { +MODULE_API BOOL PHP4_shutdown() { if (pi3web_sapi_module.shutdown) { pi3web_sapi_module.shutdown(&pi3web_sapi_module); }; Index: php4/sapi/pi3web/pi3web_sapi.h diff -u php4/sapi/pi3web/pi3web_sapi.h:1.4 php4/sapi/pi3web/pi3web_sapi.h:1.4.8.1 --- php4/sapi/pi3web/pi3web_sapi.h:1.4 Sat Feb 23 10:17:00 2002 +++ php4/sapi/pi3web/pi3web_sapi.h Mon Jun 2 13:14:10 2003 @@ -4,7 +4,7 @@ #ifdef PHP_WIN32 # include <windows.h> # include <httpext.h> -# ifdef SAPI_EXPORTS +# ifdef PHP4PI3WEB_EXPORTS # define MODULE_API __declspec(dllexport) # else # define MODULE_API __declspec(dllimport) @@ -79,9 +79,9 @@ } CONTROL_BLOCK, *LPCONTROL_BLOCK; -DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB); -BOOL PHP4_startup(); -BOOL PHP4_shutdown(); +MODULE_API DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB); +MODULE_API BOOL PHP4_startup(); +MODULE_API BOOL PHP4_shutdown(); // the following type declaration is for the server side typedef DWORD ( * PFN_WRAPPERFUNC )( CONTROL_BLOCK *pCB );
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php