[Freeciv-Dev] Re: (PR#2306) config.h for all files
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Nov 13, 2002 at 12:45:54PM -0800, Jason Short via RT wrote:
> Raimar Falke via RT wrote:
> > On Mon, Nov 11, 2002 at 12:31:42PM -0800, Jason Short via RT wrote:
> >
> >>Attached is a patch to bring #include <config.h> to every source file.
> >>
> >>In addition to the arguments below, there are some practical reasons why
> >>this is needed. Currently config.h #defines 'const', which is used all
> >>over the place. If it changes the definition, right now this will
> >>result in changes in only some places, lots of warnings, and (if the
> >>definition is necessary) compilation failure.
> >
> >
> > Mhhh. Can you explain me this:
> >
> > --- common/netintf.h 2002/02/14 15:17:16 1.4
> > +++ common/netintf.h 2002/11/13 20:01:58
> > @@ -18,10 +18,6 @@
> > Common network interface.
> > ***********************************************************************/
> >
> > -#ifdef HAVE_CONFIG_H
> > -#include <config.h>
> > -#endif
> > -
> > #ifdef HAVE_UNISTD_H
> > #include <unistd.h>
> > #endif
>
> The idea is that config.h is included in every .c file, and is therefore
> not needed in .h files.
>
> It could be done as you say: include it in every file that "needs" it.
> But note that this is harder to maintain, since you have to check this
> periodically and/or remember to change it when the files change.
> And it's not likely to net you much, since with all the .h files
> that need config.h most or all of the .c files will end up getting
> it anyway.
But you _removed_ it from a .h file which clearly needs it!!
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"> WHY?! Isn't it better to put $(shell cat cscope.files) on the list of
I only have a yellow belt in makefile kungfu. These fancy gnu make things
are relatively new to some of us..."
-- Mark Frazer to Vassilii Khachaturov in linux-kernel
- [Freeciv-Dev] Use of config.h, Jason Dorje Short, 2002/11/01
- [Freeciv-Dev] Re: Use of config.h, Per I. Mathisen, 2002/11/02
- Message not available
- [Freeciv-Dev] (PR#2306) config.h for all files, Jason Short via RT, 2002/11/11
- Message not available
- [Freeciv-Dev] Re: (PR#2306) config.h for all files, Raimar Falke via RT, 2002/11/13
- Message not available
- [Freeciv-Dev] Re: (PR#2306) config.h for all files, Jason Short via RT, 2002/11/13
- Message not available
- [Freeciv-Dev] Re: (PR#2306) config.h for all files, Jason Short via RT, 2002/11/13
- [Freeciv-Dev] Re: (PR#2306) config.h for all files, Raimar Falke, 2002/11/13
- Message not available
- [Freeciv-Dev] Re: (PR#2306) config.h for all files, Raimar Falke via RT, 2002/11/13
- Message not available
- [Freeciv-Dev] Re: (PR#2306) config.h for all files, Raimar Falke via RT, 2002/11/13
- [Freeciv-Dev] Re: (PR#2306) config.h for all files,
Raimar Falke <=
|
|