Let --trace have arguments.

* src/getargs.h (enum trace_e): New.
* src/getargs.c (trace_args, trace_types, trace_argmatch): New.
(long_options, short_options): --trace/-T takes an optional
argument.
Change all the uses of trace_flag to reflect the new flags.
* tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
Strengthen `stage' portability.
* m4/stage.m4 (BISON_PREREQ_STAGE): New.
* configure.in: Use it.
Don't check for malloc.h and sys/times.h.
* src/system.h: Include them when appropriate.
* src/main.c (stage): Compile only when mallinfo, struct mallinfo,
times and struct tms are available.
This commit is contained in:
Akim Demaille
2002-07-31 19:49:52 +00:00
parent 2ed0e35f86
commit 273a74fa89
20 changed files with 338 additions and 55 deletions

View File

@@ -104,6 +104,18 @@ char *alloca ();
/* From xstrndup.c. */
char *xstrndup PARAMS ((const char *s, size_t n));
/* Finding `mallinfo' where available. */
#if HAVE_MALLOC_H
# include <malloc.h>
#endif
/* Find `times' where available. */
#if HAVE_SYS_TIMES_H
# include <sys/times.h>
#endif
/*---------------------.
| Missing prototypes. |
`---------------------*/