You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <ma...@apache.org> on 2006/11/02 11:34:34 UTC
[PATCH] mod_disk_cache fails to compile [Was: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c]
On Fri, Oct 27, 2006 at 05:05:29PM +0200, Graham Leggett wrote:
> On Fri, October 27, 2006 4:38 pm, Davi Arnaut wrote:
>
> > Where is pdconf ? Check out all those APR_HAS_SENDFILE.
>
> Aaargh... will fix.
Still, since 2 days, again mod_disk_cache fails to compile on
platforms with sendfile (e.g., FreeBSD).
Martin
--
<Ma...@Fujitsu-Siemens.com> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-48332 | 81730 Munich, Germany
Re: [PATCH] mod_disk_cache fails to compile [Was: svn commit:
r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c
modules/cache/mod_cache.h modules/cache/mod_disk_cache.c
modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c]
Posted by Graham Leggett <mi...@sharp.fm>.
On Thu, November 2, 2006 12:34 pm, Martin Kraemer wrote:
> Still, since 2 days, again mod_disk_cache fails to compile on
> platforms with sendfile (e.g., FreeBSD).
I missed the patch you sent - looks the same as r468409 though?
Regards,
Graham
--
Re: [PATCH] mod_disk_cache fails to compile [Was: svn commit:
r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c
modules/cache/mod_cache.h modules/cache/mod_disk_cache.c
modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c]
Posted by Graham Leggett <mi...@sharp.fm>.
On Thu, November 2, 2006 2:20 pm, Martin Kraemer wrote:
> Oops - I forgot to mention the branch I'm working on - it's a bug in
> the trunk. I am at Revision 470348, but the pdconf variable occurs at
> *two* places in the file, however the declaration appears only once.
Aaah... the penny drops.
I deleted the pdconf definition in one place (it was giving a compiler
warning for the APR_HAS_SENDFILE == 0 case), and when it was pointed out I
put it back.
Looks like this code hasn't built in the SENDFILE case for a while.
Regards,
Graham
--
Re: [PATCH] mod_disk_cache fails to compile [Was: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c]
Posted by Martin Kraemer <ma...@apache.org>.
On Thu, Nov 02, 2006 at 01:00:29PM +0200, Graham Leggett wrote:
> On Thu, November 2, 2006 12:34 pm, Martin Kraemer wrote:
>
> > Still, since 2 days, again mod_disk_cache fails to compile on
> > platforms with sendfile (e.g., FreeBSD).
>
Oops - I forgot to mention the branch I'm working on - it's a bug in
the trunk. I am at Revision 470348, but the pdconf variable occurs at
*two* places in the file, however the declaration appears only once.
Martin
--
<Ma...@Fujitsu-Siemens.com> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-48332 | 81730 Munich, Germany
Re: [PATCH] mod_disk_cache fails to compile [Was: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c]
Posted by Martin Kraemer <ma...@apache.org>.
On Thu, Nov 02, 2006 at 01:00:29PM +0200, Graham Leggett wrote:
> If you can send more details, I can get to the bottom of it -
> "fails to compile" doesn't tell me anything useful.
mod_disk_cache.c: In function `open_new_file':
mod_disk_cache.c:1304: `pdconf' undeclared (first use in this function)
mod_disk_cache.c:1304: (Each undeclared identifier is reported only once
mod_disk_cache.c:1304: for each function it appears in.)
--
<Ma...@Fujitsu-Siemens.com> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-48332 | 81730 Munich, Germany
Re: [PATCH] mod_disk_cache fails to compile [Was: svn commit:
r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c
modules/cache/mod_cache.h modules/cache/mod_disk_cache.c
modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c]
Posted by Graham Leggett <mi...@sharp.fm>.
On Thu, November 2, 2006 12:34 pm, Martin Kraemer wrote:
> Still, since 2 days, again mod_disk_cache fails to compile on
> platforms with sendfile (e.g., FreeBSD).
Is r468409 present in your tree?
Unfortunately I don't have a FreeBSD box, and so cannot reproduce the
problem. If you can send more details, I can get to the bottom of it -
"fails to compile" doesn't tell me anything useful.
Regards,
Graham
--
Index: modules/cache/mod_disk_cache.c
===================================================================
--- modules/cache/mod_disk_cache.c (revision 468408)
+++ modules/cache/mod_disk_cache.c (revision 468409)
@@ -720,6 +720,10 @@
apr_time_t starttime = apr_time_now();
int flags;
apr_status_t rc;
+#if APR_HAS_SENDFILE
+ core_dir_config *pdconf = ap_get_module_config(r->per_dir_config,
+ &core_module);
+#endif
flags = APR_READ|APR_BINARY|APR_BUFFERED;
#if APR_HAS_SENDFILE