[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: alloca in HP NonStop
From: |
Joachim Schmitz |
Subject: |
RE: alloca in HP NonStop |
Date: |
Tue, 3 Jul 2012 08:40:28 +0200 |
> From: Paul Eggert [mailto:address@hidden
> Sent: Tuesday, July 03, 2012 2:38 AM
> To: Joachim Schmitz
> Cc: address@hidden
> Subject: Re: alloca in HP NonStop
>
> On 06/28/2012 09:41 AM, Joachim Schmitz wrote:
> > Or drop it an just take the else branch.
>
> Yes, that sounds simpler. Also, how about the following ideas for
> simplification:
>
> Don't bother checking __TANDEM; _TNS_E_TARGET should suffice.
> This fixes what appears to be a bug on older Tandem systems.
Well, rather a missfeature of the older platforms and their compilers to not
have that builtin _alloca
Our code always check for __TANDEM && _TNS_E_TARGET, I guess that is for a good
reason, so I'd rather keep that.
Also is is similar to
# elif defined __DECC && defined __VMS
I had my code after that, you placed it before that, any special reason?
> Don't define _BUILTIN (couldn't see why this mattered).
Yes, I had that to prevent <builtin.h> multiple inclusion, but come to think of
it a check for #ifdef alloca (in our code, it is in GNUlib already) should help
too.
> Omit most comments (not really needed here; it's pretty explanatory).
Sure, I just had them in to explain why I did what.
> Use GNU style (space before paren) in pragma.
Sure
> In short, how about the following patch instead?
>
> ---
> ChangeLog | 7 +++++++
> lib/alloca.in.h | 7 +++++++
> 2 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index e7f7883..979d18a 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2012-07-02 Paul Eggert <address@hidden>
> +
> + 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 <address@hidden>
>
> fsusage: remove code not needed on non GNU/Linux systems.
> diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 99be048..0f5ce34 100644
> --- a/lib/alloca.in.h
> +++ b/lib/alloca.in.h
> @@ -42,6 +42,13 @@
> # elif defined _MSC_VER
> # include <malloc.h>
> # define alloca _alloca
> +# elif defined _TNS_E_TARGET /* HP NonStop TNS/E native */
Drop the 'native', it is superfluous, on TNS/E we don't have non-native in this
context
As mentioned above I'd rather add a check for __TANDEM
> +# ifdef __cplusplus
> + extern "C"
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?
> +# endif
> + void *_alloca (unsigned short);
> +# pragma intrinsic (_alloca)
> +# define alloca _alloca
> # elif defined __DECC && defined __VMS
> # define alloca __ALLOCA
As the DEC/VMS part seems much simpler, I'd move it above the NonStop part?
> # else
Bye, Jojo
- Re: alloca in HP NonStop, Paul Eggert, 2012/07/02
- RE: alloca in HP NonStop,
Joachim Schmitz <=
- Re: alloca in HP NonStop, Paul Eggert, 2012/07/03
- RE: alloca in HP NonStop, Joachim Schmitz, 2012/07/03
- RE: alloca in HP NonStop, Joachim Schmitz, 2012/07/03
- Re: alloca in HP NonStop, Paul Eggert, 2012/07/03
- RE: alloca in HP NonStop, Joachim Schmitz, 2012/07/04
- Re: alloca in HP NonStop, Paul Eggert, 2012/07/04
- RE: alloca in HP NonStop, Joachim Schmitz, 2012/07/04