Hi,

Lately, I've been trying to get Apache HTTPd trunk run Subversion
1.4.0-dev (trunk, too). This includes the new auth code recently merged
and the backward compatibility module mod_access_compat.

I tried to build Apache with the --enable-compat flag at configure time
but it fails on the ap_satisfies function.

Indeed, mod_access_compat implements the ap_satisfies function for
backward compatibility, but the new auth code, mainly represented by the
mod_auth.h header file, use the APR_OPTIONAL_FN_TYPE macro to define an
ap_satisfies function.

There's no problem with that unless you try to build mod_access_compat :
you get the following error :

mod_access_compat.c:373: error: redefinition of typedef 'apr_OFN_ap_satisfies_t'
mod_auth.h:54: error: previous declaration of 'apr_OFN_ap_satisfies_t' was here

The 'apr_OFN_ap_satisfies_t' keyword is here translated from the
APR_OPTIONAL_FN_TYPE macro.

I don't really know how all this is supposed to work yet, but I guess we
could had some conditional build here so that an ap_satisfies function
is only defined in the header file if needed (see attached patch).

Brad, or anybody, any thoughts on this ?

Regards,
- Sam

-- 
Maxime Petazzoni (http://www.bulix.org)
 -- gone crazy, back soon. leave message.
Index: modules/aaa/mod_access_compat.c
===================================================================
--- modules/aaa/mod_access_compat.c     (revision 368961)
+++ modules/aaa/mod_access_compat.c     (working copy)
@@ -37,6 +37,7 @@
 #include "http_protocol.h"
 #include "http_request.h"
 
+#define USE_ACCESS_COMPAT
 #include "mod_auth.h"
 
 #if APR_HAVE_NETINET_IN_H
Index: modules/aaa/mod_auth.h
===================================================================
--- modules/aaa/mod_auth.h      (revision 368961)
+++ modules/aaa/mod_auth.h      (working copy)
@@ -51,7 +51,9 @@
 /** There are no applicable satisfy lines */
 #define SATISFY_NOSPEC 2
 
+#ifndef USE_ACCESS_COMPAT
 APR_DECLARE_OPTIONAL_FN(int, ap_satisfies, (request_rec *r));
+#endif
 
 typedef enum {
     AUTH_DENIED,

Attachment: signature.asc
Description: Digital signature

Reply via email to