Author: rjung
Date: Fri Oct 15 15:51:11 2010
New Revision: 1022975
URL: http://svn.apache.org/viewvc?rev=1022975&view=rev
Log:
Add support for Apache 2.3/2.4.
Changes needed due to private use of the macro
APLOG_MARK which now has a different definition.
Modified:
tomcat/jk/trunk/native/apache-2.0/mod_jk.c
tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c
URL:
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1022975&r1=1022974&r2=1022975&view=diff
==============================================================================
--- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Fri Oct 15 15:51:11 2010
@@ -123,6 +123,8 @@
#define NULL_FOR_EMPTY(x) ((x && !strlen(x)) ? NULL : x)
#define STRNULL_FOR_NULL(x) ((x) ? (x) : "(null)")
#define JK_LOG_LOCK_KEY ("jk_log_lock_key")
+#define JKLOG_MARK __FILE__,__LINE__
+
/*
* If you are not using SSL, comment out the following line. It will make
* apache run faster.
@@ -131,6 +133,11 @@
*/
#define ADD_SSL_INFO
+/* Needed for Apache 2.3/2.4 per-module log config */
+#ifdef APLOG_USE_MODULE
+APLOG_USE_MODULE(jk);
+#endif
+
/* module MODULE_VAR_EXPORT jk_module; */
AP_MODULE_DECLARE_DATA module jk_module;
@@ -636,9 +643,17 @@ static void jk_error_exit(const char *fi
ch++;
}
+#if (MODULE_MAGIC_NUMBER_MAJOR >= 20100606)
+ ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res);
+#else
ap_log_error(file, line, level, 0, s, res);
+#endif
if ( s ) {
+#if (MODULE_MAGIC_NUMBER_MAJOR >= 20100606)
+ ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, res);
+#else
ap_log_error(file, line, level, 0, NULL, res);
+#endif
}
/* Exit process */
@@ -2826,7 +2841,7 @@ static void *merge_jk_config(apr_pool_t
if (overrides->uri_to_context && overrides->mountcopy == JK_TRUE) {
/* jk_map_copy() preserves existing entries in overrides map */
if (jk_map_copy(base->uri_to_context, overrides->uri_to_context) ==
JK_FALSE) {
- jk_error_exit(APLOG_MARK, APLOG_EMERG, overrides->s, p,
"Memory error");
+ jk_error_exit(JKLOG_MARK, APLOG_EMERG, overrides->s, p,
"Memory error");
}
if (!overrides->mount_file)
overrides->mount_file = base->mount_file;
@@ -3269,7 +3284,7 @@ static int jk_post_config(apr_pool_t * p
if (sconf->uri_to_context) {
if (!uri_worker_map_alloc(&(sconf->uw_map),
sconf->uri_to_context,
sconf->log))
- jk_error_exit(APLOG_MARK, APLOG_EMERG, srv,
+ jk_error_exit(JKLOG_MARK, APLOG_EMERG, srv,
srv->process->pool, "Memory error");
if (sconf->options & JK_OPT_REJECTUNSAFE)
sconf->uw_map->reject_unsafe = 1;
Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1022975&r1=1022974&r2=1022975&view=diff
==============================================================================
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Fri Oct 15 15:51:11 2010
@@ -60,6 +60,9 @@
Common: Don't destroy errno during trace logging. (rjung)
</fix>
<update>
+ Apache: Add support for Apache 2.3/2.4. (rjung)
+ </update>
+ <update>
Apache: Added version number resource for mod_jk.so on Windows. (timw)
</update>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]