From: Jim Meyering Date: Sun, 16 Jan 2000 12:35:49 +0000 (+0000) Subject: Sync with the version from emacs-20.5. X-Git-Tag: FILEUTILS-4_0p~186 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fae922babd5ebd5e0725403b8a82426f0ca2539;p=thirdparty%2Fcoreutils.git Sync with the version from emacs-20.5. (): Include if HAVE_STRING_H. (): Include if HAVE_STDLIB_H. (alloca): Abort if malloc fails. --- diff --git a/lib/alloca.c b/lib/alloca.c index b102eb11bf..55a80677f7 100644 --- a/lib/alloca.c +++ b/lib/alloca.c @@ -25,6 +25,13 @@ # include #endif +#if HAVE_STRING_H +# include +#endif +#if HAVE_STDLIB_H +# include +#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;