* lib/alloca.c: Update, from fileutils.

This commit is contained in:
Akim Demaille
2001-11-23 14:55:36 +00:00
parent 6e303f08d6
commit 92b69b7f09
2 changed files with 70 additions and 66 deletions

View File

@@ -1,3 +1,7 @@
2001-11-23 Akim Demaille <akim@epita.fr>
* lib/alloca.c: Update, from fileutils.
2001-11-23 Akim Demaille <akim@epita.fr>
* lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.

View File

@@ -25,10 +25,10 @@
# include <config.h>
#endif
#ifdef HAVE_STRING_H
#if HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -83,11 +83,12 @@ typedef char *pointer;
hand, the utilities in lib-src need alloca to call malloc; some of
them are very simple, and don't have an xmalloc routine.
Non-Emacs programs expect this to call use xmalloc.
Non-Emacs programs expect this to call xmalloc.
Callers below should use malloc. */
# ifndef emacs
# undef malloc
# define malloc xmalloc
# endif
extern pointer malloc ();
@@ -168,8 +169,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
implementations of C, for example under Gould's UTX/32. */
pointer
alloca (size)
unsigned size;
alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);