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

This commit is contained in:
Akim Demaille
2001-11-23 14:56:30 +00:00
parent 5b0d29bb52
commit c64a20f3dc
2 changed files with 70 additions and 67 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@.
@@ -15,7 +19,6 @@
* src/closure.c (itemsetsize): Likewise.
* src/reader.c (symbol_list_new): Static.
2001-11-23 Akim Demaille <akim@epita.fr>
Attaching lineno to buckets is stupid, since only one copy of each

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);