]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
alloca-opt: Fix build error on AIX (regression from 2020-07-05).
authorBruno Haible <bruno@clisp.org>
Mon, 6 Jul 2020 19:31:54 +0000 (21:31 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 6 Jul 2020 19:36:52 +0000 (21:36 +0200)
* gnulib-local/lib/alloca.in.h: Don't include <alloca.h>, since it would be a
recursive include of the same file.

gnulib-local/lib/alloca.in.h

index 56b9d9e7718f4be2c2fc362e875eec147db80650..1b5fb9d229834d97de3fbfdf7ddb4fc8bc31f031 100644 (file)
 # ifdef __GNUC__
 #  define alloca __builtin_alloca
 # else
-#  ifdef _MSC_VER
+#  if defined _AIX
+ #pragma alloca
+    /* Alternatively: #define alloca __alloca, works as well.  */
+#  elif defined _MSC_VER
 #   include <malloc.h>
 #   define alloca _alloca
 #  elif defined __DECC && defined __VMS
@@ -62,25 +65,17 @@ void *_alloca (unsigned short);
 #  elif defined __MVS__
 #   include <stdlib.h>
 #  else
-#   if HAVE_ALLOCA_H
-#    include <alloca.h>
-#   else
-#    ifdef _AIX
- #pragma alloca
-#    else
-#     ifdef __hpux /* This section must match that of bison generated files. */
-#      ifdef __cplusplus
+#   ifdef __hpux /* This section must match that of bison generated files. */
+#    ifdef __cplusplus
 extern "C" void *alloca (unsigned int);
-#      else /* not __cplusplus */
+#    else /* not __cplusplus */
 extern void *alloca ();
-#      endif /* not __cplusplus */
-#     else /* not __hpux */
-#      ifndef alloca
+#    endif /* not __cplusplus */
+#   else /* not __hpux */
+#    ifndef alloca
 extern char *alloca ();
-#      endif
-#     endif /* __hpux */
 #    endif
-#   endif
+#   endif /* __hpux */
 #  endif
 # endif
 #endif