You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ben Collins-Sussman <su...@newton.ch.collab.net> on 2001/02/26 17:22:39 UTC

monday morning breakage

I just removed my apr/ subdir and checked it out fresh this morning.
I'm getting this compile error on my FreeBSD 4.2 system:

gmake[4]: Entering directory `/usr/home/sussman/projects/subversion/apr/network_io/unix'
/bin/sh /usr/home/sussman/projects/subversion/apr/libtool --mode=compile --silent gcc -g -O2 -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations  -I../../include -I../../include/arch/unix -I../../include/arch/unix -c poll.c && touch poll.lo
In file included from poll.c:55:
../../include/arch/unix/networkio.h:108: syntax error


Here's line 108-110 of networkio.h:

#if APR_HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif

And, of course, my system has no <sys/sendfile.h>.  :)

I know that there's been a recent thread on this list about
sendfile.h, but I have to admit that I didn't read it. (*blush*)  Can
anyone tell me what the problem is?  I assume that that
APR_HAVE_SYS_SENDFILE_H is being defined when it shouldn't be.


Re: monday morning breakage

Posted by rb...@covalent.net.
Fix is on the way.  The problem is that we never subst into the apr.h
file, so APR_HAS_SENDFILE_H is defined to be @has_sendfile@ or something
like it.

Ryan

On 26 Feb 2001, Ben Collins-Sussman wrote:

>
> I just removed my apr/ subdir and checked it out fresh this morning.
> I'm getting this compile error on my FreeBSD 4.2 system:
>
> gmake[4]: Entering directory `/usr/home/sussman/projects/subversion/apr/network_io/unix'
> /bin/sh /usr/home/sussman/projects/subversion/apr/libtool --mode=compile --silent gcc -g -O2 -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations  -I../../include -I../../include/arch/unix -I../../include/arch/unix -c poll.c && touch poll.lo
> In file included from poll.c:55:
> ../../include/arch/unix/networkio.h:108: syntax error
>
>
> Here's line 108-110 of networkio.h:
>
> #if APR_HAVE_SYS_SENDFILE_H
> #include <sys/sendfile.h>
> #endif
>
> And, of course, my system has no <sys/sendfile.h>.  :)
>
> I know that there's been a recent thread on this list about
> sendfile.h, but I have to admit that I didn't read it. (*blush*)  Can
> anyone tell me what the problem is?  I assume that that
> APR_HAVE_SYS_SENDFILE_H is being defined when it shouldn't be.
>
>


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: monday morning breakage

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Cliff Woolley wrote:
> 
> On 26 Feb 2001, Ben Collins-Sussman wrote:
> 
> > #if APR_HAVE_SYS_SENDFILE_H
> > #include <sys/sendfile.h>
> > #endif
> >
> > And, of course, my system has no <sys/sendfile.h>.  :)
> >
> > I know that there's been a recent thread on this list about
> > sendfile.h, but I have to admit that I didn't read it. (*blush*)  Can
> > anyone tell me what the problem is?  I assume that that
> > APR_HAVE_SYS_SENDFILE_H is being defined when it shouldn't be.
> 
> More likely, APR_HAVE_SYS_SENDFILE_H is *not* defined when it *should*
> be.  The APR_HAVE_* macros are always defined (hence the #if rather than
> #ifdef), with a value of 0 or 1.  If the macro is not defined at all, then
> you get a syntax error in the preprocessor (#if SOME_UNDEFINED_MACRO ==
> syntax error).

On A Solaris machine I have the following in include/apr.h:
+++
#define APR_HAVE_STRINGS_H   
1                                                 
#define APR_HAVE_SYS_SENDFILE_H
@sys_sendfileh@                                 
#define APR_HAVE_SYS_SIGNAL_H 1
+++                            

Looks strange, doesn't it?                  


> 
> --Cliff

Re: monday morning breakage

Posted by Cliff Woolley <cl...@yahoo.com>.
On 26 Feb 2001, Ben Collins-Sussman wrote:

> #if APR_HAVE_SYS_SENDFILE_H
> #include <sys/sendfile.h>
> #endif
> 
> And, of course, my system has no <sys/sendfile.h>.  :)
> 
> I know that there's been a recent thread on this list about
> sendfile.h, but I have to admit that I didn't read it. (*blush*)  Can
> anyone tell me what the problem is?  I assume that that
> APR_HAVE_SYS_SENDFILE_H is being defined when it shouldn't be.

More likely, APR_HAVE_SYS_SENDFILE_H is *not* defined when it *should*
be.  The APR_HAVE_* macros are always defined (hence the #if rather than
#ifdef), with a value of 0 or 1.  If the macro is not defined at all, then
you get a syntax error in the preprocessor (#if SOME_UNDEFINED_MACRO ==
syntax error).

--Cliff