You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jo...@apache.org on 2001/05/12 04:31:49 UTC
cvs commit: jakarta-tomcat-4.0/connectors/lib pr_warp.c
jon 01/05/11 19:31:49
Modified: connectors/apache-1.3 mod_webapp.c
connectors/include wa.h
connectors/lib pr_warp.c
Added: connectors WIN32.txt mod_webapp.dsp
Log:
added patches and files for win32 support thanks to:
Dave Oxley <to...@hotmail.com>
Note: I didn't add the binary files in what he sent to CVS...
Revision Changes Path
1.1 jakarta-tomcat-4.0/connectors/WIN32.txt
Index: WIN32.txt
===================================================================
1. Get and extract apr and apr-utils from http://apr.apache.org to c:\apr and c:\apr-utils (for example).
2. Build them with Visual C++. (Use the aprutils.dsw in the c:\apr-utils directory and choose to batch build everything).
3. Add the following environment variables (With paths appropriate for your system):
APACHE1_HOME=C:\Program Files\Apache Group\Apache
APR_HOME=C:\apr
4. Build mod_webapp.dll with Visual C++. (Use the mod_webapp.dsp in the %TOMCAT4_SRC_HOME%\connectors\apache-1.3 directory and choose to batch build everything).
5. Do the following:
copy %APR_HOME%\Release\libapr.dll %APACHE1_HOME%\modules
copy %TOMCAT4_SRC_HOME%\connectors\apache-1.3\Release\mod_webapp.dll %APACHE1_HOME%\modules
6. Add the following lines to %APACHE1_HOME%\conf\httpd.conf:
LoadModule webapp_module modules/mod_webapp.dll
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
7. Change ServerName in %APACHE1_HOME%\conf\httpd.conf and defaultHost in %TOMCAT4_HOME%\conf\server.xml to match.
8. Start Tomcat followed by Apache.
1.1 jakarta-tomcat-4.0/connectors/mod_webapp.dsp
Index: mod_webapp.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="mod_webapp" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=mod_webapp - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mod_webapp.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mod_webapp.mak" CFG="mod_webapp - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mod_webapp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mod_webapp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "mod_webapp - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MOD_WEBAPP_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /O2 /I "..\include" /I "$(APR_HOME)\include" /I "$(APACHE1_HOME)\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MOD_WEBAPP_EXPORTS" /FD /c
# SUBTRACT CPP /u /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 ApacheCore.lib libapr.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /libpath:"$(APR_HOME)\Release" /libpath:"$(APACHE1_HOME)\libexec"
!ELSEIF "$(CFG)" == "mod_webapp - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MOD_WEBAPP_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\include" /I "$(APR_HOME)\include" /I "$(APACHE1_HOME)\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MOD_WEBAPP_EXPORTS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ApacheCore.lib libapr.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"$(APR_HOME)\Debug" /libpath:"$(APACHE1_HOME)\libexec"
!ENDIF
# Begin Target
# Name "mod_webapp - Win32 Release"
# Name "mod_webapp - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\mod_webapp.c
# End Source File
# Begin Source File
SOURCE=..\lib\pr_info.c
# End Source File
# Begin Source File
SOURCE=..\lib\pr_warp.c
# End Source File
# Begin Source File
SOURCE=..\lib\wa_config.c
# End Source File
# Begin Source File
SOURCE=..\lib\wa_main.c
# End Source File
# Begin Source File
SOURCE=..\lib\wa_request.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\include\wa.h
# End Source File
# Begin Source File
SOURCE=..\include\wa_config.h
# End Source File
# Begin Source File
SOURCE=..\include\wa_main.h
# End Source File
# Begin Source File
SOURCE=..\include\wa_request.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
1.16 +4 -4 jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c
Index: mod_webapp.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mod_webapp.c 2001/05/10 15:49:52 1.15
+++ mod_webapp.c 2001/05/12 02:31:47 1.16
@@ -57,7 +57,7 @@
/**
* @author Pier Fumagalli <ma...@eng.sun.com>
- * @version $Id: mod_webapp.c,v 1.15 2001/05/10 15:49:52 pier Exp $
+ * @version $Id: mod_webapp.c,v 1.16 2001/05/12 02:31:47 jon Exp $
*/
#include <httpd.h>
@@ -74,9 +74,9 @@
/* ************************************************************************* */
/* Module declaration */
-module webapp_module;
+module MODULE_VAR_EXPORT webapp_module;
/* Wether the WebApp Library has been initialized or not */
-static boolean wam_initialized=FALSE;
+static wa_boolean wam_initialized=FALSE;
/* The list of configured connections */
static wa_chain *wam_connections=NULL;
@@ -476,7 +476,7 @@
};
/* Apache module declaration */
-module webapp_module = {
+module MODULE_VAR_EXPORT webapp_module = {
STANDARD_MODULE_STUFF,
NULL, /* module initializer */
NULL, /* per-directory config creator */
1.8 +7 -2 jakarta-tomcat-4.0/connectors/include/wa.h
Index: wa.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- wa.h 2001/05/10 21:14:59 1.7
+++ wa.h 2001/05/12 02:31:48 1.8
@@ -57,7 +57,7 @@
/**
* @author Pier Fumagalli <ma...@eng.sun.com>
- * @version $Id: wa.h,v 1.7 2001/05/10 21:14:59 pier Exp $
+ * @version $Id: wa.h,v 1.8 2001/05/12 02:31:48 jon Exp $
*/
#ifndef _WA_H_
#define _WA_H_
@@ -66,7 +66,12 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
+
+#ifdef WIN32
+#define vsnprintf _vsnprintf
+#else
#include <unistd.h>
+#endif /* ifdef WIN32 */
/* APR Library includes */
#include <apr_general.h>
@@ -78,7 +83,7 @@
#include <apr_network_io.h>
/* WebApp Library type definitions. */
-typedef int boolean;
+typedef int wa_boolean;
typedef struct wa_chain wa_chain;
1.2 +13 -13 jakarta-tomcat-4.0/connectors/lib/pr_warp.c
Index: pr_warp.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/lib/pr_warp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pr_warp.c 2001/05/10 21:12:32 1.1
+++ pr_warp.c 2001/05/12 02:31:48 1.2
@@ -55,7 +55,7 @@
* *
* ========================================================================= */
-/* @version $Id: pr_warp.c,v 1.1 2001/05/10 21:12:32 pier Exp $ */
+/* @version $Id: pr_warp.c,v 1.2 2001/05/12 02:31:48 jon Exp $ */
#include <wa.h>
/* ************************************************************************* */
@@ -101,14 +101,14 @@
typedef struct warp_cconfig {
apr_sockaddr_t *addr;
apr_socket_t *sock;
- boolean disc;
+ wa_boolean disc;
} warp_cconfig;
/* The WARP application configuration structure */
typedef struct warp_aconfig {
int host;
int appl;
- boolean depl;
+ wa_boolean depl;
} warp_aconfig;
typedef struct warp_packet {
@@ -141,14 +141,14 @@
return(pack);
}
-static boolean p_wshort(warp_packet *p, int k) {
+static wa_boolean p_wshort(warp_packet *p, int k) {
if ((p->bpos+2)>MAXPAYLOAD) return(FALSE);
p->buff[p->bpos++]=(char)((k>>8)&0x0ff);
p->buff[p->bpos++]=(char)(k&0x0ff);
return(TRUE);
}
-static boolean p_wstring(warp_packet *p, char *s) {
+static wa_boolean p_wstring(warp_packet *p, char *s) {
int l=0;
int x=0;
@@ -189,7 +189,7 @@
/* Attempt to connect to the remote endpoint of the WARP connection (if not
done already). */
-static boolean n_connect(wa_connection *conn) {
+static wa_boolean n_connect(wa_connection *conn) {
warp_cconfig *conf=(warp_cconfig *)conn->conf;
apr_status_t ret=APR_SUCCESS;
@@ -246,10 +246,10 @@
/* Send a 16 bits value over a connection */
-static boolean n_sshort(wa_connection *conn, int k) {
+static wa_boolean n_sshort(wa_connection *conn, int k) {
warp_cconfig *c=(warp_cconfig *)conn->conf;
- apr_size_t len=2;
- char buf[len];
+ apr_size_t len=2;
+ char buf[2];
if (c->sock==NULL) {
wa_log(WA_MARK,"Socket not initialized");
@@ -280,7 +280,7 @@
}
/* Send a packet over a connection */
-static boolean n_send(wa_connection *conn, int r, warp_packet *p) {
+static wa_boolean n_send(wa_connection *conn, int r, warp_packet *p) {
warp_cconfig *c=(warp_cconfig *)conn->conf;
apr_size_t len=2;
@@ -359,7 +359,7 @@
}
/* Receive a warp packet. */
-static boolean n_recv(wa_connection *conn, int r, warp_packet *p) {
+static wa_boolean n_recv(wa_connection *conn, int r, warp_packet *p) {
warp_cconfig *c=(warp_cconfig *)conn->conf;
apr_size_t num=0;
int rid=-1;
@@ -645,7 +645,7 @@
typedef struct warp_rheader {
wa_connection *conn;
warp_packet *pack;
- boolean fail;
+ wa_boolean fail;
int wrid;
} warp_rheader;
@@ -671,7 +671,7 @@
warp_packet *i=p_create(r->pool);
warp_packet *o=p_create(r->pool);
wa_connection *conn=a->conn;
- boolean committed=FALSE;
+ wa_boolean committed=FALSE;
int rid=0;
int sta=500;