bug-gnulib
[Top][All Lists]
Advanced

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

Re: Gnulib's alloca.h used even when there is a system header


From: Bruno Haible
Subject: Re: Gnulib's alloca.h used even when there is a system header
Date: Mon, 18 Feb 2019 00:32:41 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

> Eli Zaretskii wrote:
> >   #ifndef alloca
> >   # ifdef __GNUC__
> > -#  define alloca __builtin_alloca
> > +#  if HAVE_ALLOCA_H
> > +#   include_next <alloca.h>
> > +#  else
> > +#   define alloca __builtin_alloca
> > +#  endif
> >   # elif defined _AIX
> 
> Why do the 'include_next' only for GCC? Why not do it for all compilers?

'include_next' needs absolute file name for some compilers, and our mechanics
for determining the absolute file name of a .h file does not work when the
.h file defines only macros. See m4/include_next.m4:
  # Note: This macro assumes that the header file is not empty after
  # preprocessing, i.e. it does not only define preprocessor macros but also
  # provides some type/enum definitions or function/variable declarations.

alloca.h unfortunately may be in this category.

> Also, what platforms don't work with the current Gnulib alloca module, and 
> why?

Yes, Eli, I'd like to know this as well: what is the proposed change doing
to fix/improve?

Bruno




reply via email to

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