* m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit 2e16f59fdc15cace7c60960035f0d8fecd6232af)
* src/m4.c (main): Reorder installation of signal handlers, so we
don't trash a SIGBUS handler installed by c-stack. Also provide a
SIGSEGV fallback, for platforms where c-stack combined with
libsigsegv uses something lower level than SIGSEGV.
Signed-off-by: Eric Blake <ebb9@byu.net>
* checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
at least OpenBSD's sh died early from an undersized stack limit.
Signed-off-by: Eric Blake <ebb9@byu.net>
* examples/stackovf.sh: Delete, now that checks has better
version.
* examples/Makefile.am (EXTRA_DIST): Don't distribute it.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/Makefile.am (m4_LDADD): Use libsigsegv when available and
necessary, via LIBCSTACK.
* src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
handlers.
* checks/stackovf.test: New file.
* checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
(DOC_CHECKS): ...generated documentation tests into new macro.
(DISTFILES): Distribute stackovf.test.
* checks/check-them: Special-case stackovf.test.
* NEWS: Enhance the NEWS item for -L improvements.
* README: Mention the optional dependency.
* HACKING: Mention maintenance burden added by libsigsegv.
Signed-off-by: Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Import strsignal module.
* src/m4.c (main): Register more handlers, and prefer sigaction
when available.
(SIGBUS, NSIG): Provide fallback when lacking.
(signal_message): New variable, to keep async-safety.
(fault_handler): Display faulting signal description.
* configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
optimize for single-threaded operation.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/m4.h (EXIT_INTERNAL_ERROR): New macro.
* configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
* src/m4.c (fault_handler): New method.
(program_error_message): New variable, for async-safety.
(main): Print bug reporting address rather than dump core on any
failed assertions or detected non-stack-overflow faults.
Signed-off-by: Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Using frozen files): Test the fix from
2007-11-22.
* THANKS: Update.
Reported by Jean-Charles Longuet.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
immediately on overflow.
Reported by Jim Meyering.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/m4.h (struct call_info): New struct.
(trace_prepre, trace_pre, trace_post, push_string_finish)
(input_print, call_macro): Alter signatures.
(arg_info): New prototype.
(input_block): Delete...
* src/input.c (input_block): ...and make typedef local again.
(push_string_init): Initialize length.
(push_string_finish, input_print): Change signature, so that
printing can be done before finalization.
* src/macro.c (struct macro_arguments): Add info member.
(collect_arguments, make_argv_ref): Manage new field.
(expand_macro): Change call context management. Move tracing...
(call_macro): ...here, and remove redundant parameter.
(arg_info): New function.
* src/debug.c (trace_format): Delete unused modifiers.
(trace_header, trace_flush, trace_prepre, trace_pre, trace_post):
Change signatures for stacked trace messages, and for using call
context.
* src/builtin.c (m4_builtin, m4_indir): Update callers.
* src/m4.c (usage): Update debugmode flag summary.
* doc/m4.texinfo (Defn): Update examples to match new behavior.
(Trace): Mention new capability of indir.
(Debug Levels): Enhance text for 'c' and 'x', update examples.
(Incompatibilities): Mention risk of parsing trace output.
* examples/null.m4: Enhance test.
* examples/null.err: Update expected output.
* NEWS: Mention these changes.
Reported by Akim Demaille in the autoconf TODO file in 2000.
(cherry picked from commit ec804cba9ceeef7ca863d163eeae3fca669ccd16)
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/builtin.m4 (traceon): Only perform insertion if lookup
fails.
* doc/m4.texinfo (Trace): Test for the bug.
* NEWS: Document it.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/input.c (pop_input): Fix -di output on end of input.
* doc/m4.texinfo (Debug Levels): Test this behavior.
(Changeword, Location): Correct examples.
* checks/check-them (examples): Update to account for recommended
location for running tests.
* doc/m4.texinfo (Debug Levels): Test this behavior.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/m4.h (DEBUG_TRACE_VERBOSE): Make -dV verbose again.
* NEWS: Document this fix.
Test to come when merging stage 23 from branch argv_ref.
Signed-off-by: Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Diversions): Consume all of m4's output, in case
SIGPIPE is ignored.
* THANKS: Update.
Detected by Bob Proulx's buildbot.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/builtin.c (m4_ifelse): Avoid the name index.
(m4_format): s/format/expand_format, so local variables can be
named format.
* src/format.c (format): Rename...
(expand_format): ...to this, and avoid the name index.
* src/input.c (push_file): Avoid the name close.
* src/m4.h (expand_format): Adjust prototype.
* src/macro.c (arg_token, arg_type, arg_text, arg_empty, arg_len)
(arg_func, arg_print, make_argv_ref_token, make_argv_ref)
(push_arg, push_arg_quote): Avoid the name index.
* src/output.c (threshold_diversion_CB): Avoid the name div.
Signed-off-by: Eric Blake <ebb9@byu.net>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
2008-03-10 by testing it at 'make distcheck' time.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
system(3), no matter what other macros it pre-defined.
* doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
on OS/2.
* src/builtin.c (predefined_tab): Ensure all possible system
identifiers are defined, not just the first; the testsuite will
catch if multiple identifiers mistakenly made it through.
* examples/null.m4 (esyscmd): Don't rely on printf to generate NUL
byte.
* examples/null.out (esyscmd): Check for esyscmd success.
* THANKS: Update.
Reported by Elbert Pol.
Signed-off-by: Eric Blake <ebb9@byu.net>
* NEWS: Update to match release on branch-1.4.
* doc/m4.texinfo (History): Update release history.
(Format): Test for C99 hex-float parsing.
* src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
Signed-off-by: Eric Blake <ebb9@byu.net>
* maint.mk (alpha): Check for PREV_VERSION setting sooner, and
remove tag operation.
(version-check): Enhance this check.
(prev-tarball): Depend on version-check.
(web-manual): Fix VPATH usage.
(this-vc-tag): Delete, and mention need to run tag...
* HACKING: ...here, prior to make maintainer-distcheck.
Update the instructions to match this particular release process.
* Makefile.am (.version, announcement): Allow for VPATH build.
* cfg.mk (gnulib_dir): Likewise.
* doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
page.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit c07173b0a58b56c07633a28323d56451b98b7de5)
Conflicts:
* NEWS: Describe effect on autoconf 2.59 and earlier.
* doc/m4.texinfo (History): The next version will be 1.6, not
1.4.11.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Import gnumakefile module.
* GNUmakefile: Remove from version control; supplied by gnulib
instead.
* configure.ac (AC_CONFIG_LINKS): Let gnulib do this now.
* Makefile.am (distclean-local): Likewise.
(EXTRA_DIST): Likewise. Also handle renamed files.
* Makefile.cfg: Rename...
* cfg.mk: ...to this.
* Makefile.maint: Rename...
* maint.mk: ...to this.
(ME, makefile-check, m4-check): Use new macro instead of
hard-coded name.
* HACKING: Mention that maintainer rules should now work in VPATH
builds.
Signed-off-by: Eric Blake <ebb9@byu.net>
* checks/Makefile.in (program_transform_name): New macro.
(installcheck): Use it to transform name of m4 before testing.
* checks/check-them (m4): Add -m option, to allow testing m4 by a
different name.
Signed-off-by: Eric Blake <ebb9@byu.net>
* GNUmakefile (_created_version_file): Delete, now that VPATH
builds include GNUmakefile.
* configure.ac (AC_INIT): Base version on .tarball-version, not
.version.
Reported by Ralf Wildenhues, fix by Jim Meyering in coreutils.
Signed-off-by: Eric Blake <ebb9@byu.net>
* src/macro.c (make_argv_ref_token): Don't output expansion text
when making wrapper for builtin or indir.
* doc/m4.texinfo (Builtin): Test it.
* NEWS: Document the fix.
Reported by Andreas Schwab.
Signed-off-by: Eric Blake <ebb9@byu.net>