bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 3.81.90 prerelease available


From: Paul Smith
Subject: Re: GNU make 3.81.90 prerelease available
Date: Mon, 12 Jul 2010 09:19:42 -0400

On Mon, 2010-07-12 at 10:20 +0300, Eli Zaretskii wrote:
> > This change:
> > 
> >     2009-10-03  Paul Smith  <address@hidden>
> > 
> >         * make.h: Include <alloca.h> even on systems where __GNUC__ is
> >         defined.  Not sure why it was done the other way.
> >         Requested by David Boyce <address@hidden>.
> > 
> > Causes multiple warnings on systems that use GCC, but do not use glibc
> > (glibc has the alloca.h header, which makes it skip all this fragment):
> > 
> >  on Windows:
> >     In file included from arscan.c:19:
> >     make.h:39: warning: conflicting types for built-in function 'alloca'
> > 
> >  on DOS:
> >     In file included from make.h:202,
> >                  from ar.c:19:
> >     d:/usr/djgpp/include/stdlib.h:85: error: conflicting types for 'alloca'
> >     make.h:39: error: previous declaration of 'alloca' was here
> > 
> > I think that having a declaration for `alloca' in make.h is a bad
> > idea, because there's no way we can guess the right way of declaring
> > it.
> > 
> > What was the motivation for David's request?

I poked around but I can't remember and I don't have any email related
to it.

> > I suggest the following patch, which should DTRT on GNU/Linux and on
> > other platforms alike:
> > 
> > 2010-07-09  Eli Zaretskii  <address@hidden>
> > 
> >     * make.h (alloca) [!__GNUC__]: Don't define prototype.
> > 
> > --- make.h~0        2010-07-01 11:43:31.000000000 +0300
> > +++ make.h  2010-07-09 12:02:02.034125000 +0300
> > @@ -35,8 +35,10 @@
> >  # ifdef _AIX
> >   #pragma alloca
> >  # else
> > -#  ifndef alloca /* predefined by HP cc +Olibcalls */
> > +#  ifndef __GNUC__
> > +#   ifndef alloca /* predefined by HP cc +Olibcalls */
> >  char *alloca ();
> > +#   endif
> >  #  endif
> >  # endif
> >  #endif

To be honest I'm a little lost as to what the problem is or why this
fixes it, but if it works I'm OK with it.

Is this the right return type though?  Wouldn't it be void*?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]