* etags.c: Replace the CPP tangle for alloca with the one from the
authorJim Blandy <jimb@redhat.com>
Fri, 28 May 1993 08:28:20 +0000 (08:28 +0000)
committerJim Blandy <jimb@redhat.com>
Fri, 28 May 1993 08:28:20 +0000 (08:28 +0000)
autoconf documentation, since that's working elsewhere.

lib-src/etags.c

index dd1153e..a829fdc 100644 (file)
@@ -35,15 +35,22 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "getopt.h"
 
-#ifdef __GNUC__
-#define        alloca  __builtin_alloca
-#else
-#ifdef sparc
-#include <alloca.h>
-#else
-extern char *alloca ();
-#endif
+/* AIX requires this to be the first thing in the file. */
+#ifdef __GNUC__
+#ifndef alloca
+#define alloca __builtin_alloca
 #endif
+#else /* not __GNUC__ */
+#if HAVE_ALLOCA_H
+#include <alloca.h>
+#else /* not HAVE_ALLOCA_H */
+#ifdef _AIX
+ #pragma alloca
+#else /* not _AIX */
+char *alloca ();
+#endif /* not _AIX */
+#endif /* not HAVE_ALLOCA_H */
+#endif /* not __GNUC__ */
 
 extern char *malloc (), *realloc ();
 extern char *getenv ();