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.

Don't define _BUILTIN (couldn't see why this mattered).

Omit most comments (not really needed here; it's pretty
explanatory).

Use GNU style (space before paren) in pragma.

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  <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..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 */
+#  ifdef  __cplusplus
+    extern "C"
+#  endif
+   void *_alloca (unsigned short);
+#  pragma intrinsic (_alloca)
+#  define alloca _alloca
 # elif defined __DECC && defined __VMS
 #  define alloca __ALLOCA
 # else

Reply via email to