You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2008/01/15 19:38:03 UTC

svn commit: r612187 - in /tomcat/connectors/trunk/jk: native/apache-2.0/mod_jk.c native/configure.in xdocs/miscellaneous/changelog.xml xdocs/webserver_howto/apache.xml

Author: rjung
Date: Tue Jan 15 10:38:01 2008
New Revision: 612187

URL: http://svn.apache.org/viewvc?rev=612187&view=rev
Log:
Don't use post httpd 2.2.0 API functions when building
with new --enable-api-compatibility configure switch.
This improves binary compatibility of module builds with
httpd releases older than the release against mod_jk is build
(only between minor httpd versions).

Modified:
    tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
    tomcat/connectors/trunk/jk/native/configure.in
    tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
    tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=612187&r1=612186&r2=612187&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Tue Jan 15 10:38:01 2008
@@ -672,7 +672,7 @@
      */
     s->server_port  = ap_get_server_port(r);
 
-#if (AP_MODULE_MAGIC_AT_LEAST(20051115,4))
+#if (AP_MODULE_MAGIC_AT_LEAST(20051115,4)) && !defined(API_COMPATIBILITY)
     s->server_software = (char *)ap_get_server_description();
 #else
     s->server_software = (char *)ap_get_server_version();
@@ -2810,7 +2810,7 @@
        will feed it */
     worker_env.uri_to_worker = conf->uw_map;
     worker_env.virtual = "*";   /* for now */
-#if (AP_MODULE_MAGIC_AT_LEAST(20051115,4))
+#if (AP_MODULE_MAGIC_AT_LEAST(20051115,4)) && !defined(API_COMPATIBILITY)
     worker_env.server_name = (char *)ap_get_server_description();
 #else
     worker_env.server_name = (char *)ap_get_server_version();

Modified: tomcat/connectors/trunk/jk/native/configure.in
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/configure.in?rev=612187&r1=612186&r2=612187&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/configure.in (original)
+++ tomcat/connectors/trunk/jk/native/configure.in Tue Jan 15 10:38:01 2008
@@ -483,6 +483,27 @@
 ])
 AC_SUBST(CFLAGS)
 
+dnl CFLAGS for building against recent httpd but without
+dnl using httpd API functions, which didn't exist in the first
+dnl production releases. This ensures, that the resulting
+dnl module binary is compatible with older httpd releases.
+dnl Until now only relevant for httpd 2.2.x with x >= 4.
+CFLAGS="${CFLAGS}"
+AC_ARG_ENABLE(api-compatibility,
+[AS_HELP_STRING([--enable-api-compatibility],
+[Only use httpd API functions available in all production releases.
+This improves binary compatibility of module builds with httpd releases
+older than the release against we build (only between minor versions).])],
+[
+case "${enableval}" in
+    y | Y | YES | yes | TRUE | true )
+        CFLAGS="${CFLAGS} -DAPI_COMPATIBILITY"
+        AC_MSG_RESULT([...Only using compatible httpd API...])
+        ;;
+esac
+])
+AC_SUBST(CFLAGS)
+
 dnl CFLAGS for shared memory lock mode
 dnl it also allows the CFLAGS environment variable.
 CFLAGS="${CFLAGS}"

Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=612187&r1=612186&r2=612187&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jan 15 10:38:01 2008
@@ -43,6 +43,10 @@
   <br />
   <subsection name="Native">
     <changelog>
+      <update>
+        Configure: Don't use post httpd 2.2.0 API functions when building
+        with new --enable-api-compatibility configure switch. (rjung)
+      </update>
       <fix>
         Apache: JkAutoAlias does not work in combination with JkMountCopy
         if there are no JkMount in virtual host. (rjung)

Modified: tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml?rev=612187&r1=612186&r2=612187&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/webserver_howto/apache.xml Tue Jan 15 10:38:01 2008
@@ -962,6 +962,13 @@
 Even with "--disable-trace" logging debug messages with debug log level
 will still be possible.</td>
 </tr>
+  <tr valign="top"><td>--enable-api-compatibility</td>
+  <td>
+Only use httpd API functions available in all httpd production releases
+of the chosen major httpd release branch. This improves binary
+compatibility of module builds with httpd releases older than the release
+against mod_jk is build (only between minor httpd versions).</td>
+</tr>
   <tr valign="top"><td>--enable-flock</td>
   <td>
 In case the operating system supports flock system call use this flag to enable this



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org