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
