Sync with the version from emacs-20.5.
[gnulib.git] / lib / alloca.c
index b102eb1..55a8067 100644 (file)
 # include <config.h>
 #endif
 
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
 #ifdef emacs
 # include "blockinput.h"
 #endif
@@ -210,6 +217,9 @@ alloca (unsigned size)
     register pointer new = malloc (sizeof (header) + size);
     /* Address of header.  */
 
+    if (new == 0)
+      abort();
+
     ((header *) new)->h.next = last_alloca_header;
     ((header *) new)->h.deep = depth;