On 12/06/2008 08:40 PM, Craig Holmquist wrote: > Use of the APR_BRIGADE_SENTINEL macro now causes compile errors with > the current APR headers. This was observed trying to compile > mod_python with the httpd 2.2.10 headers, on MS Windows with Visual > Studio 2008, but I suspect it affects all platforms. > > The error is: > > C:\Download\tmp\mod_python-3.3.1\src\connobject.c(142) : error C2037: > left of 'next' specifies undefined struct/union 'apr_bucket_alloc_t' > > After investigating, I think the cause of problem is this change to > apr_ring.h: > > http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_ring.h?r1=566349&r2=662299 > > #define APR_RING_SENTINEL(hp, elem, link) \ > - (struct elem *)((char *)(hp) - APR_OFFSETOF(struct elem, link)) > + (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link)) > > What's passed to APR_RING_SENTINEL (as "hp") is a pointer to > apr_bucket_alloc_t, which is declared in apr_buckets.h but not > actually defined anywhere (as far as I can tell, at least nowhere in > the headers that are bundled with the Windows installation of httpd > 2.2.10), therefore none of its members can be referenced. > > mod_python compiles without any errors using the httpd 2.2.8 headers.
This is a bug in mod_python. Instead of !(b == APR_BRIGADE_SENTINEL(b) || it must be !(b == APR_BRIGADE_SENTINEL(bb) || They pass a bucket to APR_BRIGADE_SENTINEL which is wrong. This is fixed in mod_python trunk. See http://svn.eu.apache.org/viewvc?view=rev&revision=676904 Regards RĂ¼diger
