diff options
-rw-r--r-- | flexdef.h | 3 | ||||
-rw-r--r-- | misc.c | 15 |
2 files changed, 18 insertions, 0 deletions
@@ -767,6 +767,9 @@ extern void skelout PROTO((void)); /* Output a yy_trans_info structure. */ extern void transition_struct_out PROTO((int, int)); +/* Only needed when using certain broken versions of bison to build parse.c. */ +extern void *yy_flex_xmalloc PROTO(( int )); + /* Set a region of memory to 0. */ extern void zero_out PROTO((char *, int)); @@ -740,6 +740,21 @@ int element_v, element_n; } +/* The following is only needed when building flex's parser using certain + * broken versions of bison. + */ +void *yy_flex_xmalloc( size ) +int size; + { + void *result = yy_flex_alloc( size ); + + if ( ! result ) + flexfatal( "memory allocation failed in yy_flex_xmalloc()" ); + + return result; + } + + /* zero_out - set a region of memory to 0 * * Sets region_ptr[0] through region_ptr[size_in_bytes - 1] to zero. |