]> granicus.if.org Git - php/commitdiff
Added PHP4PI3WEB_EXPORTS in order to control exports/imports on Win32
authorHolger Zimmermann <holger@php.net>
Sat, 19 Apr 2003 16:11:36 +0000 (16:11 +0000)
committerHolger Zimmermann <holger@php.net>
Sat, 19 Apr 2003 16:11:36 +0000 (16:11 +0000)
sapi/pi3web/php4pi3web.dsp
sapi/pi3web/pi3web_sapi.c
sapi/pi3web/pi3web_sapi.h

index ec1c2806a36219575781aa99fed14a051dc999e7..6519f54be480b5106f0e43d5a0cc19af842a8a31 100644 (file)
@@ -97,7 +97,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0\r
 # PROP Target_Dir ""\r
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".." /I "..\main" /I "..\regex" /I "..\..\bindlib_w32" /I "..\Zend" /I "..\TSRM" /I "..\ext\mysql\libmysql" /I "..\..\..\PiAPI" /I "..\..\..\Pi2API" /I "..\..\..\Pi3API" /D "NDEBUG" /D ZEND_DEBUG=0 /D "_WINDOWS" /D "_USRDLL" /D "PHP4DLLTS_EXPORTS" /D "PHP_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "SAPI_EXPORTS" /D "MSVC5" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /c\r
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\main" /I "..\..\TSRM" /D "NDEBUG" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "_WINDOWS" /D "_USRDLL" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\main" /I "..\..\TSRM" /D "NDEBUG" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "_WINDOWS" /D "_USRDLL" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /D "PHP4PI3WEB_EXPORTS" /FR /YX /FD /c\r
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32\r
 # ADD BASE RSC /l 0x409 /d "NDEBUG"\r
index f11d59338d290d7ab26474c0948dd410cc630a77..3c223752ea1b0a1c72356690be49eb8731b7db5f 100644 (file)
@@ -40,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;
 
@@ -233,7 +231,7 @@ static int sapi_pi3web_read_post(char *buffer, uint count_bytes TSRMLS_DC)
        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;
@@ -385,7 +383,7 @@ static sapi_module_struct pi3web_sapi_module = {
        STANDARD_SAPI_MODULE_PROPERTIES
 };
 
-DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB)
+MODULE_API DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB)
 {
        zend_file_handle file_handle;
        int iRet = PIAPI_COMPLETED;
@@ -454,7 +452,7 @@ DWORD PHP4_wrapper(LPCONTROL_BLOCK lpCB)
        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 +462,7 @@ BOOL PHP4_startup() {
        return IWasLoaded;
 };
 
-BOOL PHP4_shutdown() {
+MODULE_API BOOL PHP4_shutdown() {
        if (pi3web_sapi_module.shutdown) {
                pi3web_sapi_module.shutdown(&pi3web_sapi_module);
        };
index 36e08e798206b2f807a6b239be8089a5075ea9c9..d1c38d744e7979d974567d2d098719826c3e865a 100644 (file)
@@ -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 @@ typedef struct _CONTROL_BLOCK {
 
 } 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 );