holger Sun Apr 8 03:49:07 2001 EDT
Modified files:
/php4/sapi/pi3web pi3web_sapi.c pi3web_sapi.h
Log:
Reorganized the #define's in the header.
Index: php4/sapi/pi3web/pi3web_sapi.c
diff -u php4/sapi/pi3web/pi3web_sapi.c:1.16 php4/sapi/pi3web/pi3web_sapi.c:1.17
--- php4/sapi/pi3web/pi3web_sapi.c:1.16 Sun Apr 8 01:25:20 2001
+++ php4/sapi/pi3web/pi3web_sapi.c Sun Apr 8 03:49:07 2001
@@ -21,12 +21,8 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pi3web_sapi.c,v 1.16 2001/04/08 08:25:20 holger Exp $ */
+/* $Id: pi3web_sapi.c,v 1.17 2001/04/08 10:49:07 holger Exp $ */
-#if WIN32|WINNT
-# include <windows.h>
-#endif
-
#include "pi3web_sapi.h"
#include "php.h"
#include "php_main.h"
@@ -81,7 +77,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.16 2001/04/08 08:25:20 holger Exp $");
+ php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id:
+pi3web_sapi.c,v 1.17 2001/04/08 10:49:07 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);
@@ -107,7 +103,7 @@
if (lpCB->GetServerVariable(lpCB->ConnID, *p, variable_buf,
&variable_len)
&& variable_buf[0]) {
php_info_print_table_row(2, *p, variable_buf);
- } else if (PIPlatform_getLastError() == ERROR_INSUFFICIENT_BUFFER) {
+ } else if (PIPlatform_getLastError() == PIAPI_EINVAL) {
char *tmp_variable_buf;
tmp_variable_buf = (char *) emalloc(variable_len);
@@ -267,7 +263,7 @@
if (lpCB->GetServerVariable(lpCB->ConnID, "HTTP_COOKIE", variable_buf,
&variable_len)) {
return estrndup(variable_buf, variable_len);
- } else if (PIPlatform_getLastError()==ERROR_INSUFFICIENT_BUFFER) {
+ } else if (PIPlatform_getLastError()==PIAPI_EINVAL) {
char *tmp_variable_buf = (char *) emalloc(variable_len+1);
if (lpCB->GetServerVariable(lpCB->ConnID, "HTTP_COOKIE",
tmp_variable_buf, &variable_len)) {
@@ -339,7 +335,7 @@
if (lpCB->GetServerVariable(lpCB->ConnID, "ALL_HTTP", static_variable_buf,
&variable_len)) {
variable_buf = static_variable_buf;
} else {
- if (PIPlatform_getLastError()==ERROR_INSUFFICIENT_BUFFER) {
+ if (PIPlatform_getLastError()==PIAPI_EINVAL) {
variable_buf = (char *) emalloc(variable_len);
if (!lpCB->GetServerVariable(lpCB->ConnID, "ALL_HTTP",
variable_buf, &variable_len)) {
efree(variable_buf);
@@ -377,7 +373,7 @@
}
-DWORD fnWrapperProc(LPCONTROL_BLOCK lpCB)
+DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB)
{
zend_file_handle file_handle;
SLS_FETCH();
Index: php4/sapi/pi3web/pi3web_sapi.h
diff -u php4/sapi/pi3web/pi3web_sapi.h:1.1 php4/sapi/pi3web/pi3web_sapi.h:1.2
--- php4/sapi/pi3web/pi3web_sapi.h:1.1 Thu Dec 28 00:31:42 2000
+++ php4/sapi/pi3web/pi3web_sapi.h Sun Apr 8 03:49:07 2001
@@ -1,21 +1,28 @@
#ifndef _PI3WEB_SAPI_H_
#define _PI3WEB_SAPI_H_
-//#if WIN32
-//#include <windows.h>
-//#else
-#define far
-#define ERROR_INSUFFICIENT_BUFFER 122L
-typedef int BOOL;
-typedef void far *LPVOID;
-typedef LPVOID HCONN;
-typedef unsigned long DWORD;
-typedef DWORD far *LPDWORD;
-typedef char CHAR;
-typedef CHAR *LPSTR;
-typedef unsigned char BYTE;
-typedef BYTE far *LPBYTE;
-//#endif
+#ifdef PHP_WIN32
+# include <windows.h>
+# include <httpext.h>
+# ifdef SAPI_EXPORTS
+# define MODULE_API __declspec(dllexport)
+# else
+# define MODULE_API __declspec(dllimport)
+# endif
+#else
+# define far
+# define MODULE_API
+
+ typedef int BOOL;
+ typedef void far *LPVOID;
+ typedef LPVOID HCONN;
+ typedef unsigned long DWORD;
+ typedef DWORD far *LPDWORD;
+ typedef char CHAR;
+ typedef CHAR *LPSTR;
+ typedef unsigned char BYTE;
+ typedef BYTE far *LPBYTE;
+#endif
#ifdef __cplusplus
extern "C" {
@@ -72,17 +79,14 @@
} CONTROL_BLOCK, *LPCONTROL_BLOCK;
-#ifndef WIN32
-#define __stdcall
-#endif
+MODULE_API DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB);
+MODULE_API BOOL PHP4_startup();
+MODULE_API BOOL PHP4_shutdown();
-DWORD fnWrapperProc(LPCONTROL_BLOCK lpCB);
+// the following type declaration is for the server side
+typedef DWORD ( * PFN_WRAPPERFUNC )( CONTROL_BLOCK *pCB );
-// the following type declarations is for the server side
-typedef DWORD ( * PFN_WRAPPERPROC )( CONTROL_BLOCK *pCB );
-BOOL PHP4_startup();
-BOOL PHP4_shutdown();
#ifdef __cplusplus
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]