> From: Joachim Schmitz [mailto:j...@schmitz-digital.de] > Sent: Tuesday, July 03, 2012 11:54 AM > To: 'Paul Eggert' > Cc: 'bug-gnulib@gnu.org' > Subject: RE: alloca in HP NonStop > > > From: Paul Eggert [mailto:egg...@cs.ucla.edu] > > Sent: Tuesday, July 03, 2012 10:45 AM > > To: Joachim Schmitz > > Cc: bug-gnulib@gnu.org > > Subject: Re: alloca in HP NonStop > > > > On 07/02/2012 11:40 PM, Joachim Schmitz wrote: > > > I' don't quite understand, why not the entire alloca.in.h is bracketed by > > > this. > > > At least now that it is used in 2 places? > > > > We can't bracket the entire file, since (as far as I know) it's not > > safe to put #include inside 'extern "C" { ... }'. > > How about the following patch instead? > > It tries to address your other comments. > > > > diff --git a/ChangeLog b/ChangeLog > > index e7f7883..9dda6c7 100644 > > --- a/ChangeLog > > +++ b/ChangeLog > > @@ -1,3 +1,10 @@ > > +2012-07-03 Paul Eggert <egg...@cs.ucla.edu> > > + > > + alloca: add support for HP NonStop TNS/E native > > + * lib/alloca.in.h (alloca): Support the new host. > > + From a suggestion by Joachim Schmitz in > > + <http://lists.gnu.org/archive/html/bug-gnulib/2012- > > 06/msg00355.html>. > > + > > 2012-07-02 Pádraig Brady <p...@draigbrady.com> > > > > fsusage: remove code not needed on non GNU/Linux systems. > > diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 99be048..ed8aad3 > > 100644 > > --- a/lib/alloca.in.h > > +++ b/lib/alloca.in.h > > @@ -45,11 +45,18 @@ > > # elif defined __DECC && defined __VMS # define alloca __ALLOCA # > > else -# include <stddef.h> > > +# if defined __TANDEM && defined _TNS_E_TARGET > > +# pragma intrinsic (_alloca) > > +# define alloca _alloca > > +typedef unsigned short _GL_ALLOCA_SIZE_T; # else > > +# include <stddef.h> > > +typedef size_t _GL_ALLOCA_SIZE_T; > > +# endif > > # ifdef __cplusplus > > extern "C" > > # endif > > -void *alloca (size_t); > > +void *alloca (_GL_ALLOCA_SIZE_T); > > # endif > > #endif > > Doesn't work, we need the prototype for _alloca() too.
Or rather: we need that prototype before the pragma Bye, Jojo