httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_include.c mod_log_config.c mod_negotiation.c
Date Mon, 20 Dec 1999 19:56:12 GMT

> >   --- httpd.h	1999/12/08 00:14:03	1.14
> >   +++ httpd.h	1999/12/20 16:38:32	1.15
> >   @@ -71,6 +71,7 @@
> >    #include "ap_config.h"
> >    #include "apr_general.h"
> >    #include "apr_lib.h"
> >   +#include "apr_time.h"
> >    #include "buff.h"
> >    #include "ap.h"
> I thought you had said that the "proper procedure" was to just include
> "apr.h", but here you include several different headers.
> What is "proper"?

Never said we should just be including apr.h.  apr.h doesn't include ANY
other header files, it just gives us access to all of the APR feature
macros that are namespace protected.

As far as including one header file goes, inside of APR it was decided to
include the os specific header file, and let that header file include all
of the system specific stuff.  This kept us from doing the following:

In apr/file_io/unix/open.c

#include <stdio.h>
#include <sys/types.h>

in apr/file_io/unix/filedup.c

#include <stdio.h>
#include <sys/types.h>

and so on for the rest of the files in file_io/unix.

I would really like to stress that APR and Apache are two DIFFERENT
projects in my mind.  What I do for one project doesn't always make sense
for the other project.

In APR, for each sub-library, there is a small header file for a
particular platform, it is much easier to just include that one header
file in each C file.  In Apache, we have multiple header files that need
to be included in each C file, and I would much rather make it easy to
find functions, rather than chasing through header files to find all the
rest of the headers that have been included.


Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>

View raw message