httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: APR leaking HAVE_* macros
Date Tue, 30 Nov 1999 15:16:58 GMT

I spoke too soon last night.

> Why is this #include necessary? I would think that APR's include files
> should have no dependancies on the particular machine, and those
> macros pollute the namespace of the application.

Those include directives are necessary, because they tell APR about the
machine we are on.  I can't define ap_int*_t unless I know how big each
integer type is on the current machine.  Those need to be defined
somewhere, and that definition needs to be available to ALL of APR.  The
same thing can be said for the other times we are including apr_config.h.

> In fact, why are any of the system includes (i.e. sys/types.h)
> necessary in the user-visible include files? I would think they should
> confined to APR-internal .c or .h files.

Nope.  There are times and places where we do need system specific header
files inside APR's public headers.  We should always be protecting those
with #if HAVE_FOO_H.  

I have another questions, why are you trying to determine the same things
that APR has already figured out for you?  APR can already tell you if the
current system has a particular header file, and Apache shouldn't need too
many platform specific headers anymore anyway.

I think having APR and Apache both doing the same tests is a bit
ridiculus.  If Apache needs to know about what the system has, that
information can be found in APR.

I will try to remove as much "leaking" as I can, but I can almost 
garauntee that there will always be some leaking from APR.


Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message