[Freeciv-Dev] Re: (PR#3579) When stdarg.h should be included?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] Re: (PR#3579) When stdarg.h should be included? |
From: |
"Davide Pagnin" <nightmare@xxxxxxxxxx> |
Date: |
Sat, 29 Mar 2003 10:10:20 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
On Sat, 2003-03-29 at 12:22, Raimar Falke wrote:
> On Thu, Mar 27, 2003 at 01:13:54PM -0800, Davide Pagnin wrote:
> > On Mon, 2003-03-24 at 01:41, Jason Short wrote:
> > > [pagnin - Sun Mar 2 12:20:12 2003]:
> > >
> > > > AFAIK, stdarg.h is part of ANSI C standard, and should be included when
> > > > variable argument lists relevant macros are used.
> > >
> > > ...
> > >
> > > > If there are no objection, I will produce a patch that will implement
> > > > solution 2.
> > >
> > > Do you have a patch?
> > >
> > > jason
> > >
> >
> > I've prepared the patch, which is attached.
> >
> > I've tried it with Linux Redhat 7.3 - xaw, gtk1 and
> > on Tru64 Unix alpha xaw e gtk1 (with native Compaq cc)
> >
> > Seems to work without warnings.
> >
> > Perhaps some more tests with not common OS / arch can be useful.
>
> The important question is still not answered: what is causing this?
> >From IRC:
>
> Feb 26 18:42:26 <Nightmare> instead of loading stdarg from gcc include
> directory
> Feb 26 18:42:42 <Nightmare> I'm unsure if this is a shortcomings of gcc
> or Tru64
> Feb 26 18:42:50 <Nightmare> but the problem is there
> Feb 26 18:43:03 <Nightmare> my solution is to apply Codestyle suggestion
> Feb 26 18:43:11 <Nightmare> and put stdarg before stdio
> Feb 26 18:43:18 <Nightmare> wherever this is needed
> Feb 26 18:43:43 <Nightmare> there is even a file that needs stdarg and
> don't include it
> Feb 26 18:44:08 <Nightmare> btw, I'm unsure of what the standards say
> about this
> Feb 26 18:44:18 <Nightmare> which file should do the work and how
> Feb 26 18:44:35 <McHawk> it should be indepenet in which order you
> include the files
> Feb 26 18:44:53 <McHawk> I would really like to know if this is a
> general problem of gcc 3.2.2
> Feb 26 18:45:04 <McHawk> or a general problem of gcc 3.2.2 on alpha
> Feb 26 18:45:14 <McHawk> or a problem with your installation
> Feb 26 18:45:34 <Nightmare> I think that gcc 3.2.2 have shortcomings on
> include paths behavior
> Feb 26 18:45:56 <Nightmare> and Tru64 Unix has also problem with stdarg.h
> and va_list
> Feb 26 18:46:12 <Nightmare> so the two problems joined create the whole
> problem
>
> So I'm against applying such a patch without knowledge what is causing
> this.
I've discovered, thanks to this problem with freeciv, that my
installation of gcc 3.2.2 was incomplete (lack of some system header in
the gcc include directory), those missing files were causing the
problems, reported in the speech above.
At the moment, Freeciv is compiling correctly in my two development
tree, (linux and Tru64 Unix) both with the patch I've proposed and also
without it (but, as discussed, some more order is needed to assure that
include dependencies are achieved in the wrong way)
>
> I have however fixed another problem which was also mentioned: the
> random including of system header files. The attached patch fixes
> this. I will apply it in 24h.
No. I need the time to look to your patch, and I need more than 24 hour.
>
> Raimar
Davide
|
|