mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 10:43:02 +00:00
* lib/alloca.c: Update, from fileutils.
This commit is contained in:
@@ -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>
|
2001-11-23 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
|
* lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
|
||||||
@@ -15,7 +19,6 @@
|
|||||||
* src/closure.c (itemsetsize): Likewise.
|
* src/closure.c (itemsetsize): Likewise.
|
||||||
* src/reader.c (symbol_list_new): Static.
|
* src/reader.c (symbol_list_new): Static.
|
||||||
|
|
||||||
|
|
||||||
2001-11-23 Akim Demaille <akim@epita.fr>
|
2001-11-23 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
Attaching lineno to buckets is stupid, since only one copy of each
|
Attaching lineno to buckets is stupid, since only one copy of each
|
||||||
|
|||||||
10
lib/alloca.c
10
lib/alloca.c
@@ -25,10 +25,10 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
#if HAVE_STRING_H
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_STDLIB_H
|
#if HAVE_STDLIB_H
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -83,11 +83,12 @@ typedef char *pointer;
|
|||||||
hand, the utilities in lib-src need alloca to call malloc; some of
|
hand, the utilities in lib-src need alloca to call malloc; some of
|
||||||
them are very simple, and don't have an xmalloc routine.
|
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. */
|
Callers below should use malloc. */
|
||||||
|
|
||||||
# ifndef emacs
|
# ifndef emacs
|
||||||
|
# undef malloc
|
||||||
# define malloc xmalloc
|
# define malloc xmalloc
|
||||||
# endif
|
# endif
|
||||||
extern pointer malloc ();
|
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. */
|
implementations of C, for example under Gould's UTX/32. */
|
||||||
|
|
||||||
pointer
|
pointer
|
||||||
alloca (size)
|
alloca (size_t size)
|
||||||
unsigned size;
|
|
||||||
{
|
{
|
||||||
auto char probe; /* Probes stack depth: */
|
auto char probe; /* Probes stack depth: */
|
||||||
register char *depth = ADDRESS_FUNCTION (probe);
|
register char *depth = ADDRESS_FUNCTION (probe);
|
||||||
|
|||||||
Reference in New Issue
Block a user