httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r730803 - in /httpd/httpd/trunk/modules/proxy: config.m4 mod_proxy_fdpass.c
Date Fri, 02 Jan 2009 18:15:03 GMT
Author: rjung
Date: Fri Jan  2 10:15:02 2009
New Revision: 730803

URL: http://svn.apache.org/viewvc?rev=730803&view=rev
Log:
Add a declaration check for CMSG_DATA to mod_proxy_fdpass.
Also move '#error' after the includes, because it seems
CMSG_DATA is commonly defined in sys/socket.h.

The check also overwrites _apmod_error_fatal in case
CMSG_DATA is not defined to allow building when configure
was called with "--enable-proxy". Otherwise one would need
to explicitly disable mod_proxy_fdpass.

We might want to remove the #error completely, because the
new feature test prevents the building of the module when
the symbol is not defined.

Modified:
    httpd/httpd/trunk/modules/proxy/config.m4
    httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c

Modified: httpd/httpd/trunk/modules/proxy/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/config.m4?rev=730803&r1=730802&r2=730803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/config.m4 (original)
+++ httpd/httpd/trunk/modules/proxy/config.m4 Fri Jan  2 10:15:02 2009
@@ -42,7 +42,14 @@
 APACHE_MODULE(proxy_http, Apache proxy HTTP module, $proxy_http_objs, , $proxy_mods_enable)
 APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module, $proxy_fcgi_objs, , $proxy_mods_enable)
 APACHE_MODULE(proxy_scgi, Apache proxy SCGI module, $proxy_scgi_objs, , $proxy_mods_enable)
-APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module, $proxy_fdpass_objs,
, $proxy_mods_enable)
+APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module, $proxy_fdpass_objs,
, $proxy_mods_enable, [
+  AC_CHECK_DECLS(CMSG_DATA, [ap_HAVE_DECL_CMSG_DATA="yes"], [ap_HAVE_DECL_CMSG_DATA="no"],
[[#include <sys/socket.h>]])
+  if test $ap_HAVE_DECL_CMSG_DATA = "no"; then
+    AC_MSG_WARN([Your system does not support CMSG_DATA.])
+    enable_proxy_fdpass="no"
+    _apmod_error_fatal="no"
+  fi
+])
 APACHE_MODULE(proxy_ajp, Apache proxy AJP module, $proxy_ajp_objs, , $proxy_mods_enable)
 APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module, $proxy_balancer_objs, , $proxy_mods_enable)
 

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c?rev=730803&r1=730802&r2=730803&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c Fri Jan  2 10:15:02 2009
@@ -16,14 +16,14 @@
 
 #include "mod_proxy.h"
 
-#ifndef CMSG_DATA
-#error This module only works on unix platforms with the correct OS support
-#endif
-
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 
+#ifndef CMSG_DATA
+#error This module only works on unix platforms with the correct OS support
+#endif
+
 /* for apr_wait_for_io_or_timeout */
 #include "apr_support.h"
 



Mime
View raw message