You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2001/12/31 23:25:03 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_map.c jk_registry.c jk_registry.h
jfclere 01/12/31 14:25:03
Modified: jk/native2 build.xml
jk/native2/common jk_env.c jk_map.c jk_registry.c
jk_registry.h
Log:
Add a piece of APR. And arrange build.xml for Linux (Sun JVM).
Revision Changes Path
1.8 +13 -1 jakarta-tomcat-connectors/jk/native2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- build.xml 31 Dec 2001 20:03:41 -0000 1.7
+++ build.xml 31 Dec 2001 22:25:03 -0000 1.8
@@ -16,7 +16,9 @@
<property name="apache13.home" location="/usr" />
<property name="apache2.include" location="${apache2.home}/include" />
+ <!-- No!!! otherwise apache13 will think we have APR for it...
<property name="apr.include" location="${apache2.home}/include" />
+ -->
<property name="apache13.include" location="${apache13.home}/include" />
<!-- ========== Build options ========== -->
@@ -60,6 +62,7 @@
</target>
<target name="apache20" depends="init" if="apache2.detect">
+ <property name="apr.include" location="${apache2.home}/include" />
<mkdir dir="${build.dir}/apache2" />
<so sofile="mod_jk"
buildDir="${build.dir}/apache2"
@@ -72,10 +75,12 @@
info="Read/Write buffer size" />
<def name="USE_APACHE_MD5"
info="Use the MD5 implementation that is part of apache2" />
+ <def name="HAS_APR"
+ info="Allow APR specific extensions" />
<src dir=".">
<include name="server/apache2/*.c" />
<include name="common/*.c" />
- <include name="apr/*.c" />
+ <include name="common/apr/*.c" />
</src>
<includes>
<include name="${native.dir}/common" />
@@ -83,6 +88,7 @@
<include name="${apr.include}" />
<include name="${native.dir}/include" />
<include name="${java.home}/../include" />
+ <include name="${java.home}/../include/linux" if="linux" />
</includes>
<depends>
<fileset dir="${native.dir}/common" includes="*.h" />
@@ -121,6 +127,7 @@
<include name="${java.home}/../include/netware" if="netware" />
<include name="${java.home}/../include/win32" if="win32" />
+ <include name="${java.home}/../include/linux" if="linux" />
</includes>
<depends>
<fileset dir="${native.dir}/common" includes="*.h" />
@@ -192,6 +199,8 @@
<include name="${apache13.home}/os/win32" if="win32" />
<include name="${java.home}/../include/win32" if="win32" />
<include name="${native.dir}/common" if="win32" />
+
+ <include name="${java.home}/../include/linux" if="linux" />
</includes>
<depends>
<fileset dir="${native.dir}/common" includes="*.h" />
@@ -260,6 +269,8 @@
<include name="${java.home}/../include" />
<include name="${native.dir}/include" />
<include name="${java.home}/../include/win32" />
+ <!-- JFC why not conditional? -->
+ <include name="${java.home}/../include/linux" />
<include name="${native.dir}/common" />
<include name="${build.compiler.base}/include" />
</includes>
@@ -318,6 +329,7 @@
<include name="${apache13.home}/os/win32" if="win32" />
<include name="${java.home}/../include/win32" if="win32" />
+ <include name="${java.home}/../include/linux" if="linux" />
<include name="${native.dir}/common" if="win32" />
</includes>
<depends>
1.8 +4 -0 jakarta-tomcat-connectors/jk/native2/common/jk_env.c
Index: jk_env.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jk_env.c 16 Dec 2001 23:18:11 -0000 1.7
+++ jk_env.c 31 Dec 2001 22:25:03 -0000 1.8
@@ -112,6 +112,10 @@
jk_env_objectFactory_t fac;
void *result;
+ /* prevent core... */
+ if (name==NULL)
+ return(NULL);
+
fac=_this->getFactory( _this, type, name);
if( fac==NULL ) {
if( _this->l )
1.11 +4 -3 jakarta-tomcat-connectors/jk/native2/common/jk_map.c
Index: jk_map.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- jk_map.c 31 Dec 2001 19:17:51 -0000 1.10
+++ jk_map.c 31 Dec 2001 22:25:03 -0000 1.11
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: General purpose map object *
* Author: Gal Shachor <sh...@il.ibm.com> *
- * Version: $Revision: 1.10 $ *
+ * Version: $Revision: 1.11 $ *
***************************************************************************/
#include "jk_global.h"
@@ -134,9 +134,10 @@
/* XXX this is wrong - either we take ownership and copy both
name and value,
or none. The caller should do that if he needs !
- */
- /* mPriv->names[mPriv->size] = m->pool->pstrdup(m->pool, name); */
+ Sure, but we should have our copy...
mPriv->names[mPriv->size] = (char *)name;
+ */
+ mPriv->names[mPriv->size] = m->pool->pstrdup(env,m->pool, name);
mPriv->size ++;
rc = JK_TRUE;
}
1.8 +5 -1 jakarta-tomcat-connectors/jk/native2/common/jk_registry.c
Index: jk_registry.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jk_registry.c 31 Dec 2001 20:37:01 -0000 1.7
+++ jk_registry.c 31 Dec 2001 22:25:03 -0000 1.8
@@ -63,7 +63,7 @@
#include "jk_registry.h"
/***************************************************************************
* Description: Worker list *
- * Version: $Revision: 1.7 $ *
+ * Version: $Revision: 1.8 $ *
***************************************************************************/
/** Static declarations for all 'hardcoded' modules. This is a hack,
@@ -112,7 +112,11 @@
env->registerFactory( env, "worker", "ajp14", jk_worker_ajp14_factory );
env->registerFactory( env, "worker", "lb", jk_worker_lb_factory );
env->registerFactory( env, "worker", "status", jk_worker_status_factory );
+#ifdef HAS_APR
+ env->registerFactory( env, "channel", "socket", jk_channel_apr_socket_factory );
+#else
env->registerFactory( env, "channel", "socket", jk_channel_socket_factory );
+#endif
env->registerFactory( env, "handler", "response", jk_handler_response_factory );
env->registerFactory( env, "handler", "logon", jk_handler_logon_factory );
env->registerFactory( env, "handler", "discovery",
1.3 +7 -1 jakarta-tomcat-connectors/jk/native2/common/jk_registry.h
Index: jk_registry.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_registry.h 31 Dec 2001 20:37:01 -0000 1.2
+++ jk_registry.h 31 Dec 2001 22:25:03 -0000 1.3
@@ -62,7 +62,7 @@
/***************************************************************************
* Description: Worker list *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
/** Static declarations for all 'hardcoded' modules. This is a hack,
@@ -109,9 +109,15 @@
/* Factories for 'new' types. We use the new factory interface,
* workers will be updated later
*/
+#ifdef HAS_APR
+int JK_METHOD jk_channel_apr_socket_factory(jk_env_t *env, jk_pool_t *pool,
+ void **result,
+ const char *type, const char *name);
+#else
int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool,
void **result,
const char *type, const char *name);
+#endif
int JK_METHOD jk_workerEnv_factory(jk_env_t *env, jk_pool_t *pool,
void **result,
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>