1 2018-03-08 Paul Eggert <eggert@cs.ucla.edu>
3 fflush: be more paranoid about libio.h change
4 Suggested by Eli Zaretskii in:
5 https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html
6 * lib/fbufmode.c (fbufmode):
7 * lib/fflush.c (clear_ungetc_buffer_preserving_position)
8 (disable_seek_optimization, rpl_fflush):
9 * lib/fpending.c (__fpending):
10 * lib/fpurge.c (fpurge):
11 * lib/freadable.c (freadable):
12 * lib/freadahead.c (freadahead):
13 * lib/freading.c (freading):
14 * lib/freadptr.c (freadptr):
15 * lib/freadseek.c (freadptrinc):
16 * lib/fseeko.c (fseeko):
17 * lib/fseterr.c (fseterr):
18 * lib/fwritable.c (fwritable):
19 * lib/fwriting.c (fwriting):
20 Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN.
22 2018-03-05 Paul Eggert <eggert@cs.ucla.edu>
24 fflush: adjust to glibc 2.28 libio.h removal
25 Problem reported by Daniel P. Berrangé in:
26 https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
27 * lib/fbufmode.c (fbufmode):
28 * lib/fflush.c (clear_ungetc_buffer_preserving_position)
29 (disable_seek_optimization, rpl_fflush):
30 * lib/fpending.c (__fpending):
31 * lib/fpurge.c (fpurge):
32 * lib/freadable.c (freadable):
33 * lib/freadahead.c (freadahead):
34 * lib/freading.c (freading):
35 * lib/freadptr.c (freadptr):
36 * lib/freadseek.c (freadptrinc):
37 * lib/fseeko.c (fseeko):
38 * lib/fseterr.c (fseterr):
39 * lib/fwritable.c (fwritable):
40 * lib/fwriting.c (fwriting):
41 Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
42 * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
43 Define if not already defined.
45 2013-09-15 Gary V. Vaughan <gary@gnu.org>
47 configury: specify subdir-objects for future automake releases.
48 Latest automake warns about future incompatibility if
49 subdir-objects is not specified by AM_INIT_AUTOMAKE.
50 * configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects.
52 bootstrap: require newer texinfo release.
53 * bootstrap.conf (buildreq): Bump required makeinfo binary
54 release number to 4.13 to support --bulid-dir option.
56 bootstrap: don't double-specify --no-changelog to gnulib-tool.
57 * bootstrap.conf (gnulib_tool_option_extras): Rename from
59 (gnulib_tool_options): ...this, and append options rather than
62 bootstrap: sync with upstream.
63 * gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
64 gl/build-aux/funclib.sh, gl/build-aux/options-parser: Update
65 from upstream to pick up recent improvements.
66 * bootstrap: Regenerate.
68 2013-08-17 Michael Witten <mfwitten@gmail.com> (tiny change)
70 Clean up documentation
71 * doc/m4.texinfo: Note that m4 is mostly compatible with SVR4.
73 2013-08-17 Eric Blake <eblake@redhat.com>
75 maint: update to latest gnulib
76 * gnulib: Update to latest, for various fixes.
78 2013-04-18 Eric Blake <eblake@redhat.com>
80 maint: update to latest gnulib
81 * gnulib: Update to latest, for regex fixes.
83 2013-03-15 Eric Blake <eblake@redhat.com>
85 build: avoid test failure on HPUX
86 * doc/m4.texi (Command line files): Skip tests on systems where it
87 is impossible to start with stdin/out closed.
88 Reported by Gary V. Vaughan.
90 2013-03-12 Eric Blake <eblake@redhat.com>
92 maint: update to latest gnulib
93 * gnulib: Update to latest, for mingw compile fixes.
95 2013-03-11 Eric Blake <eblake@redhat.com>
97 build: fix large diversions on mingw
98 * gl/lib/clean-temp.c.diff: New file.
99 * NEWS: Mention the fix.
101 2013-03-08 Gary V. Vaughan <gary@gnu.org>
103 bootstrap: remove reintroduced CVS cruft.
104 * bootstrap.conf (m4_ignore_gnulib_ignore): Remove.
105 The code this was factored from was removed between making the
106 bootstrap branch, and merging, so this function is actually
109 maint: automake 1.11.5 and earlier generate insecure dist
111 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.5 or newer.
113 2010-09-17 Gary V. Vaughan <gary@gnu.org>
115 bootstrap: upgrade to canonical upstream version.
116 * bootstrap.conf: New file to configure gnulib bootstrap.
117 * gl: New gnulib overrides directory.
118 * gl/modules/bootstrap, gl/modules/extract-trace,
119 gl/modules/funclib.sh, gl/modules/inline-source,
120 gl/modules/options-parser: Import canonical bootstrap modules.
121 * gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
122 gl/build-aux/funclib.sh, gl/build-aix/inline-source,
123 gl/build-aux/options-parser: Import module implementations.
124 * bootstrap: Regenerate.
125 * m4/gnulib-cache.m4: Regenerate.
127 2013-01-02 Eric Blake <eblake@redhat.com>
129 maint: automake recommends *.texi now
130 * doc/m4.texinfo: Move...
131 * doc/m4.texi: ...here, for the eventual automake 1.14.
132 * HACKING: Reflect the rename.
133 * doc/Makefile.am (info_TEXINFOS): Likewise.
134 * checks/Makefile.am ($(srcdir)/stamp-checks): Likewise.
136 2013-01-01 Eric Blake <eblake@redhat.com>
138 maint: bump copyright year
139 * all files: Version control now has a commit in 2013.
141 maint: update to latest gnulib
142 * gnulib: Update to latest, for rational range regex, build fixes,
144 * NEWS: Document this.
146 2012-12-22 Eric Blake <eblake@redhat.com>
148 maint: enable tight_scope syntax check
149 * src/Makefile.am (m4_SOURCES): Move m4.h...
150 (noinst_HEADERS): ...into separate listing for syntax check.
151 * src/m4.h: Add 'extern' to function declarations.
152 (expansion_level): Declare extern variable here...
153 * src/debug.c: ...not here.
155 maint: move syntax check exemptions into cfg.mk
156 * .x-sc_prohibit_tab_based_indentation: Delete file.
157 * .x-update-copyright: Likewise.
158 * Makefile.am (syntax_check_exceptions): Delete rule.
159 * cfg.mk (exclude_file_name_regexp): Move exemptions here.
160 (local-checks-to-skip): Re-enable copyright check.
162 build: update to latest gnulib
163 * gnulib: Update to latest.
165 2012-11-19 Eric Blake <eblake@redhat.com>
167 build: avoid problematic gcc 4.4 warnings
168 * configure.ac (nw): Disable gcc warnings that cause build
169 failures under RHEL 6.3.
170 * gnulib: Update to latest.
172 2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
174 doc: improve prehistory discussion
175 * doc/m4.texinfo (History): Describe M6 and related processors.
176 From a suggestion by Doug McIlroy in
177 <http://lists.gnu.org/archive/html/m4-discuss/2012-05/msg00004.html>.
178 Also, improve citation quality by giving URLs and so forth.
180 2012-09-21 Eric Blake <eblake@redhat.com>
182 maint: drop more CVS cruft
183 * bootstrap (Version control): Don't generate .cvsignore or
184 prepopulate m4/.gitignore.
185 * .gitignore: Allow m4/gnulib-cache.m4 manually.
187 2012-09-06 Eric Blake <eblake@redhat.com>
189 maint: enable gcc warnings during git development
190 * configure.ac (gl_gcc_warnings): Alter default based on environment.
192 2012-09-05 Stefanno Lattarini <stefano.lattarini@gmail.com> (tiny change)
194 maint: convert the last hand-written Makefile to automake
195 * checks/Makefile.in: Rename ...
196 * checks/Makefile.am: ... like this, and simplify and adjust to
197 make it proper as Automake input.
199 2012-09-04 Eric Blake <eblake@redhat.com>
201 maint: merge gitignore files
202 * build-aux/.gitignore: Delete.
203 * checks/.gitignore: Likewise.
204 * doc/.gitignore: Likewise.
205 * examples/.gitignore: Likewise.
206 * src/.gitignore: Likewise.
207 * .gitignore: Cover rules from deleted files.
209 maint: drop CVS cruft
210 * .cvsignore: Remove.
211 * build-aux/.cvsignore: Likewise.
212 * checks/.cvsignore: Likewise.
213 * doc/.cvsignore: Likewise.
214 * examples/.cvsignore: Likewise.
215 * src/.cvsignore: Likewise.
217 build: add more compiler checking
218 * configure.ac (nw): Turn on some warnings that no longer trigger
219 a gcc warning, or where we reduce the scope of unwarned code.
220 * src/m4.h (progname): Drop redundant declaration.
221 * src/builtin.c (includes): Use header for program_name.
223 build: pick up latest gnulib fixes
224 * gnulib: Update to latest.
225 * m4/gnulib-cache.m4: Regenerate.
226 * missing: Break symlink in order to work around automake version
228 * .gitignore: Update.
229 * .cvsignore: Likewise.
231 build: mark several pure functions
232 * src/m4.h (M4_GNUC_PURE): New macro.
233 * src/m4.c (fault_handler): Mark pure.
234 * src/builtin.c (find_builtin_by_addr, find_builtin_by_name):
236 * src/symtab.c (hash): Likewise.
238 2012-09-01 Eric Blake <eblake@redhat.com>
240 build: silence gcc warning
241 * configure.ac (M4_cv_gcc_pragma_push_works): New test.
242 (-Wformat-nonliteral): Disable for older gcc.
243 * src/format.c (expand_format): Mark our only uses of nonliteral
244 format as being safe.
246 doc: fix misuse of @xref
247 * doc/m4.texinfo (Inhibiting Invocation): Reword.
249 2012-07-21 Eric Blake <eblake@redhat.com>
251 bootstrap: avoid undefined variables
252 * bootstrap (func_fatal_error, func_usage, func_help)
253 (func_version): Use constants, not undefined variables; propagate
255 (func_missing_arg): Drop duplicate declaration. Preinitialize
257 Reported by Stefano Lattarini.
259 2012-06-26 Eric Blake <eblake@redhat.com>
261 build: get missing from automake, not gnulib
262 * build-aux/missing: Break link to gnulib.
263 * .gitignore: Reflect this.
265 2012-06-25 Eric Blake <eblake@redhat.com>
267 maint: update copyright year
268 * all files: Run 'make update-copyright'.
270 build: deal with newer glibc vs. FORTIFY_SOURCE
271 * configure.ac (FORTIFY_SOURCE): Make conditional on optimization.
273 2011-05-02 Eric Blake <eblake@redhat.com>
275 build: pick up latest gnulib fixes
276 * gnulib: Update to latest, for fclose improvements.
278 2011-04-30 Eric Blake <eblake@redhat.com>
280 build: improve SIGPIPE emulation on mingw
281 * gnulib: Update to latest.
282 * m4/gnulib-cache.m4: Import sigpipe module, drop strtol.
284 2011-04-29 Eric Blake <eblake@redhat.com>
286 m4_defn: avoid compiler warning
287 * src/builtin.c (m4_defn): Nuke redundant condition.
289 m4_error: fix missing va_end
290 * src/m4.c (m4_error, m4_error_at_line): Add missing va_end.
292 2011-03-01 Eric Blake <eblake@redhat.com>
294 Release Version 1.4.16.
295 * gnulib: Update to latest.
296 * NEWS: Mention the release.
297 * src/builtin.c (m4_defn): Silence spurious -Wstrict-overflow
298 warnings from gcc 4.5.1 at -O2.
300 2011-02-28 Eric Blake <eblake@redhat.com>
302 index: fix typo in previous commit
303 * doc/m4.texinfo (Index macro): Actually expose the bug.
305 2011-02-26 Eric Blake <eblake@redhat.com>
307 index: fix another regression from faulty strstr
308 * gnulib: Update to latest, for strstr fix.
309 * doc/m4.texinfo (Index macro): Test for the bug.
310 * NEWS: Document the fix.
312 Reported by Mike Stump, with additional analysis from Ralf
313 Wildenhues and Jim Meyering.
315 2011-02-07 Eric Blake <eblake@redhat.com>
317 maint: speed up configure, using latest gnulib
318 * gnulib: Update to latest.
319 * m4/gnulib-cache.m4: Import fclose and rename modules.
320 * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Speed up normal
321 configure runs (and document how to rerun GNULIB_POSIXCHECK).
322 * HACKING: Document GNULIB_POSIXCHECK.
324 maint: update http git cloning instructions
325 * HACKING: Git http doesn't like the redirect at git.sv.gnu.org.
327 Reported by Mike Dupont.
329 2011-02-01 Eric Blake <eblake@redhat.com>
331 maint: update to latest gnulib
332 * gnulib: Update to latest.
333 * m4/gnulib-cache.m4: Regenerate.
334 * src/builtin.c (m4_ifelse): Use STREQ.
336 2011-01-25 Eric Blake <eblake@redhat.com>
338 maint: reflect recent copyright assignments
341 2011-01-03 Eric Blake <eblake@redhat.com>
343 maint: update copyright year
344 * gnulib: Update to latest.
345 * m4/gnulib-cache.m4: Regenerate.
346 * all other files: Run 'make update-copyright'.
348 maint: document use of copyright ranges
349 * README: Copy coreutils wording for allowing copyright year
350 ranges. Also mention libsigsegv 2.9.
351 * cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding
352 Standards permit it, prefer shorthand copyright.
353 * HACKING: Update libsigsegv preference.
354 * NEWS: 1.4.16 will be in 2011.
355 * doc/m4.texinfo (History): Likewise.
357 2010-12-31 Eric Blake <eblake@redhat.com>
359 main: avoid leaking string on Haiku
360 * src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV.
362 Reported by Scott McCreary.
364 2010-12-24 Eric Blake <eblake@redhat.com>
366 build: pull in various gnulib fixes
367 * gnulib: Update to latest.
368 * m4/gnulib-cache.m4: Reflect spawn-pipe module name change.
369 * src/builtin.c (includes): Likewise.
370 (define_user_macro): Alter comment to appease syntax-check.
371 * src/input.c (pop_wrapup): Likewise.
372 * src/output.c (undivert_all): Likewise.
373 * cfg.mk (local-checks-to-skip): Skip new rule.
375 maint: reflect recent copyright assignment
376 * AUTHORS: Add Raphael Poss.
378 2010-10-21 Eric Blake <eblake@redhat.com>
380 build: work around glibc and libsigsegv bugs
381 * gnulib: Update to latest.
382 * m4/gnulib-cache.m4: Regenerate.
383 * docs/m4.texinfo (Index macro): Expose strstr bug.
384 * NEWS: Mention fixes.
386 docs: mention more history
387 * doc/m4.texinfo (History): Add upcoming 1.4.16 release.
389 2010-08-31 Eric Blake <eblake@redhat.com>
391 Release Version 1.4.15.
392 * gnulib: Update to latest.
393 * NEWS: Mention the release.
395 2010-08-30 Eric Blake <eblake@redhat.com>
397 Clean up compiler warnings.
398 * src/builtin.c (m4_patsubst): Drop dead store.
399 * src/eval.c (unary_term): Likewise.
400 * src/input.c (match_input): Likewise. Also drop useless casts to
402 * src/symtab.c (symtab_debug): Drop useless casts.
404 Test previous commit.
405 * doc/m4.texinfo (Format): Add a test.
406 * NEWS: Document the fix.
409 2010-08-30 Carlo Teubner <carlo.teubner@gmail.com> (tiny change)
411 Avoid a crash with bad format string.
412 * src/format.c (expand_format): Fix off-by-one error.
414 2010-08-30 Eric Blake <eblake@redhat.com>
416 Document recent bug fixes.
417 * NEWS: Add some entries.
418 * gnulib: Update to latest, for more AIX fixes.
420 2010-07-30 Eric Blake <eblake@redhat.com>
422 Update to newer gnulib.
423 * gnulib: Update to latest, for strtod fix.
424 * src/Makefile.am (m4_LDADD): Update link libraries accordingly.
425 * cfg.mk (local-checks-to-skip): Skip broken check.
426 * doc/m4.texinfo: Drop all use of @acronym{}.
428 Reported by Rainer Tammer.
430 2010-06-04 Eric Blake <eblake@redhat.com>
432 Reflect recent copyright assignment.
433 * AUTHORS: Add David Warme.
435 Update to newer gnulib.
436 * gnulib: Update to latest, and include C++ tests.
437 * configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
439 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
441 * m4/gnulib-cache.m4: Regenerate.
442 * build-aux/.cvsignore: Likewise.
443 * build-aux/.gitignore: Likewise.
445 Fix build on newer glibc.
446 * src/m4.h (includes): Add <sys/stat.h>.
448 Reported by Todd Rinaldo.
450 2010-03-02 Giuseppe Scrivano <gscrivano@gnu.org> (tiny change)
452 Support bootstrap --gnulib-srcdir=DIR.
453 * bootstrap: Add --gnulib-srcdir option, which overrides
454 GNULIB_SRCDIR, for consistency with gnulib bootstrap.
456 2010-02-24 Eric Blake <eblake@redhat.com>
458 Release Version 1.4.14.
459 * gnulib: Update to latest.
460 * README: Increase libsigsegv recommendation.
461 * HACKING: Likewise. Tweak release instructions.
462 * NEWS: Mention the release.
464 Improve parsing example.
465 * doc/m4.texinfo (Input processing): Double-quote argument to
466 translit, for robustness.
468 Reported by Chris Penev.
470 2010-01-29 Eric Blake <ebb9@byu.net>
472 Document upcoming release.
473 * gnulib: Update to latest.
474 * doc/m4.texinfo (History): Mention 1.4.14.
476 2010-01-06 Eric Blake <ebb9@byu.net>
478 Use correct license on auxiliary documentation.
479 * gnulib: Update to latest.
480 * AUTHORS: Use GFDL 1.3, not 1.2.
485 * NEWS: Place under GFDL.
486 * cfg.mk (old_NEWS_hash): Update.
488 2010-01-05 Eric Blake <ebb9@byu.net>
490 Remove more TAB characters.
491 * THANKS: Use space for alignment.
492 * bootstrap: Likewise.
493 * checks/stackovf.test: Likewise.
494 * configure.ac: Likewise.
495 * src/builtin.c: Likewise. Also update some stale comments.
496 * src/debug.c: Likewise.
497 * src/eval.c: Likewise.
498 * src/format.c: Likewise.
499 * src/freeze.c: Likewise.
500 * src/input.c: Likewise.
501 * src/m4.c: Likewise.
502 * src/m4.h: Likewise.
503 * src/macro.c: Likewise.
504 * src/output.c: Likewise.
505 * src/path.c: Likewise.
506 * src/symtab.c: Likewise.
508 Clarify minimum bootstrap requirements.
509 * bootstrap: Avoid out-of-date duplicated data.
511 Security fix by requiring newer automake features.
512 * configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
513 parallel-tests, and silent-rules.
514 (AC_PREREQ): Bump autoconf requirement to 2.62, per automake.
515 * HACKING: Update minimum requirements.
516 * NEWS: Document the fix.
518 Drop hard-coding of GPG id.
519 * gnulib: Update to latest.
520 * m4/gnulib-cache.m4: Regenerate.
521 * cfg.mk (gpg_key_ID): Delete, now that maint.mk provides a
523 (update-copyright-env): Don't let environment interfere with wrap
526 2010-01-01 Eric Blake <ebb9@byu.net>
528 Update copyright year.
529 All files impacted, via 'make update-copyright'. Additionally:
530 * .gitignore: Ignore backup files.
532 2009-12-29 Eric Blake <ebb9@byu.net>
534 Document new indentation policy.
535 * HACKING: Document indentation policy.
536 * .x-sc_prohibit_tab_based_indentation: New file.
537 * cfg.mk (sc_prohibit_tab_based_indentation): New rule.
538 * Makefile.am (syntax_check_exceptions): New macro.
539 (EXTRA_DIST): Distribute exception files, and .prev-version.
541 Switch to indentation by space, not tab.
542 * .gitmodules: Convert leading tabs to spaces.
544 * bootstrap: Likewise.
545 * c-boxes.el: Likewise.
546 * checks/check-them: Likewise.
547 * checks/get-them: Likewise.
548 * checks/stackovf.test: Likewise.
549 * configure.ac: Likewise.
550 * src/builtin.c: Likewise.
551 * src/debug.c: Likewise.
552 * src/eval.c: Likewise.
553 * src/format.c: Likewise.
554 * src/freeze.c: Likewise.
555 * src/input.c: Likewise.
556 * src/m4.c: Likewise.
557 * src/m4.h: Likewise.
558 * src/macro.c: Likewise.
559 * src/output.c: Likewise.
560 * src/path.c: Likewise.
561 * src/symtab.c: Likewise.
563 Update to latest gnulib.
565 * m4/gnulib-cache.m4: Import xoset.
566 * src/output.c (includes): Ensure that gnulib oset usage will
567 call xalloc_die on memory failure.
568 * build-aux/.cvsignore: Regenerate.
569 * build-aux/.gitignore: Likewise.
571 2009-11-28 Eric Blake <ebb9@byu.net>
573 Work around BSD getopt bug.
575 * doc/m4.texinfo (Command line files): Add test.
577 Use fastmap for better regex performance.
578 * src/input.c (word_start): Delete.
579 (pop_wrapup): Free memory on exit.
580 (set_word_regexp): Compile a fastmap instead.
581 (peek_token, next_token): Use the fastmap.
583 2009-11-26 Eric Blake <ebb9@byu.net>
585 Ignore write failures before stack overflow exit.
586 * m4/gnulib-cache.m4: Import ignore-value module.
587 * src/m4.c (fault_handler): Use it to avoid compiler warning.
589 2009-11-25 Eric Blake <ebb9@byu.net>
591 Allow use of compiler warnings.
592 * m4/gnulib-cache.m4: Import manywarnings module.
593 * configure.ac (WERROR_CFLAGS, WARN_CFLAGS): New variables.
594 * src/Makefile.am (AM_CFLAGS): Use them.
595 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Turn on warnings during
597 * src/m4.h (M4_GNUC_NORETURN): New macro.
598 (trace_post): Delete unused parameter.
599 * src/m4.c (usage): Mark as noreturn.
600 (main): Remove unused parameter.
601 * src/debug.c (trace_post): Likewise.
602 (trace_pre): Cover all enum values.
603 * src/symtab.c (lookup_symbol): Likewise.
604 * src/builtin.c (define_macro, m4_dumpdef): Likewise.
605 (m4_define, m4_undefine, m4_pushdef, m4_popdef, m4_sysval)
606 (m4_divert, m4_undivert, m4_dnl, m4_changequote, m4_changecom)
607 (m4_changeword, m4_syscmd, m4_include, m4_sinclude, m4_m4exit)
608 (m4_debugmode, m4_debugfile, m4_placeholder): Mark unused
610 (mkstemp_helper): Use parameter.
611 (substitute): Avoid signed vs. unsigned comparison.
612 * src/format.c (arg_int, arg_long, arg_double): Likewise.
613 * src/input.c (next_token): Likewise.
614 * src/output.c (freeze_diversions): Likewise.
615 (m4_tmpname): Allow C++ compilation.
616 * src/freeze.c (produce_frozen_state, GET_NUMBER): Use correct
618 * src/macro.c (call_macro): Cover all enum values.
619 (expand_macro): Update caller.
620 * src/path.c (m4_fopen): Remove unused parameter.
621 (m4_path_search): Update caller.
623 Silence syntax-check warnings.
624 * src/m4.h (STREQ): New macro.
625 * src/builtin.c (find_builtin_by_name): Use it.
626 * src/input.c (set_word_regexp): Likewise.
627 * src/m4.c (process_file): Likewise.
628 (main): Consistently spell warning, and mark output strings.
629 Avoid unsafe parsing functions.
630 (process_file): Mark output strings.
631 * src/output.c (make_diversion): Likewise.
632 * src/format.c (arg_int, arg_long, arg_double): New helpers.
633 (ARG_INT, ARG_LONG, ARG_DOUBLE): Use them to detect parse errors.
634 * BACKLOG: Avoid whitespace problems.
637 * examples/esyscmd.m4: Likewise.
638 * examples/file.m4: Likewise.
639 * examples/fstab.m4: Likewise.
640 * examples/patsubst.m4: Likewise.
642 Use gnulib maintainer-makefile module.
643 * m4/gnulib-cache.m4: Import maintainer-makefile module.
644 * cfg.mk (local-checks-to-skip): Drop changelog-check; add
645 sc_cast_of_x_alloc_return_value.
646 (gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
648 (config_h_header, old_NEWS_hash): New macros.
649 * .prev-version: New file.
650 * maint.mk: Remove from version control; use gnulib instead.
651 * .gitignore: Update.
656 * m4/gnulib-cache.m4: Use --makefile-name.
657 * lib/Makefile.am: Wrap the gnulib-generated file.
658 * tests/Makefile.am: Likewise.
659 * .gitignore: Track our wrappers.
660 * doc/m4.texinfo (Improved capitalize): Fix typo.
662 2009-10-05 Eric Blake <ebb9@byu.net>
666 * m4/gnulib-cache.m4: Import gnu-web-doc-update module.
667 * build-aux/.gitignore: Ignore new file.
668 * build-aux/.cvsignore: Likewise.
670 2009-08-20 Eric Blake <ebb9@byu.net>
674 * AUTHORS: Mention recent copyright assignment.
676 2009-08-17 Eric Blake <ebb9@byu.net>
678 Enhance test with closed descriptors.
679 * doc/m4.texinfo (Command line files): Enhance test from
680 2009-07-20 to actually test the bug being fixed.
682 Update copyright year.
683 * AUTHORS: Run UPDATE_COPYRIGHT_FORCE=1 make update-copyright.
685 * Makefile.am: Likewise.
687 * acinclude.m4: Likewise.
688 * c-boxes.el: Likewise.
690 * checks/Makefile.in: Likewise.
691 * checks/check-them: Likewise.
692 * checks/stackovf.test: Likewise.
693 * doc/Makefile.am: Likewise.
694 * examples/Makefile.am: Likewise.
695 * src/Makefile.am: Likewise.
696 * src/debug.c: Likewise.
697 * src/eval.c: Likewise.
698 * src/freeze.c: Likewise.
699 * src/m4.h: Likewise.
700 * src/macro.c: Likewise.
701 * src/path.c: Likewise.
702 * src/symtab.c: Likewise.
704 Prepare to bulk update copyright year.
706 * m4/gnulib-cache.m4: Import update-copyright and vc-list-files
708 * maint.mk: Fix copyright.
709 (build_aux, VC_LIST, VC_LIST_EXCEPT, update-copyright): New macros
710 and rules borrowed from gnulib.
711 * cfg.mk (update-copyright-env): Enforce longhand behavior.
712 * .cvsignore: Reflect these changes.
713 * .gitignore: Likewise.
714 * .x-update-copyright: New file.
716 2009-08-14 Eric Blake <ebb9@byu.net>
718 Explicitly request GNU getopt extensions.
720 * m4/gnulib-cache.m4: Use getopt-gnu, not obsolete getopt module.
722 2009-07-22 Eric Blake <ebb9@byu.net>
724 Fix testsuite on Solaris.
725 * doc/m4.texinfo (Command line files): Tolerate different spelling
727 * src/builtin.c (m4_esyscmd): Clear errno before reaping.
729 2009-07-21 Eric Blake <ebb9@byu.net>
731 Fix testsuite on mingw.
734 2009-07-20 Eric Blake <ebb9@byu.net>
736 Pick up gnulib fixes for sub-process execution.
738 * doc/m4.texinfo (Command line files): Add test; regression
739 introduced 2009-03-05.
740 * NEWS: Document the change.
742 Avoid cygwin 1.7 crash with closed stdout.
744 * doc/m4.texinfo (Command line files): Add test; regression
745 introduced 2008-07-17.
746 * NEWS: Document the change.
748 A status of 127 does not always imply esyscmd failure.
749 * src/builtin.c (m4_esyscmd): Silence gnulib message; regression
750 introduced 2009-03-05.
751 * doc/m4.texinfo (Sysval): Test this.
752 * NEWS: Document the change.
754 2009-06-25 Eric Blake <ebb9@byu.net>
756 Fix description of limits on diversions.
757 * doc/m4.texinfo (Diversions): Fix grammar. Be less pessimistic
760 Reported by Elias Benali.
762 2009-06-17 Eric Blake <ebb9@byu.net>
764 Update to latest gnulib.
765 * gnulib: Import fixes for Interix compilation.
767 Reported by Jay Krell.
769 2009-05-22 Eric Blake <ebb9@byu.net>
771 Update to latest gnulib.
772 * gnulib: Import fixes for AIX compilation.
774 Reported by Jens Rehsack.
776 2009-04-13 Eric Blake <ebb9@byu.net>
779 * doc/m4.texinfo (copying): Complete transition to GFDL 1.3,
781 Reported by Santiago Vila.
783 2009-04-01 Eric Blake <ebb9@byu.net>
785 Release Version 1.4.13.
786 * NEWS: Mention the release.
788 2009-03-31 Eric Blake <ebb9@byu.net>
790 Tweak submodule instructions.
791 * HACKING: Improve directions.
792 * gnulib: Update to latest version.
794 2009-03-23 Eric Blake <ebb9@byu.net>
796 Don't force file overwrites during bootstrap.
797 * bootstrap: Ensure that rerunning bootstrap doesn't alter tree.
799 Drop dist-lzma, now that xz replaces lzma.
800 * configure.ac (AM_INIT_AUTOMAKE): Drop dist-lzma. Until a stable
801 automake release includes dist-xz, the release process will just
802 manually create a .xz tarball.
803 * gnulib: Update to latest gnulib.
805 2009-03-19 Eric Blake <ebb9@byu.net>
807 Exploit git submodule by adding appropriate symlinks.
808 * bootstrap: No longer copy files from gnulib.
809 * COPYING: Change to symlink pointing into gnulib.
811 * build-aux/compile: Likewise.
812 * build-aux/config.guess: Likewise.
813 * build-aux/config.sub: Likewise.
814 * build-aux/depcomp: Likewise.
815 * build-aux/install-sh: Likewise.
816 * build-aux/mdate-sh: Likewise.
817 * build-aux/missing: Likewise.
818 * build-aux/texinfo.tex: Likewise.
819 * .cvsignore: Reflect these changes.
820 * .gitignore: Likewise.
821 * build-aux/.cvsignore: New file.
822 * build-aux/.gitignore: Likewise.
824 2009-03-18 Eric Blake <ebb9@byu.net>
826 Make gnulib a git submodule.
827 * .gitmodules: New file.
828 * gnulib: Record which version of gnulib has been tested.
829 * bootstrap: Aid in submodule usage.
830 * cfg.mk (gnulib_dir): Alter default location of gnulib.
831 * HACKING: Mention how to use submodule.
833 Use latest compile script, even with stable automake.
834 * bootstrap: Also sync build-aux/compile.
836 2009-03-12 Eric Blake <ebb9@byu.net>
838 Fix awk script portability.
839 * checks/get-them: In gsub, properly escape {. Close all files
841 Reported by Gary V. Vaughan.
843 2009-03-05 Eric Blake <ebb9@byu.net>
845 Allow configuration choice in syscmd shell.
846 * configure.ac (SYSCMD_SHELL): New test.
847 * src/builtin.c (m4_syscmd, m4_esyscmd): Use it to avoid
848 hard-coding the shell location.
849 * doc/m4.texinfo (Syscmd, Esyscmd): Document this.
850 * README: Document new configure option.
853 Remove cruft now that gnulib modules do the work.
854 * configure.ac (M4_cv_func_system_consistent): Delete.
855 * src/builtin.c (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS):
858 Use gnulib pipe module instead of popen(3).
859 * m4/gnulib-cache.m4: Import pipe and wait-process modules.
860 * src/builtin.c (m4_esyscmd): Rewrite with pipe module.
861 Resolves a failure on AIX, reported by Gary V. Vaughan.
863 Use gnulib execute module instead of system(3).
864 * m4/gnulib-cache.m4: Import execute module.
865 * src/builtin.c (m4_sysval): Move computation...
866 (m4_esyscmd): ...into caller.
867 (m4_syscmd): Rewrite with execute module.
868 Resolves a failure on AIX, reported by Gary V. Vaughan.
870 2009-03-03 Eric Blake <ebb9@byu.net>
872 Try to tolerate spaces in directory names in testsuite.
873 * doc/m4.texinfo (Diversions, Using frozen files): Provide shell
874 quoting, in case __program__ contains spaces.
876 Improve web-manual maintainer rule.
877 * maint.mk (web-manual): Work with VPATH builds. Factor
878 package-specific detail...
879 * cfg.mk (manual_title): ...to new variable.
881 2009-02-26 Eric Blake <ebb9@byu.net>
883 Make bootstrap easier on Solaris.
884 * bootstrap: Add GNULIB_SRCDIR. Useful when a wrapper script
885 gnulib-tool exists earlier on the path to work around /bin/sh
886 failure in parsing $GNULIB_SRCDIR/gnulib-tool.
888 2009-02-19 Eric Blake <ebb9@byu.net>
890 Fix regression in translit.
891 * src/builtin.c (m4_translit): Use correct comparison.
892 * doc/m4.texinfo (Translit): Enhance test.
894 Speed up input engine, by searching for quotes by buffer.
895 * src/input.c (struct input_block): Add end pointer to string.
896 (push_string_finish, push_wrapup): Populate it.
897 (next_token): For quotes, attempt a buffer search.
898 * NEWS: Document this.
900 2009-02-18 Eric Blake <ebb9@byu.net>
902 Speed up translit when from argument is short.
903 * m4/gnulib-cache.m4: Import memchr2 module.
904 * src/builtin.c (m4_translit): Use memchr2 when possible.
905 * doc/m4.texinfo (Translit): Add tests.
906 * NEWS: Document this.
908 Update copyright year.
909 * THANKS: Mention 2009 in copyright year.
911 Prefer buffer over byte operations.
912 * src/format.c (expand_format): Use strchr for speed.
913 * src/builtin.c (substitute, expand_user_macro): Likewise.
915 Speed up esyscmd with buffer reads.
916 * src/builtin.c (m4_esyscmd): Read blocks directly into obstack,
917 rather than repeatedly reading bytes. Detect read errors.
919 Avoid risk of stack overflow.
920 * src/output.c (insert_file): Avoid stack allocation of large
922 (freeze_diversions): Avoid spurious semicolon.
924 2009-02-16 Eric Blake <ebb9@byu.net>
926 Avoid test failure due to different errno.
927 * doc/m4.texinfo (Using frozen files): Ignore stdout, since
928 hardened systems can prevent attempts to read /.
930 Reported by Ronny Peine, in Gentoo bug 259184.
932 Avoid tests that make no sense, because m4 is single-threaded.
933 * m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
935 2009-02-12 Eric Blake <ebb9@byu.net>
937 Avoid quadratic code when walking definition stack.
938 * examples/stack_sep.m4: Use linear, not quadratic
940 * doc/m4.texinfo (Improved copy): Fix documentation and add test,
941 based on recent autoconf bug fix.
943 2009-01-24 Eric Blake <ebb9@byu.net>
945 Add URLs to --help output.
946 * src/m4.c (usage): Use enhanced version-etc features.
948 2009-01-02 Eric Blake <ebb9@byu.net>
950 Use nicer email address in web manual.
951 * maint.mk (web-manual): Use new option in gendocs.sh.
953 Nuke xdelta diffs at release time; no one reported using them.
954 * maint.mk (got-xdelta, delta-xdelta): Delete.
957 2009-01-01 Eric Blake <ebb9@byu.net>
959 Update copyright year.
960 * NEWS: M4 1.4.13 will occur in 2009.
961 * doc/m4.texinfo (History): Likewise.
963 2008-12-24 Eric Blake <ebb9@byu.net>
965 Prepare for eventual release.
966 * doc/m4.texinfo (History): Mention 1.4.13.
968 2008-12-22 Eric Blake <ebb9@byu.net>
970 Make --debugfile argument optional.
971 * src/builtin.c (m4_debugfile): Make error message consistent.
972 * src/m4.c (long_options): Make the argument optional, to allow
973 setting debug file back to stderr.
974 (main): Make --debugfile order-dependent.
975 (usage): Document this.
976 * doc/m4.texinfo (Debugging options): Likewise.
980 * doc/m4.texinfo (Operation modes, Preprocessor features)
981 (Limits control, Frozen state, Debugging options): Use lower case
983 (Improved copy): Use @code, not @var, as appropriate.
985 2008-12-18 Eric Blake <ebb9@byu.net>
987 Document optimized forloop.
988 * doc/m4.texinfo (Improved forloop): Mention alternate style that
989 avoids define overhead.
990 * examples/forloop3.m4: New file.
991 * examples/Makefile.am (EXTRA_DIST): Distribute it.
993 Deal with M4 1.4.x limitation on builtin tokens.
994 * doc/m4.texinfo (Composition): Mention limitation on curry.
995 (Improved copy): New node.
996 * examples/stack_sep.m4: New file.
997 * examples/Makefile.am (EXTRA_DIST): Distribute it.
999 Document copy composite using stack_foreach and curry.
1000 * doc/m4.texinfo (Stacks): New node, to document pushdef stack
1002 (Ifelse): Move define_blind...
1003 (Composition): ...to this new node. Document currying, then use
1004 it to implement copy and rename.
1005 * examples/curry.m4: New file.
1006 * examples/stack.m4: Likewise.
1007 * examples/Makefile.am (EXTRA_DIST): Distribute them.
1009 2008-12-17 Eric Blake <ebb9@byu.net>
1011 Don't override signal handlers installed by c-stack.
1012 * src/m4.c (main): Reorder installation of signal handlers, so we
1013 don't trash a SIGBUS handler installed by c-stack. Also provide a
1014 SIGSEGV fallback, for platforms where c-stack combined with
1015 libsigsegv uses something lower level than SIGSEGV.
1017 2008-12-12 Eric Blake <ebb9@byu.net>
1019 Double size of temp file cache.
1020 * src/output.c (tmp_file, tmp_file_owner): Split...
1021 (tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into
1023 (tmp_file2_recent): New variable.
1024 (m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename)
1025 (output_exit): Adjust callers.
1027 Use fewer seeks on cached files.
1028 * src/output.c (m4_tmpfile): Use write, not append mode.
1029 (m4_tmpopen): Add parameter to decide when to skip seeks.
1030 (m4_tmprename, make_diversion, insert_diversion_helper)
1031 (freeze_diversions): Adjust callers.
1033 Cache most recently spilled diversion.
1034 * src/output.c (tmp_file, tmp_file_owner): New variables, for
1035 1-deep cache of spilled diversions.
1036 (m4_tmpfile): Open in append mode, since we might revisit
1037 diversion without closing it now.
1038 (m4_tmpopen): Check cache first.
1039 (m4_tmpclose): Update cache, rather than closing. Add parameter.
1040 (m4_tmpremove): Close cache before removing.
1041 (m4_tmprename): Deal with open files when renaming.
1042 (output_exit): Close cache before exiting.
1043 (make_room_for, make_diversion, insert_diversion_helper): Adjust
1045 * configure.ac (RENAME_OPEN_FILE_WORKS): New configure test.
1047 Correctly track size of in-memory diversions.
1048 * src/output.c (insert_diversion_helper): Correctly track total
1049 in-memory diversion size after undivert.
1051 Avoid quadratic behavior for some cases of divert/undivert.
1052 * src/output.c (struct m4_diversion): Improve comments.
1053 (m4_tmpname, make_diversion): Strengthen preconditions.
1054 (m4_tmprename): New function.
1055 (output_init, output_exit): Move after internal functions.
1056 (make_room_for): Don't bother copying uninitialized bytes.
1057 (insert_diversion_helper): Transfer metadata, rather than copying
1058 contents, when undiverting into a previously unused diversion.
1059 * src/m4.h (includes): Add assert.h.
1060 * doc/m4.texinfo (Diversions): Add test.
1061 (Undivert): Enhance test.
1062 * NEWS: Document the speedup.
1064 2008-12-12 Eric Blake <ebb9@byu.net>
1066 Upgrade to FDL 1.3, keep COPYING in repository.
1067 * Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING.
1068 * .cvsignore: Don't ignore it.
1069 * .gitignore: Likewise.
1070 * COPYING: Store in repository, per automake 1.10.2
1072 * m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
1073 * doc/m4.texinfo (GNU Free Documentation License): Upgrade
1075 * doc/Makefile.am (m4_TEXINFOS): Likewise.
1076 * NEWS: Mention the documentation license change.
1078 2008-10-10 Eric Blake <ebb9@byu.net>
1080 Release Version 1.4.12.
1081 * NEWS: Mention the release.
1083 2008-10-06 Eric Blake <ebb9@byu.net>
1085 Work around Solaris' sed inability to process NUL.
1086 * checks/check-them (SED): Allow user to override.
1088 2008-09-25 Eric Blake <ebb9@byu.net>
1090 Tweak error message on command line failure.
1091 * src/m4.c (process_file): Match wording of include builtin.
1092 * src/freeze.c (produce_frozen_state): Likewise.
1093 * m4/gnulib-cache.m4: Regenerate.
1094 * doc/m4.texinfo (Command line files, Using frozen files): Update
1097 2008-09-24 Eric Blake <ebb9@byu.net>
1099 Unify error handling for reading directories.
1100 * src/path.c (m4_path_search): Factor open attempts...
1101 (m4_fopen): ...into new function, to reject directories.
1102 * doc/m4.texinfo (Include): Document that directories cannot be
1105 Avoid bugs on platforms that mishandle trailing /.
1106 * m4/gnulib-cache.m4: Import fopen module.
1107 * doc/m4.texinfo (Command line files, Include): Add tests.
1108 (Using frozen files): This test now works on mingw.
1109 * checks/check-them (examples): Expand xerr to allow ignoring
1110 error output because of differences in platform errno values.
1112 2008-09-22 Eric Blake <ebb9@byu.net>
1114 Support alternate path separator.
1115 * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
1116 * src/m4.h (includes): Add headers.
1117 * src/path.c (m4_path_search): Avoid literal use of '/' as path
1118 separator and when detecting absolute paths.
1120 2008-09-16 Eric Blake <ebb9@byu.net>
1122 Fix bootstrap for Solaris /bin/sh.
1123 * bootstrap: Avoid shell quoting pitfall.
1125 2008-09-01 Eric Blake <ebb9@byu.net>
1127 Fix building with -DDEBUG=1.
1128 * src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
1129 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
1130 * src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
1131 Reported by Tom G. Christensen.
1133 2008-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1135 Typos in source code comments.
1136 * src/builtin.c: Fix typos in comments.
1137 * src/input.c: Likewise.
1139 2008-08-29 Eric Blake <ebb9@byu.net>
1141 Fix manual date information.
1142 * doc/m4.texinfo: UPDATED refers to the day the manual was built,
1143 not the release date of M4.
1144 Based on a bison patch by Akim Demaille.
1146 2008-08-27 Eric Blake <ebb9@byu.net>
1149 * doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
1152 2008-08-25 Eric Blake <ebb9@byu.net>
1154 Update recommendation now that libsigsegv 2.6 is released.
1155 * NEWS: Recommend libsigsegv 2.6+.
1158 2008-08-21 Eric Blake <ebb9@byu.net>
1160 Fix crash with traced defn(undef), regression from 2007-08-09.
1161 * src/builtin.c (m4_defn): Handle traced but undefined macros.
1162 * doc/m4.texinfo (Trace): Test it.
1163 * NEWS: Document it.
1165 2008-08-18 Eric Blake <ebb9@byu.net>
1167 Fix crash with 'm4 -N9', regression from 2006-09-14.
1168 * src/m4.c (main): Add missing break.
1169 * NEWS: Document it.
1171 2008-08-15 Eric Blake <ebb9@byu.net>
1173 Documentation updates.
1174 * doc/m4.texinfo (History): Mention 1.4.12.
1175 (Builtin): Enhance regression tests.
1176 (Debug Levels): Mention effect of -l. Enhance regression tests.
1177 (Incompatibilities): Fix typo, and mention trace output.
1178 (Improved capitalize): Simplify example.
1180 Avoid compiler warning.
1181 * src/builtin.c (m4_ifelse): Avoid unused variable.
1183 Reported by Tom G. Christensen.
1185 Improve 'git diff' of manual source.
1186 * .gitattributes (*.texi*): Add diff attribute.
1187 * bootstrap: Tell git how to use it.
1188 Inspired by Jim Meyering's similar patch for coreutils.
1190 2008-08-11 Eric Blake <ebb9@byu.net>
1192 Avoid triggering OS/2 bug in testsuite.
1193 * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
1194 Reported by Elbert Pol.
1196 2008-08-03 Eric Blake <ebb9@byu.net>
1198 Increase ulimit stack value to be larger than SIGSTKSZ.
1199 * checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
1200 at least OpenBSD's sh died early from an undersized stack limit.
1202 2008-07-17 Eric Blake <ebb9@byu.net>
1204 Remove redundant examples/stackovf.sh.
1205 * examples/stackovf.sh: Delete, now that checks has better
1207 * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
1209 2008-07-17 Eric Blake <ebb9@byu.net>
1211 Adjust to c-stack changes in gnulib.
1212 * src/Makefile.am (m4_LDADD): Use libsigsegv when available and
1213 necessary, via LIBCSTACK.
1214 * src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
1216 * checks/stackovf.test: New file.
1217 * checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
1218 (DOC_CHECKS): ...generated documentation tests into new macro.
1219 (DISTFILES): Distribute stackovf.test.
1220 * checks/check-them: Special-case stackovf.test.
1221 * NEWS: Enhance the NEWS item for -L improvements.
1222 * README: Mention the optional dependency.
1223 * HACKING: Mention maintenance burden added by libsigsegv.
1225 2008-06-21 Eric Blake <ebb9@byu.net>
1227 Use new sigaction module.
1228 * m4/gnulib-cache.m4: Import sigaction module.
1229 * src/m4.c (main): Drop signal() calls.
1231 2008-06-18 Eric Blake <ebb9@byu.net>
1233 Also trap SIGILL, SIGFPE, SIGBUS.
1234 * m4/gnulib-cache.m4: Import strsignal module.
1235 * src/m4.c (main): Register more handlers, and prefer sigaction
1237 (SIGBUS, NSIG): Provide fallback when lacking.
1238 (signal_message): New variable, to keep async-safety.
1239 (fault_handler): Display faulting signal description.
1240 * configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
1241 optimize for single-threaded operation.
1243 2008-06-06 Eric Blake <ebb9@byu.net>
1245 Inform users what to do in case of programmer error.
1246 * src/m4.h (EXIT_INTERNAL_ERROR): New macro.
1247 * configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
1248 * src/m4.c (fault_handler): New method.
1249 (program_error_message): New variable, for async-safety.
1250 (main): Print bug reporting address rather than dump core on any
1251 failed assertions or detected non-stack-overflow faults.
1253 2008-06-06 Eric Blake <ebb9@byu.net>
1255 Replace stackovf with gnulib c-stack.
1256 * m4/gnulib.cache.m4: Import c-stack module.
1257 * configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
1258 siginfo.h, sys/wait.h.
1259 (AC_CHECK_TYPES): Likewise for siginfo_t.
1260 (AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
1261 (AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
1262 sigstack, sigvec, strerror.
1263 (M4_cv_use_stackovf): Likewise for stack overflow detection.
1264 * src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
1265 * src/stackovf.c: Delete.
1266 * src/m4.h (setup_stackovf_trap): Delete.
1267 * src/m4.c (stackovf_handler): Delete.
1268 (main): Use c_stack_action instead of setup_stackovf_trap. If
1269 stack overflow is detectable, don't limit -L artificially.
1270 (usage): Document unlimited default on supported systems.
1271 * doc/m4.texinfo (Limits control): Document new default nesting
1273 * NEWS: Document this change.
1275 2008-07-30 Eric Blake <ebb9@byu.net>
1277 Avoid regressions in trace and comment output.
1278 * doc/m4.texinfo (Trace): Add test.
1279 (Comments): Likewise.
1281 2008-07-28 Eric Blake <ebb9@byu.net>
1283 Optimize iteration examples.
1284 * examples/forloop2.m4: Avoid excess indir, by passing current
1285 counter value as parameter.
1286 * examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
1288 * doc/m4.texinfo (Improved forloop, Improved foreach): Update the
1289 documentation to match.
1291 2008-07-26 Eric Blake <ebb9@byu.net>
1293 Give example for O(n) foreach on m4 1.4.x.
1294 * examples/foreachq4.m4: New file.
1295 * examples/Makefile.am (EXTRA_DIST): Distribute it.
1296 * doc/m4.texinfo (Improved foreach): Document linear foreach with
1297 m4 1.4.5 and greater.
1299 2008-07-17 Eric Blake <ebb9@byu.net>
1301 Fix missing copyright notices.
1302 * acinclude.m4: Add copyright license details.
1303 * c-boxes.el: Likewise.
1304 * checks/get-them: Likewise.
1305 * checks/check-them: Likewise.
1307 2008-07-13 Eric Blake <ebb9@byu.net>
1309 Add -g/--gnu command line argument.
1310 * src/m4.c (usage): Mention the new option.
1311 (long_options, OPTSTRING): Add new option.
1313 * NEWS: Document this addition.
1314 * doc/m4.texinfo (Limits control): Likewise.
1315 (Incompatibilities): Mention future use of POSIXLY_CORRECT.
1317 Reported by Joel E. Denny.
1319 2008-07-11 Eric Blake <ebb9@byu.net>
1321 Avoid bogus whitespace in @ovar, @dvar.
1322 * doc/m4.texinfo (ovar, dvar): Add @c.
1323 Based on patch by Ralf Wildenhues to Autoconf manual.
1325 2008-06-16 Eric Blake <ebb9@byu.net>
1327 Add missing const qualifications.
1328 * src/builtin.c (builtin_tab): Declare array elements as const.
1330 2008-06-03 Eric Blake <ebb9@byu.net>
1332 Use progname module rather than rolling our own program_name.
1333 * m4/gnulib-cache.m4: Import progname module.
1334 * src/m4.c (program_name): Replace...
1335 (main): ...with a call to set_program_name.
1337 2008-06-02 Eric Blake <ebb9@byu.net>
1339 Allow autobuild usage.
1340 * m4/gnulib.cache: Import autobuild module.
1342 2008-05-23 Eric Blake <ebb9@byu.net>
1344 Make closing files be consistent.
1345 * src/freeze.c (reload_frozen_state): Use close_stream.
1346 Reported by Jean-Charles Longuet.
1348 2008-05-22 Eric Blake <ebb9@byu.net>
1350 Don't allow failure to freeze give exit status of 0.
1351 * src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
1353 * doc/m4.texinfo (Using frozen files): Test the fix.
1355 Reported by Jean-Charles Longuet.
1357 2008-05-09 Eric Blake <ebb9@byu.net>
1359 Improve error message when frozen file is invalid.
1360 * src/freeze.c (reload_frozen_state): Track current line.
1361 [GET_STRING]: New helper macro.
1363 2008-05-09 Eric Blake <ebb9@byu.net>
1365 Detect integer overflow when loading frozen file.
1366 * src/m4.h (includes): Add limits.h.
1367 (_): Define as a no-op placeholder for now.
1368 * src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
1369 immediately on overflow.
1370 Reported by Jim Meyering.
1372 2008-05-07 Eric Blake <ebb9@byu.net>
1374 Fix traceon regression introduced 2006-06-06.
1375 * src/builtin.m4 (traceon): Only perform insertion if lookup
1377 * doc/m4.texinfo (Trace): Test for the bug.
1378 * NEWS: Document it.
1380 2008-05-03 Eric Blake <ebb9@byu.net>
1382 Document define_blind.
1383 * doc/m4.texinfo (Ifelse): Add a new composite macro.
1385 Suggested by Mike R.
1387 2008-04-24 Eric Blake <ebb9@byu.net>
1390 * doc/m4.texinfo (Debug Levels): Test -di behavior.
1391 (Changeword, Location): Correct examples.
1392 * checks/check-them (examples): Update to account for recommended
1393 location for running tests.
1394 * doc/m4.texinfo (Debug Levels): Test this behavior.
1396 2008-04-21 Eric Blake <ebb9@byu.net>
1398 Fix spelling of attribution to Christopher Strachey.
1399 * doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
1401 Reported by Fernando Carrijo.
1403 2008-04-17 Eric Blake <ebb9@byu.net>
1405 Fix buildbot failure.
1406 * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
1409 Detected by Bob Proulx's buildbot.
1411 2008-04-17 Eric Blake <ebb9@byu.net>
1413 Avoid gcc shadowing warnings.
1414 * src/builtin.c (m4_format): s/format/expand_format, so local
1415 variables can be named format.
1416 * src/format.c (format): Rename...
1417 (expand_format): ...to this, and avoid the name index.
1418 * src/input.c (push_file): Avoid the name close.
1419 * src/m4.h (expand_format): Adjust prototype.
1420 * src/output.c (threshold_diversion_CB): Avoid the name div.
1422 2008-04-15 Eric Blake <ebb9@byu.net>
1424 Another 'make installcheck' fix.
1425 * doc/m4.texinfo (Diversions): s/m4/__program__/ in case
1426 --program-prefix was active.
1428 2008-04-11 Eric Blake <ebb9@byu.net>
1430 Ensure --program-prefix doesn't regress.
1431 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
1432 2008-03-10 by testing it at 'make distcheck' time.
1434 2008-04-11 Eric Blake <ebb9@byu.net>
1436 Improve OS/2+emx build.
1437 * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
1438 system(3), no matter what other macros it pre-defined.
1439 * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
1441 * src/builtin.c (predefined_tab): Ensure all possible system
1442 identifiers are defined, not just the first; the testsuite will
1443 catch if multiple identifiers mistakenly made it through.
1445 Reported by Elbert Pol.
1447 2008-04-09 Eric Blake <ebb9@byu.net>
1449 Remove redundant configure macros.
1450 * configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
1451 (AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
1453 (AC_CHECK_HEADERS_ONCE): Remove limits.h.
1455 2008-08-07 Bruno Haible <bruno@clisp.org> (tiny change)
1457 Run m4 tests prior to gnulib unit tests.
1458 * Makefile.am (SUBDIRS): Swap order of directories.
1460 2008-04-02 Eric Blake <ebb9@byu.net>
1462 Release Version 1.4.11.
1463 * NEWS: Mention the release.
1465 Prepare for release.
1466 * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
1467 remove tag operation.
1468 (version-check): Enhance this check.
1469 (prev-tarball): Depend on version-check.
1470 (this-vc-tag): Delete, and mention need to run tag...
1471 * HACKING: ...here, prior to make maintainer-distcheck.
1472 Update the instructions to match this particular release process.
1473 * Makefile.am (.version, announcement): Allow for VPATH build.
1474 * cfg.mk (gnulib_dir): Likewise.
1475 * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
1478 2008-04-01 Eric Blake <ebb9@byu.net>
1480 Speed up index builtin.
1481 * m4/gnulib-cache: Import strstr module.
1482 * NEWS: Mention the speedup.
1484 2008-03-29 Eric Blake <ebb9@byu.net>
1486 Fix testsuite on mingw, OpenBSD.
1487 * src/format.c (ARG_DOUBLE): Use strtod, not atof.
1488 * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
1489 * doc/m4.texinfo (Format): Add hex-float support.
1490 * NEWS: Document this.
1492 2008-03-27 Eric Blake <ebb9@byu.net>
1494 Pull other useful doc fixes from branch-1.6.
1495 * doc/m4.texinfo (Arguments): Enable test of
1496 --warn-macro-sequence.
1497 (Defn): Test length of builtin token.
1498 (Builtin, Ifelse, Changequote): Add more regression tests.
1500 2008-03-27 Eric Blake <ebb9@byu.net>
1502 Add test for divert bug on 2007-05-28, patched 2007-07-21.
1503 * doc/m4.texinfo (Diversions): Add test.
1505 2008-03-24 Eric Blake <ebb9@byu.net>
1507 Pull GNUmakefile from gnulib.
1508 * m4/gnulib-cache.m4: Import gnumakefile module.
1509 * GNUmakefile: Remove from version control; supplied by gnulib
1511 * configure.ac (AC_INIT): Track intra-release version with
1513 (AC_CONFIG_LINKS): Let gnulib do this now.
1514 * Makefile.am (distclean-local): Likewise.
1515 (EXTRA_DIST): Likewise. Also handle renamed files.
1516 * (.version, dist-hook): Improve version handling.
1517 * Makefile.cfg: Rename...
1518 * cfg.mk: ...to this.
1519 * Makefile.maint: Rename...
1520 * maint.mk: ...to this.
1521 (ME, makefile-check, m4-check): Use new macro instead of
1523 * HACKING: Mention that maintainer rules should now work in VPATH
1526 2008-03-15 Eric Blake <ebb9@byu.net>
1528 Document join, in order to fix bug in m4wrap example.
1529 * doc/m4.texinfo (Improved m4wrap): New node.
1530 (Defn, Location): Enhance tests.
1531 (Shift): Document the composite macro join.
1532 (Incompatibilities): Move documentation of LIFO vs. FIFO...
1533 (M4wrap): ...here, to match improved example.
1535 2008-03-10 Eric Blake <ebb9@byu.net>
1537 Allow 'make installcheck' with './configure --program-prefix'.
1538 * checks/Makefile.in (program_transform_name): New macro.
1539 (installcheck): Use it to transform name of m4 before testing.
1540 * checks/check-them (m4): Add -m option, to allow testing m4 by a
1542 * checks/get-them: Allow xout and xerr notation.
1544 2008-02-25 Eric Blake <ebb9@byu.net>
1546 Improve release process.
1547 * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
1549 * HACKING: Update for git release procedures.
1550 * Makefile.cfg: New file.
1551 * GNUmakefile: Use it.
1552 * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
1553 (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
1554 (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
1555 (makefile-check, news-date-check, changelog-check, m4-check)
1556 (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
1557 (announcement, alpha, beta, major): New rules, borrowed from
1559 (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
1561 * Makefile.am (EXTRA_DIST): Distribute new file.
1563 2008-02-19 Eric Blake <ebb9@byu.net>
1565 Clean up foreach example.
1566 * doc/m4.texinfo (Foreach, Improved foreach): Document another
1567 shortcoming in foreach.m4.
1569 2008-02-16 Eric Blake <ebb9@byu.net>
1571 Add regression test for multi-character quote recursion.
1572 * examples/foreach2.m4: Use $0 rather than spelling out name.
1573 * examples/foreachq2.m4: Likewise.
1574 * examples/forloop2.m4: Likewise.
1575 * examples/hanoi.m4: Likewise.
1576 * examples/trace.m4: Likewise.
1577 * doc/m4.texinfo (Improved forloop): Document advantage of $0.
1578 (Improved foreach): Adjust dump from file.
1580 2008-02-13 Eric Blake <ebb9@byu.net>
1582 Fix texinfo grammar.
1583 * doc/m4.texinfo (Incompatibilities): Use @. after capital.
1584 (History): Use @: after abbreviations.
1585 (M4exit): Use correct Latin abbreviation.
1587 2008-02-11 Eric Blake <ebb9@byu.net>
1589 Document behavior of __gnu__().
1590 * doc/m4.texinfo (Platform macros): Enhance test.
1591 (Macro expansion): New test.
1593 2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1595 * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
1596 than hard-coding /bin/sh.
1598 Reported by Lawson Chan.
1600 2007-12-13 Paolo Bonzini <bonzini@gnu.org> (tiny change)
1602 * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
1605 Reported by Giovanni Toffetti.
1607 2007-12-07 Eric Blake <ebb9@byu.net>
1609 Minor security fix: Quote output of mkstemp.
1610 * src/builtin.c (mkstemp_helper): Produce quoted output.
1611 * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
1612 * NEWS: Document this change.
1614 2007-12-04 Eric Blake <ebb9@byu.net>
1616 Fix builds with OpenBSD make.
1617 * doc/Makefile.am (HELP2MAN): New macro.
1618 (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
1619 * README: Update copyright.
1620 * HACKING: Mention help2man and makeinfo dependencies.
1622 2007-11-22 Eric Blake <ebb9@byu.net>
1624 Security fix: avoid arbitrary code execution with 'm4 -F'.
1625 * src/freeze.c (produce_frozen_state): Never pass raw file name as
1627 * NEWS: Document this fix.
1629 2007-11-07 Eric Blake <ebb9@byu.net>
1631 * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
1633 2007-11-05 Eric Blake <ebb9@byu.net>
1635 Use build-aux directory.
1636 * configure.ac (PACKAGE, VERSION): Delete, since Automake does
1638 (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
1639 instead of the top level.
1640 (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
1641 * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
1642 * bootstrap: Adjust accordingly.
1643 * m4/gnulib-cache.m4: Add --aux-dir option.
1644 * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
1646 2007-10-31 Eric Blake <ebb9@byu.net>
1648 Test more corner cases.
1649 * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
1650 (Improved foreach): Document alternate foreachq style.
1652 2007-10-28 Eric Blake <ebb9@byu.net>
1654 More test coverage for autoconf usage patterns.
1655 * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
1656 (Builtin): Add new undocumented tests.
1657 (Shift): Document cond macro, and add new test.
1659 2007-10-27 Eric Blake <ebb9@byu.net>
1661 Document one use of changequote(`(',`)').
1662 * doc/m4.texinfo (Changequote): Add new test, based on recent
1663 autoconf addition of m4_expand.
1665 2007-10-22 Eric Blake <ebb9@byu.net>
1667 Never let printf failures go undetected.
1668 * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
1669 intprops, strtod, and xprintf modules. Remove deprecated free
1670 module. Replace vasprintf-posix and xvasprintf with
1672 * src/m4.h: Include xprintf.h.
1673 * src/builtin.c (ntoa): Export.
1674 (m4_errprint): Adjust all *printf callers.
1675 * src/debug.c (debug_message_prefix, trace_format): Likewise.
1676 * src/freeze.c (produce_frozen_state): Likewise.
1677 * src/input.c [DEBUG_INPUT]: Likewise.
1678 * src/m4.c (usage): Likewise.
1679 * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
1680 (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
1681 * src/output.c (shipout_text, freeze_diversione): Likewise.
1682 * src/path.c [DEBUG_INCL]: Likewise.
1683 * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
1684 * src/symtab.c [DEBUG_SYM]: Likewise.
1686 2007-10-17 Eric Blake <ebb9@byu.net>
1688 Fix 'm4 -F file -t undefined'.
1689 * src/freeze.c (produce_frozen_state): Avoid core dump.
1690 * doc/m4.texinfo (Using frozen files): Test for the bug.
1691 * NEWS: Mention the fix.
1693 2007-10-09 Eric Blake <ebb9@byu.net>
1695 Avoid regexp regression.
1696 * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
1698 2007-10-02 Eric Blake <ebb9@byu.net>
1700 Add more examples and tests.
1701 * doc/m4.texinfo (Patsubst): Use the examples directory. Also
1703 (Improved capitalize): New node.
1704 (Index macro, Regexp): Test more code paths.
1705 * examples/capitalize.m4: Update to match manual.
1706 * examples/capitalize2.m4: New file.
1707 * examples/foreachq3.m4: Likewise.
1708 * examples/join.m4: Likewise.
1709 * examples/loop.m4: Likewise.
1710 * examples/wraplifo.m4: Likewise.
1711 * examples/wraplifo2.m4: Likewise.
1712 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
1714 2007-09-24 Eric Blake <ebb9@byu.net>
1716 Create .gitignore alongside .cvsignore.
1717 * bootstrap (LC_ALL): Set up front.
1718 (version control) Borrow idea from head, to avoid churn in
1719 m4/.*ignore files modified by gnulib-tool.
1721 2007-09-13 Eric Blake <ebb9@byu.net>
1723 * AUTHORS: Fix typo.
1725 2007-09-07 Eric Blake <ebb9@byu.net>
1727 * AUTHORS: Simplify, to match libtool and autoconf layout.
1728 * THANKS: Sync with head.
1730 2007-08-10 Eric Blake <ebb9@byu.net>
1732 * doc/m4.texinfo (Compatibility): Sync with head.
1734 2007-08-10 Konrad Schwarz <konrad.schwarz@siemens.com> (tiny change)
1735 and Eric Blake <ebb9@byu.net>
1737 * doc/m4.texinfo (Defn): Update wording.
1739 2007-08-09 Eric Blake <ebb9@byu.net>
1741 POSIX requires defn(`a',`b') to concatenate definitions.
1742 * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
1743 trying to mix a builtin with anything else.
1744 * doc/m4.texinfo (Defn): Document a use for this POSIX
1746 (Incompatibilities): Update to match current status.
1747 * NEWS: Document this change.
1749 Reported by Konrad Schwarz.
1751 2007-08-04 Eric Blake <ebb9@byu.net>
1753 Normalize all GPL license notices.
1754 * GNUmakefile: Update license wording.
1755 * Makefile.am: Likewise.
1756 * Makefile.maint: Likewise.
1757 * bootstrap: Likewise.
1759 * configure.ac: Likewise.
1760 * checks/Makefile.in: Likewise.
1761 * doc/Makefile.am: Likewise.
1762 * examples/Makefile.am: Likewise.
1763 * src/Makefile.am: Likewise.
1764 * src/builtin.c: Likewise.
1765 * src/debug.c: Likewise.
1766 * src/eval.c: Likewise.
1767 * src/format.c: Likewise.
1768 * src/freeze.c: Likewise.
1769 * src/input.c: Likewise.
1770 * src/m4.c: Likewise.
1771 * src/m4.h: Likewise.
1772 * src/macro.c: Likewise.
1773 * src/output.c: Likewise.
1774 * src/path.c: Likewise.
1775 * src/stackovf.c: Likewise.
1776 * src/symtab.c: Likewise.
1778 2007-07-21 Eric Blake <ebb9@byu.net>
1780 Fix regression on NetBSD from 2007-05-28.
1781 * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
1783 * NEWS: Document this fix.
1785 Reported by Thomas Klausner.
1787 2007-07-20 Eric Blake <ebb9@byu.net>
1789 Fix 'make distcheck' issues.
1790 * Makefile.am (EXTRA_DIST): No need to distribute
1791 gpl-3.0.texi.diff anymore.
1792 * m4/gnulib-cache.m4: Update to latest gnulib.
1794 2007-07-14 Eric Blake <ebb9@byu.net>
1796 Reflect upstream license .texi changes.
1797 * doc/m4.texinfo (Copying): Rename node...
1798 (GNU General Public License): ...to this.
1799 (GNU Free Documentation License): Adjust node location.
1800 * local/doc/gpl-3.0.texi.diff: Remove file.
1802 2007-07-10 Eric Blake <ebb9@byu.net>
1805 * configure.ac (AC_INIT): Bump version number.
1806 * NEWS: Start changes since 1.4.10.
1807 * doc/m4.texinfo (History): Mention 1.4.11.
1808 (Copying This Package, Copying This Manual): Add index entries.
1809 * local/lib/version-etc.c.diff: Delete, now that gnulib has been
1811 * Makefile.am (EXTRA_DIST): Remove dead file.
1813 2007-07-09 Eric Blake <ebb9@byu.net>
1815 Release Version 1.4.10.
1816 * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
1817 * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
1818 * configure.ac (AC_INIT): Bump version number.
1819 * NEWS: Describe changes since 1.4.9.
1821 * src/format.c: Missed a GPLv3 conversion.
1823 Avoid undefined behavior of %.*c in printf.
1824 * src/format.c (format): Special case %c.
1825 * TODO: Document that more remains to be done.
1826 * NEWS: Document the fix.
1828 2007-07-05 Eric Blake <ebb9@byu.net>
1830 Fix up gnulib-tool usage.
1831 * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
1832 * version-etc.c.diff: Move to...
1833 * local/lib/version-etc.c.diff: ...here.
1834 * gpl-3.0.texi.diff: Move to...
1835 * local/doc/gpl-3.0.texi.diff: ...here.
1837 2007-07-04 Eric Blake <ebb9@byu.net>
1839 Upgrade to GPL version 3 or later.
1840 * bootstrap: Pick up GPLv3.
1841 * m4/gnulib-cache.m4: Augment with 'gnulib-tool
1842 --local-dir=. --import gpl-3.0'.
1843 * doc/m4.texinfo (Copying This Package): New appendix.
1844 * NEWS: Mention this change.
1845 * README: Mention why some files still claim to be version 2.
1846 * version-etc.c.diff: New file, to make sure --version claims
1847 correct GPL version. Temporary until gnulib makes move.
1848 * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
1849 appendix, rather than section, of the manual.
1850 * GNUmakefile: Update to new license.
1851 * Makefile.am: Likewise.
1852 * Makefile.maint: Likewise.
1854 * configure.ac: Likewise.
1855 * checks/Makefile.in: Likewise.
1856 * doc/Makefile.am: Likewise.
1857 * examples/Makefile.am: Likewise.
1858 * src/Makefile.am: Likewise.
1859 * src/builtin.c: Likewise.
1860 * src/debug.c: Likewise.
1861 * src/eval.c: Likewise.
1862 * src/freeze.c: Likewise.
1863 * src/input.c: Likewise.
1864 * src/m4.c: Likewise.
1865 * src/m4.h: Likewise.
1866 * src/macro.c: Likewise.
1867 * src/output.c: Likewise.
1868 * src/path.c: Likewise.
1869 * src/stackovf.c: Likewise.
1870 * src/symtab.c: Likewise.
1872 2007-06-26 Eric Blake <ebb9@byu.net>
1874 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
1876 2007-06-26 Karl Berry <karl@freefriends.org> (tiny change)
1878 Match Free Software Directory categories.
1879 * doc/m4.texinfo (dircategory): Update.
1881 2007-05-31 Eric Blake <ebb9@byu.net>
1883 * src/output.c (output_text): Fix regression from 2007-05-28.
1884 * doc/m4.texinfo (History): Mention 1.4.10.
1885 (Format): Make testsuite output easier to debug.
1887 2007-05-29 Eric Blake <ebb9@byu.net>
1890 * configure.ac (AC_INIT): Bump version number.
1891 * NEWS: Start changes since 1.4.9b, and fix typo.
1893 Beta Release Version 1.4.9b.
1894 * configure.ac (AC_INIT): Bump version number.
1895 * NEWS: Describe changes since 1.4.9.
1897 Improve format support.
1898 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
1900 * src/format.c (format): Parse %'hhd, %a, %A. Avoid calling
1901 printf with too few arguments, as in format(%*.*d,-1,-1,1).
1902 * doc/m4.texinfo (Format): Expand tests, and improve
1904 * NEWS: Document this change.
1906 2007-05-28 Eric Blake <ebb9@byu.net>
1908 Fix large diversion corner cases, including 1.4.8 regression.
1909 * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
1910 (make_room_for): Use NULL, not 0, for pointers.
1911 (insert_diversion_helper): Avoid using rewind.
1912 (freeze_diversions): Allow freezing large diversions.
1913 * NEWS: Document this fix.
1915 Also run gnulib unit tests during make check.
1916 * m4/gnulib-cache.m4: Augment with 'gnulib-tool
1917 --tests-base=tests --with-tests'.
1918 * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
1919 * Makefile.am (SUBDIRS): Run gnulib tests before ours.
1921 2007-05-25 Eric Blake <ebb9@byu.net>
1923 Backport prompts in examples from head.
1924 * src/macro.c (expand_macro): Shorten message.
1925 * doc/m4.texinfo (Manual, Command line files, Comments)
1926 (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
1927 (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
1928 (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
1929 (Using frozen files, Improved forloop, Improved foreach): Add
1930 prompts to examples.
1931 * checks/get-them: Ignore prompts in examples.
1933 Fix sync line interaction with multiline comments.
1934 * doc/m4.texinfo (Other Incompatibilities): Add example, and
1935 document bug in --syncline/divert interaction.
1936 (Preprocessor features): Augment test.
1937 * src/m4.h (output_text): Export.
1938 (shipout_text, next_token): Add parameter.
1939 * src/freeze.c (reload_frozen_state): Don't interfere with
1940 synclines when reloading state.
1941 * src/output.c (output_text): Export.
1942 (shipout_text): Take new parameter for start line of token.
1943 Output at most one syncline per token.
1944 * src/input.c (next_token): Report line where multiline tokens
1946 * src/macro.c (expand_input, expand_token, expand_argument):
1947 Adjust callers so that line is passed from input to output.
1948 * NEWS: Document this fix.
1949 Reported by Sergey Poznyakoff.
1951 Test -s in testsuite.
1952 * doc/m4.texinfo (Preprocessor features): Add a test.
1953 * checks/get-them: Support extra options in testsuite.
1954 * checks/check-them (examples): Use extra options.
1956 Reported by Sergey Poznyakoff.
1958 2007-05-24 Eric Blake <ebb9@byu.net>
1960 Support POSIX flush semantics on all platforms.
1961 * m4/gnulib-cache.m4: Remove closeout, and augment with
1962 'gnulib-tool --import closein fflush'.
1963 * src/m4.h (includes): Use closein, not closeout.
1964 * src/m4.c (main): Ensure stdin is flushed when not all input is
1966 (process_file): No return needed.
1967 * src/debug.c (debug_flush_files): Rely on gnulib module, rather
1968 than excluding mingw.
1969 * NEWS: Document this change.
1971 Work around cygwin and mingw fseeko bugs.
1972 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
1973 * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
1975 2007-04-25 Eric Blake <ebb9@byu.net>
1977 Fix negative division within eval, regression of 2007-01-06.
1978 * doc/m4.texinfo (Eval): Catch this bug.
1979 * src/eval.c (mult_term): Fix it.
1980 * NEWS: Document this.
1982 Reported by Cesar Strauss.
1984 2007-04-23 Eric Blake <ebb9@byu.net>
1987 * configure.ac (AC_INIT): Bump version number.
1988 * NEWS: Start changes since 1.4.9.
1990 2007-03-23 Eric Blake <ebb9@byu.net>
1993 * configure.ac (AC_INIT): Bump version number.
1994 * NEWS: Describe changes since 1.4.8b.
1996 2007-03-16 Eric Blake <ebb9@byu.net>
1998 * doc/m4.texinfo (Mkstemp): Tweak wording.
1999 * src/output.c (output_init): Adjust to latest gnulib.
2001 2007-03-15 Eric Blake <ebb9@byu.net>
2003 Avoid Tandem/NSK's broken long long (without a symmetric unsigned
2004 long long, it confuses gnulib).
2005 * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
2006 if unsigned long long doesn't work.
2008 Reported by Matthew Woehlke.
2010 2007-03-07 Eric Blake <ebb9@byu.net>
2013 * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
2015 2007-03-01 Eric Blake <ebb9@byu.net>
2017 * doc/m4.texinfo: Pick up more index entries from head. Follow
2018 more texinfo recommendations.
2019 (Sysval): Improve tests.
2021 Avoid overfull \vbox warning from texinfo, due to indices that
2022 weren't quite big enough to split across page boundaries.
2023 * doc/m4.texinfo: Add lots of concept index entries.
2024 (Concept Index): Move to be last, as recommended by texinfo
2026 (Define, Arguments, Pseudo Arguments): Add more function entries.
2028 2007-02-28 Eric Blake <ebb9@byu.net>
2030 * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
2032 (Pseudo Arguments): Add useful example.
2034 * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
2035 reflect POSIX XCU ERN 118.
2037 * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
2038 * src/m4.c (usage): ...here,...
2039 * src/builtin.c (set_macro_sequence): ...and here.
2040 (define_user_macro): Fix typo.
2041 * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
2043 (Shift): Document composite macro argn for portably getting at
2044 positional parameters beyond 9.
2045 * configure.ac (AC_INIT): Bump version number.
2046 * NEWS: Start changes of 1.4.8c.
2048 2007-02-24 Eric Blake <ebb9@byu.net>
2050 Beta Release 1.4.8b:
2051 * configure.ac (AC_INIT): Bump version number.
2052 * NEWS: Describe changes since 1.4.8.
2054 Reserve all uses of raw ${} in macro definitions, not just
2056 * src/builtin.c (set_macro_sequence): Change default macro
2058 * doc/m4.texinfo (Operation modes): Update to match.
2059 * src/m4.c (usage): Likewise.
2062 2007-02-23 Eric Blake <ebb9@byu.net>
2064 * src/m4.h (includes): Update to latest gnulib.
2066 2007-02-08 Eric Blake <ebb9@byu.net>
2068 Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
2069 more flexible, and so that autoconf can use it.
2070 * src/m4.h (set_macro_sequence, free_macro_sequence): New
2072 * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
2073 (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
2074 New variables and functions.
2075 (define_user_macro): Allow flexibility in regular expression used
2077 * src/m4.c (warn_syntax): Delete.
2078 (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
2079 spelling of option, along with optional argument.
2080 * doc/m4.texinfo (Operation modes, Arguments): Document this
2082 * NEWS: Document this change.
2084 2007-02-05 Eric Blake <ebb9@byu.net>
2086 * m4/gnulib-cache.m4: Module strstr no longer exists.
2088 Avoid bool bitfields, as they don't work on AIX.
2089 * src/m4.h (bool_bitfield): New typedef.
2090 (struct symbol, struct builtin): Use it.
2091 * src/input.c (struct input_block): Likewise.
2092 Reported by Albert Chin.
2094 * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
2095 Reported by Albert Chin.
2098 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
2100 * doc/m4.texinfo (Input processing): Further clarifications.
2102 2007-02-03 Eric Blake <ebb9@byu.net>
2104 * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
2106 Reported by Bruno Haible.
2108 2007-02-01 Eric Blake <ebb9@byu.net>
2110 * src/m4.c (fatal_warnings): New variable.
2111 (usage): Document new -E behavior.
2112 (main): Make -E an additive option.
2113 (m4_error, m4_error_at_line): Change exit status when required.
2114 * NEWS: Document this change.
2115 * doc/m4.texinfo (Operation modes): Likewise.
2116 Reported by Ralf Wildenhues.
2118 2007-01-27 Eric Blake <ebb9@byu.net>
2120 * src/m4.h (warn_syntax): Declare.
2121 (init_pattern_buffer): Export.
2122 * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
2123 (long_options, main): Implement new option.
2124 * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
2125 (define_user_macro): Warn on $11 and ${1} if requested.
2126 * src/input.c (init_pattern_buffer): Delete duplicate method.
2127 * doc/m4.texinfo (Operation modes): Document it.
2128 (Arguments): Document future direction of ${11} vs. $11.
2129 (Incompatibilities): Fix wording on POSIX limitations.
2130 * checks/get-them: Parse @{ and @} correctly.
2131 * NEWS: Document this change.
2133 2007-01-26 Eric Blake <ebb9@byu.net>
2135 * src/builtin.c (includes): Adjust to gnulib changes.
2137 2007-01-15 Eric Blake <ebb9@byu.net>
2139 * doc/m4.texinfo: Pull in various improvements from head.
2140 * src/builtin.c (include): Alter exit status on failure.
2141 * NEWS: Document this fix.
2143 2007-01-13 Eric Blake <ebb9@byu.net>
2145 * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
2146 assume the fallback of ss_base for BSDI 4.0.1.
2147 * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
2148 ! HAVE_STACK_T_SS_SP]: Use this check.
2149 Reported by Chris McGuire.
2151 * NEWS: Document the improvement.
2153 2007-01-09 Eric Blake <ebb9@byu.net>
2155 * src/eval.c (ASSIGN): New enumerator.
2156 (eval_lex): Recognize '='.
2157 (equality_term): Treat '=' like '==', but warn that it is
2159 * doc/m4.texinfo (Eval): Document and test this.
2160 (Incompatibilities): Document the POSIX incompatibility.
2161 * NEWS: Document this change.
2163 2007-01-06 Eric Blake <ebb9@byu.net>
2165 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
2166 * checks/check-them: Record expected exit status.
2167 * checks/get-them: Check exit status.
2168 * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
2170 * src/builtin.c: All users changed.
2171 * src/eval.c: Likewise. Also document where we are triggering
2172 undefined or implementation-defined behavior.
2173 (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
2174 (logical_or_term, logical_and_term, logical_not_term, not_term)
2175 (equality_term, unary_term): Port from head to follow POSIX
2177 (exp_term): Reject 0**0 as undefined.
2178 * doc/m4.texinfo (History): Mention 1.4.9.
2179 (Format, Incompatibilities): Update to document POSIX compliance.
2180 * NEWS: Document this change.
2182 2007-01-04 Eric Blake <ebb9@byu.net>
2184 * NEWS: Document previous fix.
2187 2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
2189 Fix Debian bug 405594, introduced 2006-11-01 from a bad
2190 copy-n-paste from head.
2191 * src/m4.c (main): Use correct file name after --.
2193 2007-01-04 Eric Blake <ebb9@byu.net>
2195 Fix regression from 1.4.7 in large file handling on some
2196 platforms, introduced on 2006-10-13.
2197 * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
2199 * NEWS: Document this fix.
2201 2007-01-03 Eric Blake <ebb9@byu.net>
2203 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2205 * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
2206 it bumps the copyright year).
2208 2006-12-27 Eric Blake <ebb9@byu.net>
2210 * doc/m4.texinfo (Patsubst): Fix typo.
2212 2006-12-16 Eric Blake <ebb9@byu.net>
2214 * src/m4.c (main): Check for errors when closing stdin.
2216 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2218 * doc/m4.texinfo: Fix some typos.
2220 2006-12-09 Eric Blake <ebb9@byu.net>
2222 * configure.ac (AC_INIT): Bump version number.
2223 * NEWS: Start changes of 1.4.8a.
2225 2006-11-20 Eric Blake <ebb9@byu.net>
2228 * configure.ac (AC_INIT): Bump version number.
2229 * NEWS: Describe changes since 1.4.7.
2231 2006-11-16 Eric Blake <ebb9@byu.net>
2233 * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
2234 Minor tweaks noticed while porting to head.
2236 2006-11-14 Eric Blake <ebb9@byu.net>
2238 * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
2240 (m4_tmpname): Avoid memory leak.
2242 2006-11-13 Eric Blake <ebb9@byu.net>
2244 * src/output.c (cleanup_tmpfile): Avoid double error message when
2245 umask is prohibitive.
2246 (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
2248 (m4_tmpfile): Add parameter, move cloexec action here.
2249 (make_room_for): Adjust caller. Don't keep too many files open.
2250 (insert_diversion_helper): Unlink emptied temp files.
2251 (make_diversion): Don't keep too many files open.
2252 * doc/m4.texinfo (Diversions): Tweak wording, now that open file
2253 descriptors are no longer a limiting factor.
2254 * NEWS: Document this change.
2256 Backport sparse diversion handling from head.
2257 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2259 * src/output.c (struct m4_diversion): Rename from struct
2260 diversion, and update members. All users changed.
2261 (diversion_table): Change to an ordered set, instead of an array.
2262 (div0): New storage for diversion 0.
2263 (diversions): No longer needed.
2264 (free_list): New list to allow recycling diversion storage.
2265 (diversion_storage): New storage to reduce malloc overhead.
2266 (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
2267 (output_init, output_exit, cleanup_tmpfile, make_room_for)
2268 (make_diversion): Handle new diversion storage scheme.
2269 (insert_diversion_helper): New function.
2270 (insert_diversion, undivert_all, freeze_diversions): Use it.
2271 * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
2272 exhaustion to visible test of large diversion numbers.
2273 * NEWS: Document this fix.
2275 2006-11-11 Eric Blake <ebb9@byu.net>
2277 * src/builtin.c (m4_translit): Slight optimization.
2279 * src/m4.h (to_uchar): Depend on HAVE_INLINE.
2281 * src/builtin.c: Remove unnecessary casts.
2282 (expand_ranges): Make 8-bit clean.
2283 * doc/m4.texinfo (Translit): Add tests and wording.
2284 * NEWS: Document this fix.
2286 2006-11-07 Eric Blake <ebb9@byu.net>
2288 * src/m4.h (output_exit): New prototype.
2289 * src/m4.c (main): Use it.
2290 * src/output.c (cleanup_tmpfile): Close files before removing
2292 (insert_diversion): Check for failure.
2293 (output_exit): Avoid memory leak.
2294 * doc/m4.texinfo (Diversions): Test this bug.
2296 * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
2298 2006-11-01 Eric Blake <ebb9@byu.net>
2300 Allow C++ compilation on Linux, as a safety measure in type
2302 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2304 * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
2305 (boolean): Kill this, and use stdbool.h instead.
2306 * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
2307 * src/output.c, src/symtab.c: All users changed.
2308 * src/symtab.c (hack_all_symbols): Update prototype.
2309 * src/builtin.c (dump_symbol, set_trace): Update signature.
2310 (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
2311 (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
2313 * src/debug.c (trace_flush): Likewise.
2314 * src/freeze.c (reload_frozen_state): Likewise.
2315 * src/input.c (push_file, push_string_finish, push_wrapup):
2316 (token_bottom, next_token): Likewise.
2317 * src/m4.c (main): Likewise.
2319 * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
2321 * src/m4.h (m4_path_search): Tweak signature.
2322 * src/path.c (m4_path_search): Likewise.
2323 * src/builtin.c (include): Update caller.
2324 * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
2325 with file names. Don't write to **argv.
2326 (process_file): New helper method.
2327 * NEWS: Document this fix.
2329 2006-10-31 Eric Blake <ebb9@byu.net>
2331 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
2332 * doc/m4.texinfo (Translit): Improve the documentation.
2333 * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
2335 (m4_index): Simplify, and speed up slightly.
2336 * NEWS: Document this fix.
2338 2006-10-28 Eric Blake <ebb9@byu.net>
2340 * src/input.c (set_quotes): Don't allow empty end-quote with
2341 non-empty start-quote.
2342 (set_comment): Likewise for end-comment.
2343 * src/builtin.c (m4_changecom): Adjust caller.
2344 * doc/m4.texinfo (Changequote, Changecom): Update documentation to
2346 (Incompatibilities): Document another POSIX bug.
2347 * NEWS: Mention this change.
2349 2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2351 * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
2354 2006-10-26 Eric Blake <ebb9@byu.net>
2356 Silence -Wwrite-strings -Wpointer-arith warnings.
2357 * src/builtin.c (define_user_macro): Allow NULL argument.
2358 (m4_builtin, m4_indir): Cast away const of "".
2359 * src/format.c (format): Likewise.
2360 * src/macro.c (collect_arguments): Likewise.
2361 (expand_macro): Avoid math on void*.
2362 * src/m4.c (main): Adjust caller.
2363 * src/output.c (freeze_diversions): Detect off_t overflow.
2365 * src/input.c (pop_input): Remove unnecessary code.
2367 2006-10-25 Eric Blake <ebb9@byu.net>
2369 * src/symtab.c (symtab_init): Avoid size_t overflow.
2370 * src/output.c (make_diversion): Avoid size_t overflow.
2371 * doc/m4.texinfo (Diversions): Test this fix.
2372 * src/input.c (input_block): Remove unused member. Reduce size
2374 (push_file, pop_input): Avoid useless assignment.
2375 * NEWS: Document the bug fix.
2377 Redo location tracking. Instead of having just files track the
2378 line to return to when popping input, now all input blocks track
2380 * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
2382 (input_block): Have line and file storage for all input types, and
2383 rename some members.
2384 (input_change): New global flag.
2385 (push_file, push_macro, push_string_init, push_wrapup): Store
2387 (push_string_finish, pop_input, pop_wrapup): Notice changes in
2389 (peek_input): Adjust to new member names.
2390 (next_char, next_char1): Adjust location if needed.
2391 (skip_line): Simplify restoring location.
2392 * doc/m4.texinfo (Location): Augment the test to catch line
2393 location of expansion of multi-line arguments.
2394 Reported by Stepan Kasal.
2396 2006-10-23 Eric Blake <ebb9@byu.net>
2398 * doc/m4.texinfo (Macro Arguments): Document that leading space
2399 in argument collection stops at macro expansion.
2400 (Incompatibilities): Document POSIX whitespace wording issue.
2402 2006-10-20 Eric Blake <ebb9@byu.net>
2404 * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
2405 TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
2406 end of a TeX line splits incorrectly.
2407 (Foreach, Improved foreach): Write these sections, borrowing ideas
2408 from CVS head and from m4sugar.
2409 * checks/get-them: Accomodate new way to show trailing space in
2411 * examples/foreach.m4: Make usable in documentation.
2412 * examples/foreachq.m4: New file.
2413 * examples/foreachq2.m4: New file.
2414 * examples/foreach2.m4: New file.
2415 * NEWS: Document the documentation updates.
2417 2006-10-19 Eric Blake <ebb9@byu.net>
2419 * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
2420 (m4_maketemp): Provide traditional behavior.
2421 * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
2422 new `mkstemp' macro and the flaws of the old `maketemp'.
2423 (Incompatibilities): Move maketemp discussion to...
2424 (Extensions): ...here, since -G now supresses the GNU extension.
2425 * NEWS: Document this.
2427 * examples/forloop.m4: Simplify.
2428 * examples/forloop2.m4: New file.
2429 * examples/quote.m4: New file.
2430 * doc/m4.texinfo (Loops): Rename to...
2431 (Shift): ...this node.
2432 (Forloop, Foreach, Improved forloop, Improved foreach): New
2435 2006-10-17 Eric Blake <ebb9@byu.net>
2437 * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
2439 * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
2440 gnulib headers, rather than in top directory.
2441 * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
2444 2006-10-16 Eric Blake <ebb9@byu.net>
2446 * doc/m4.texinfo: Backport some minor cleanups from head.
2447 (Cleardivert): Rename from cleardiv.
2449 * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
2450 a section of Preliminaries.
2451 (Operation modes, Preprocessor features, Limits control)
2452 (Frozen state, Debugging options, Command line files): Subdivide
2454 (Input processing, Quoting Arguments, Define, Arguments)
2455 (Cleardiv, Format, M4exit): Fix grammar of references.
2456 (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
2457 (Debug Levels, Debug Output, Include, Search Path, Divert)
2458 (Platform macros, Syscmd, Location, Extensions): Point to new
2460 (Top, Loops, Include, Undivert, Location, Incompatibilities):
2461 Improve file references.
2463 2006-10-14 Eric Blake <ebb9@byu.net>
2465 * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
2467 Reported by Ralf Wildenhues.
2469 * src/builtin.c (m4_undivert): Check for read error.
2471 2006-10-13 Eric Blake <ebb9@byu.net>
2473 * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
2474 header files are included, since <unistd.h> can affect the tests.
2476 Reported by Martin Koeppe.
2478 Backport head's usage of clean-temp module, as it is cleaner than
2479 using tmpfile-safer.
2480 * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
2481 clean-temp closeout', and remove tmpfile-safer.
2482 * src/m4.h (includes): Adjust.
2483 (m4_path_search): Rename from path_search, to avoid collision
2485 * src/m4.c (main): Install closeout handler. Adjust caller.
2486 (usage): Now done by closeout module.
2487 * src/builtin.c (m4_m4exit): Likewise.
2488 (m4_undivert, include): Adjust callers.
2489 * src/freeze.c (reload_frozen_state): Likewise.
2490 * src/path.c (m4_path_search): Rename from path_search.
2491 * src/output.c (output_temp_dir): New variable.
2492 (cleanup_tmpfile, m4_tmpfile): New functions, from head.
2493 (insert_diversion, make_room_for): Use them.
2494 * doc/m4.texinfo (Diversions): Document this, and add a test.
2495 (Improved fatal_error): Fix typo.
2496 (Maketemp): Port test to mingw, and no longer hide from
2498 * NEWS: Document the change in TMPDIR behavior.
2500 * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
2501 macros, to work with recent gnulib-tool update.
2503 * src/builtin.c (m4_builtin, m4_indir): Allow transparent
2504 handling of defn results.
2505 * doc/m4.texinfo (Builtin, Indir): Add test cases.
2506 * NEWS: Document this.
2508 2006-10-12 Eric Blake <ebb9@byu.net>
2510 * doc/m4.texinfo (Location): Fix typo in previous commit.
2511 (Changeword): Catch one more case.
2512 * src/input.c (skip_line): Fix case when outer file used macro to
2515 2006-10-11 Eric Blake <ebb9@byu.net>
2517 * src/input.c (enum input_type): Add additional types, to shave
2518 time off the common case.
2519 (push_wrapup): Wrapped strings remember location.
2520 (push_string_finish): Normal strings carry no location.
2521 (push_file): Start new files uninitialized.
2522 (peek_input, next_char_1): Optimize common cases by updating
2523 location only on new input types.
2524 (pop_input): Update to honor new input types.
2525 (skip_line, push_string_finish): Fix regression in previous patch
2526 when dnl is not followed by newline in included file.
2527 (push_string_init): Initialize all fields of INPUT_STRING sooner.
2528 (peek_token): Simplify.
2529 (peek_input): Don't pop input files on peek, so that __file__ and
2530 __line__ as last token of include file work correctly.
2531 * doc/m4.texinfo (History): Mention 1.4.8.
2532 (Answers): Split into sections, one per answer.
2533 (Improved exch, Improved cleardivert, Improved fatal_error): New
2535 (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
2536 new m4wrap location semantics.
2537 (Changeword): Add test that caught the regression.
2538 * NEWS: Document this.
2540 * src/macro.c (expand_macro): In macro expansion errors, report
2541 line number at open parenthesis.
2542 * src/input.c (next_token): Fix off-by-one bug in reporting end
2543 of file in unterminated comment and string.
2544 (file_names): New obstack, necessary since expand_macro now hangs
2545 on to file names longer than the files remain open.
2546 (input_init): Initialize new obstack.
2547 (push_file): Use new obstack. Delay updates to current_file
2548 until after expand_macro has restored state.
2549 (peek_input, next_char_1): Update current_file if necessary.
2550 (pop_wrapup): Release memory.
2551 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
2553 (Dnl): Update to the new location reporting rules.
2554 * NEWS: Document these changes.
2556 2006-10-10 Eric Blake <ebb9@byu.net>
2558 * src/macro.c (argc_stack, argv_stack): New variables for sharing
2559 obstacks across multiple macro calls.
2560 (expand_input): Initialize and tear down stack once per input
2561 file, instead of once per macro.
2562 (expand_macro): Reuse existing stacks when possible.
2563 (collect_arguments): Simplify slightly.
2565 * src/path.c (include_env_init): Fix botched patch application.
2566 Reported by Ralf Wildenhues.
2568 2006-10-09 Eric Blake <ebb9@byu.net>
2570 * src/m4.c (usage, main): Detect write failures to stderr.
2571 * src/builtin.c (m4_m4exit): Likewise.
2572 * NEWS: Document this.
2574 * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
2576 * NEWS: Document this.
2577 * doc/m4.texinfo (Invoking m4): Likewise.
2579 2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2581 * src/path.c (include_env_init): Copy the string returned
2582 by getenv before overwriting it; POSIX disallows this.
2584 2006-10-09 Eric Blake <ebb9@byu.net>
2586 * src/m4.c (main): Defer debugfile until after --help.
2587 * configure.ac (AC_INIT): Bump version number.
2588 * NEWS: Start changes of 1.4.7a.
2590 2006-09-25 Eric Blake <ebb9@byu.net>
2593 * configure.ac (AC_INIT): Bump version number.
2594 * NEWS: Describe changes since 1.4.6.
2596 2006-09-21 Eric Blake <ebb9@byu.net>
2598 * doc/m4.texinfo (Invoking m4): Add clarification on option
2599 processing behavior.
2601 Reported by Mikhail Teterin.
2603 * bootstrap: Add --force option, based on idea from coreutils.
2604 * README: Document that ./bootstrap and autoreconf are for
2605 developers, and not lightly done in tarballs.
2607 2006-09-20 Eric Blake <ebb9@byu.net>
2609 * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
2610 deprecation warning on -e.
2611 * doc/m4.texinfo (Invoking m4, Extensions): Document this.
2612 * NEWS: Document this.
2614 2006-09-19 Eric Blake <ebb9@byu.net>
2616 * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
2617 -o/--error-output to --debugfile, and deprecate the former. This
2618 will allow a future release to be more consistent with other GNU
2619 tools, with -o/--output affecting stdout, not debug.
2620 * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
2621 * NEWS: Document this.
2623 2006-09-14 Eric Blake <ebb9@byu.net>
2625 * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
2626 --diversions. `m4 --help --version' now displays help, not
2628 (interactive, frozen_file_to_read, frozen_file_to_write): Move to
2630 (show_help, show_version): No longer needed.
2631 (long_options, DIVERSIONS_OPTION): Backport patch from head to
2632 distinguish between -N and --diversions in warning.
2633 * doc/m4.texinfo (Invoking m4): Document this.
2636 2006-09-11 Eric Blake <ebb9@byu.net>
2638 * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
2639 * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
2641 (debug_set_file): Use STDOUT_FILENO.
2642 * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
2643 with POSIX in regards to unread input.
2644 * NEWS: Document this fix.
2645 * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
2647 2006-09-07 Eric Blake <ebb9@byu.net>
2649 * m4/gnulib-cache.m4: Update to newer gnulib-tool.
2650 * src/m4.h (push_file): Change prototype.
2651 * src/input.c (push_file, peek_input, next_char_1): Only call getc
2652 once at EOF, to avoid double ^D on terminal stdin; regression from
2654 (push_file, pop_file): Allow reading stdin twice.
2655 * src/m4.c (main): Likewise.
2656 * src/builtin.c (include): Update caller.
2657 * NEWS: Document this change.
2658 * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
2659 (Syscmd): Add a test that failed before this patch.
2661 2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2663 * checks/check-them: Quote $pwd.
2665 2006-09-05 Eric Blake <ebb9@byu.net>
2667 * src/builtin.c (define_macro): Warn on invalid macro name.
2668 * NEWS: Document this change.
2669 * doc/m4.texinfo: Fix typos.
2670 (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
2671 (Ifelse): Backport some improvements from head.
2673 2006-09-04 Eric Blake <ebb9@byu.net>
2675 * doc/m4.texinfo (Changeword): Skip test on mingw, where the
2676 native echo is braindead.
2677 * checks/check-them (strip_needed): Ignore \r in output. Now the
2678 testsuite will pass when cross-compiling from cygwin to mingw.
2680 * src/input.c (peek_input): Fix regression in handling macro
2681 without arguments as last token in file; debian bug 385720.
2682 (next_token): Always consume an input character.
2683 Reported by Andreas Schultz.
2684 * configure.ac (AC_INIT): Bump version number.
2685 * NEWS: Document this fix.
2686 * doc/m4.texinfo (History): Mention next version.
2687 (Changeword): Add example that exposes this bug.
2690 2006-08-25 Eric Blake <ebb9@byu.net>
2693 * configure.ac (AC_INIT): Bump version number.
2694 * NEWS: Describe changes since 1.4.5.
2696 * Makefile.maint (web-manual): Give up on VPATH build during
2697 distribution. But distributions are made so infrequently that
2698 this is not too much of a hardship.
2699 * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
2702 2006-08-24 Eric Blake <ebb9@byu.net>
2704 * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
2705 Solaris, produce output on just one argument.
2706 (m4_regexp, m4_patsubst): For consistency, do likewise.
2707 (m4_patsubst): Allow zero-length match at end of string.
2708 * doc/m4.texinfo (Sysval): Fix overfull hbox.
2709 (Bugs, Macro Arguments): Minor fixes.
2710 (Other tokens): Rearrange node order.
2711 (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
2712 * NEWS: Document these fixes.
2714 2006-08-22 Eric Blake <ebb9@byu.net>
2716 * src/input.c (pop_input): Avoid empty filename with -di option.
2717 * src/debug.c (debug_message_prefix): Put space before message.
2719 * m4/gnulib-cache.m4: We don't explicitly use alloca module.
2721 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
2722 * Makefile.maint (fetch): Simplify, now that we can use gnupload.
2724 * checks/check-them: State why a test is skipped.
2725 * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
2727 * ChangeLog: Add copyright.
2728 * AUTHORS: Likewise.
2729 * BACKLOG: Likewise.
2733 * examples/COPYING: New file, add copyright for all the examples.
2734 * checks/get-them: Put copyright on testsuite files.
2736 2006-08-18 Eric Blake <ebb9@byu.net>
2738 Don't let unrelated child processes see too many files.
2739 * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
2740 * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
2741 spelling in error message.
2742 * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
2743 (debug_set_output): Close debug file on exec.
2744 * src/m4.h (includes): Add cloexec.h.
2745 * src/output.c (make_room_for): Close diversions on exec.
2746 * src/path.c (path_search): Close include files on exec.
2747 * NEWS: Document this.
2749 Regular expressions were leaking memory.
2750 * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
2752 (m4_regexp, m4_patsubst): Avoid memory leak.
2753 * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
2755 (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
2756 from O(n^2) to O(n) for calculating word_start.
2757 (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
2758 O(1) bitmap, not O(n) search string.
2759 * NEWS: Document this fix.
2761 2006-08-17 Eric Blake <ebb9@byu.net>
2763 * NEWS: Document previous checkin.
2765 * src/builtin.c (substitute): Avoid core dump when accessing
2766 beyond bound of regular expression.
2767 Reported by Karl Nelson.
2768 * doc/m4.texinfo (Regexp): Add example that causes core dump on
2769 some architectures prior to this patch.
2772 2006-08-16 Eric Blake <ebb9@byu.net>
2774 * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
2775 clear that dumpdef does not always go to stderr.
2777 * src/builtin.c (m4_errprint): Flush buffers before printing to
2781 2006-08-15 Eric Blake <ebb9@byu.net>
2783 * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
2784 per debian bug 96075.
2785 * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
2786 (Changeword): Don't use shift as an example of a swallowed word.
2787 (Divert): Discuss fact that divert is an English word.
2788 Reported by Richard A Nelson.
2790 2006-08-14 Eric Blake <ebb9@byu.net>
2792 * doc/m4.texinfo (Invoking m4): Minor fixes.
2794 2006-08-12 Eric Blake <ebb9@byu.net>
2796 * doc/m4.texinfo (Arguments): Hint at better exch macro.
2797 (Answers): Provide a better definition.
2799 2006-08-09 Eric Blake <ebb9@byu.net>
2801 * doc/m4.texinfo (Incompatibilities): Document that m4 does not
2802 yet understand locales.
2803 * NEWS: Fix wording of a few items.
2805 2006-08-08 Eric Blake <ebb9@byu.net>
2807 Avoid printing `NONE:0:' in error messages.
2808 * src/m4.h (m4_error_at_line): New function.
2809 * src/m4.c (m4_error_at_line): Implement.
2810 * src/input.c (skip_line, input_init, next_token): Use "", not
2811 "NONE", for no file, since NONE can be a real file name.
2812 * src/macro.c (expand_argument): Likewise.
2813 * src/debug.c (debug_message_prefix, trace_header): Check for
2815 * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
2816 (Location): Document that synclines and internal message format
2817 are not impacted by redefining these macros.
2818 (M4exit): Hint at bug in fatal_error.
2819 (Answers): Provide workaround to match m4 output.
2821 * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
2822 * src/m4.h (m4_error): New function.
2823 (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
2824 error module deficiencies.
2825 (reference_error, suppress_line): No longer needed.
2826 * src/m4.c (m4_error): Implement.
2827 (main): No longer need to install error callback.
2829 2006-08-04 Eric Blake <ebb9@byu.net>
2831 * src/m4.h (program_name): Declare.
2832 (suppress_line): New variable.
2833 (M4ERROR_AT_LINE): New macro.
2834 * src/m4.c (reference_error, main): Follow GNU Coding Standards
2835 for error message format.
2836 * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
2837 * src/macro.c (expand_argument): Likewise.
2838 * checks/check-them (examples): Adjust to new message format.
2839 * src/builtin.c (m4___program__): New builtin.
2840 * doc/m4.texinfo (Location): Split from Errprint into new node,
2841 and document __program__.
2842 (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
2843 (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
2845 (Extensions): Document __program__.
2846 * NEWS: Document this change.
2848 2006-08-03 Eric Blake <ebb9@byu.net>
2850 Don't confuse leading `(' in comment or quote with start of
2851 argument collection.
2852 * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
2854 (peek_input): Make private to input.c.
2855 (peek_token): New prototype.
2856 * src/input.c (default_word_regexp): Reduce ifdefs.
2857 (peek_input): Make static.
2858 (next_token): Return new token types.
2859 (match_input, MATCH): Add argument consume, which controls
2860 whether match should be pushed back.
2861 (peek_token): New function.
2862 (token_type_string) [DEBUG_INPUT]: New function.
2863 * src/macro.c (expand_token, expand_argument, collect_arguments):
2864 Handle new token types.
2865 * doc/m4.texinfo (Changequote, Changecom): Document this.
2866 * NEWS: Document this.
2868 * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
2870 * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
2871 overflow detection when sigstack exists but is not implemented.
2872 Fixes debian bug 154053.
2874 Reported by David Perlin.
2876 2006-08-02 Eric Blake <ebb9@byu.net>
2878 * src/input.c (MATCH): Fix EOF detection on multi-byte comment
2881 2006-08-01 Eric Blake <ebb9@byu.net>
2883 * src/input.c (skip_line, next_token): Remember current file in
2884 case input file ends abruptly. Addresses debian bug 175365.
2885 (pop_input): Defer freeing storage that holds previous file
2887 (pop_wrapup): to here, after error message is issued.
2888 * src/macro.c (expand_argument): Remember current file in case
2889 input file ends abruptly.
2890 * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
2891 (M4wrap): Adjust testsuite accordingly.
2892 (Errprint): Document line number limitation of m4wrap.
2893 * NEWS: Document this fix.
2896 2006-07-31 Eric Blake <ebb9@byu.net>
2898 * src/input.c (peek_input, next_char, match_input): Be eight-bit
2899 clean; fixes debian bug 311378.
2900 * doc/m4.texinfo (Syntax): Describe eight-bit handling.
2901 (Changequote, Changecom): Add examples to test this.
2902 * NEWS: Document this fix.
2904 Reported by Steven Augart.
2906 * doc/m4.texinfo: Whitespace fix.
2907 * checks/get-them: Avoid exceeding 14-char file name limit.
2910 2006-07-30 Eric Blake <ebb9@byu.net>
2912 * src/path.c (path_search): Detect allocation failure.
2914 Use native free when it is good enough.
2915 * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
2916 * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
2918 * src/symtab.c (free_symbol): Likewise.
2919 * src/m4.c (xfree, main): Likewise.
2920 * src/m4.h (obstack_chunk_free): Likewise.
2921 * src/path.c (path_search): Likewise.
2922 * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
2924 * doc/m4.texinfo (Errprint): Add example for last patch.
2925 * checks/check-them: Account for VPATH in latest example.
2927 2006-07-29 Eric Blake <ebb9@byu.net>
2929 * src/path.c (path_search): Add result parameter, so that
2930 -I can be accounted for. Debian bug 53685.
2931 * src/m4.h (path_search): Update prototype.
2932 * src/m4.c (main): Adjust callers.
2933 * src/freeze.c (reload_frozen_state): Likewise.
2934 * src/builtin.c (include, m4_undivert): Likewise.
2935 * NEWS: Document this change.
2936 Reported by Nicolas Lichtmaier.
2938 2006-07-28 Eric Blake <ebb9@byu.net>
2940 * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
2941 several non-GNU makes.
2942 * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
2943 * src/m4.h: Likewise.
2944 * src/input.c (push_wrapup): Avoid compiler warning with Solaris
2947 2006-07-27 Eric Blake <ebb9@byu.net>
2949 * doc/m4.texinfo: Use @acronym{GNU} throughout.
2950 (History): Update for 1.4.6.
2952 * src/m4.h (_): Remove K&R cruft.
2953 * src/builtin.c: Likewise.
2954 * src/debug.c: Likewise.
2955 * src/eval.c: Likewise.
2956 * src/macro.c: Likewise.
2957 * src/stackovf.c: Likewise.
2959 * doc/Makefile.am (m4.1): Improve man page.
2960 * src/m4.c (usage): Improve --help output, including adding the
2961 bug reporting address.
2962 (main): Follow GNU Coding Standards for --version output.
2964 2006-07-26 Eric Blake <ebb9@byu.net>
2966 * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
2967 end-comment consistently, to match POSIX.
2969 * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
2970 (Dnl, M4wrap, Include): Document EOF issues, and add examples.
2971 (Incompatibilities): Document incompatibility of changecom
2972 vs. macro names, and of EOF in include.
2973 * src/input.c (next_token): Reject unterminated comments at EOF.
2974 (skip_line): Warn on unterminated dnl at EOF.
2975 * NEWS: Document these changes.
2977 2006-07-25 Eric Blake <ebb9@byu.net>
2979 * m4/gnulib-cache.m4: Update to reflect gnulib's split of
2980 stdio-safer into fopen-safer and tmpfile-safer.
2981 * src/m4.c: Remove redundant include.
2983 2006-07-24 Eric Blake <ebb9@byu.net>
2985 Fix bugs related to stream handling.
2986 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
2987 unlocked-io stdio-safer stdlib-safer close-stream.
2988 * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
2989 provided by gnulib if needed.
2990 * src/output.c [! HAVE_TMPFILE]: Likewise.
2991 * src/m4.h (includes): Replace unistd, stdio, and stdlib with
2992 their safer counterparts.
2993 (retcode): New global variable.
2994 * src/input.c (pop_input): Check for read failure.
2995 * src/freeze.c (reload_frozen_state): Likewise.
2996 (produce_frozen_state): Check for write failure.
2997 * src/debug.c (debug_set_file): Likewise.
2998 * src/m4.c (usage, main): Likewise.
2999 (retcode): Make global.
3000 * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
3001 status is non-zero except when everything succeeds.
3002 * doc/m4.texinfo (M4exit): Document these changes.
3003 (Incompatibilities): Remove documentation of bug now fixed.
3004 * NEWS: Document these fixes.
3006 2006-07-22 Eric Blake <ebb9@byu.net>
3008 * src/format.c (format): Avoid compiler warning that str may be
3011 2006-07-21 Eric Blake <ebb9@byu.net>
3013 * src/m4.h [UNIX]: Add more platforms that are close enough to
3014 categorize as UNIX, but which don't predefine __unix__.
3015 Reported by Nelson H. F. Beebe.
3017 2006-07-20 Eric Blake <ebb9@byu.net>
3019 * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
3020 to explicitly ask for --assume-autoconf=2.60.
3022 2006-07-19 Eric Blake <ebb9@byu.net>
3024 * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
3025 and exits normally with 129.
3026 Reported by Nelson H. F. Beebe.
3029 * src/m4.h (EXIT_MISMATCH): Define.
3030 * src/freeze.c (reload_frozen_state): Detect version mismatch, by
3031 exiting with status 63.
3032 * src/m4.c (usage): Document this.
3033 * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
3036 * doc/m4.texinfo (copying): Relax restriction on front-cover and
3039 2006-07-17 Eric Blake <ebb9@byu.net>
3041 * src/format.c (format): Support F, g, and G specifiers.
3042 * doc/m4.texinfo (Format): Document this.
3043 * NEWS: Document this addition.
3045 * doc/m4.texinfo (Builtin): Delete redundant text.
3047 * configure.ac (AC_INIT): Bump version number.
3048 * src/builtin.c (substitute): Bah. Fix buffer overrun.
3049 * NEWS: Document this fix.
3051 2006-07-15 Eric Blake <ebb9@byu.net>
3054 * configure.ac (AC_INIT): Bump version number.
3055 * NEWS: Describe changes since 1.4.4.
3057 * src/m4.c (usage): Document exit status.
3058 * doc/m4.texinfo: Use `exit status', not `exit code'.
3059 (Invoking m4): Document exit status.
3061 * bootstrap: Backport --help, --version from head.
3062 (func_update): New function, for easily grabbing up-to-date files
3064 * Makefile.maint (web-manual): Fix for VPATH builds.
3066 2006-07-14 Eric Blake <ebb9@byu.net>
3068 * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
3069 looks bad in info. Use @deffn rather than @example for
3070 describing prototypes. Fix awkward wording and grammar.
3072 * src/builtin.c (substitute): Warn on bad escape sequences.
3073 Ignore trailing backslash.
3074 * doc/m4.texinfo (Regexp): Add documentation for this.
3075 * NEWS: Document this change.
3077 * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
3078 * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
3080 (Dnl): Update example to show side effects.
3081 * checks/get-them: Generate three digit test names.
3082 * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
3084 2006-07-13 Eric Blake <ebb9@byu.net>
3086 * src/input.c (input_init): Simplify.
3087 (set_word_regexp): Treat empty string as default, since empty
3088 regexp would disable word parsing.
3089 * src/m4.c (user_word_regexp): Default to empty string.
3090 * src/builtin.c (builtin_tab): Make changeword blind.
3091 * doc/m4.texinfo (Changeword): Document this.
3092 * NEWS: Document this.
3093 * TODO: Knock off completed items.
3095 * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
3097 * doc/m4.texinfo (Undefine, Pushdef): Test this.
3098 * NEWS: Document this change.
3100 * src/builtin.c (numeric_arg): Treat empty string as 0, with a
3101 warning. Detect quoted leading space and overflow as warnings.
3102 (m4_eval): Treat empty radix as 10, and allow output in radix 1.
3103 Treat width as minimum number of digits, as required by POSIX.
3104 (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
3106 (m4_substr): Likewise. Silently treat empty start as 0.
3107 (m4_undivert): Treat ` 1a' as file, not diversion 1.
3108 * src/eval.c (eval_lex): Parse radix 1 numbers.
3109 * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
3110 one type of warning.
3111 (Manual): Document behavior of numeric parsing of empty string.
3112 (Divert, Incr): Document error handling.
3113 (Eval): Document radices better.
3114 (Incompatibilities): Document translit incompatibility.
3115 * NEWS: Document these changes.
3117 * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
3118 (web-manual): Simplify.
3119 * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
3120 * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
3121 (MAINTAINERCLEANFILES): Clean it as well.
3122 * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
3123 (MAINTAINERCLEANFILES): Clean it as well.
3125 2006-07-12 Eric Blake <ebb9@byu.net>
3127 * doc/m4.texinfo (Extensions): Document how to overcome
3128 implementation difference in > 9 positional parameters.
3130 * src/m4.c (usage): Sort within sections.
3131 (nesting_limit): Raise default from 250 to 1024.
3132 * doc/m4.texinfo: Use file name, not filename, per GNU coding
3133 standard. Use @option where appropriate.
3134 (Invoking m4): Sort to match --help output.
3135 (Debug Levels): Sort.
3136 (Frozen files): Sort and break into two nodes.
3138 * src/m4.c (nesting_limit): Raise default from 250 to 1024.
3139 * NEWS: Document raised -L limit.
3141 2006-07-11 Eric Blake <ebb9@byu.net>
3143 * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
3144 stress-test changeword before a release.
3145 * doc/m4.texinfo: More doc cleanups.
3146 (Copying This Manual): New node; actually include the FDL in the
3148 * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
3149 * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
3150 * NEWS: Mention documentation improvements.
3152 * src/m4.h (OS2): New platform macro.
3153 * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
3155 * doc/m4.texinfo (Platform macros): Document it.
3156 (Sysval): Remove non-portable test of system("").
3157 * NEWS: Document this change.
3158 Reported by Andreas Buening.
3160 2006-07-09 Eric Blake <ebb9@byu.net>
3162 * doc/m4.texinfo (Undivert): Fix typo in last commit.
3163 * src/m4.c (usage): Document M4PATH.
3164 * src/path.c (path_search): Reject empty string.
3165 * src/output.c (insert_diversion): Ignore diversion 0.
3166 * src/builtin.c (m4_undivert): Ignore empty string.
3167 * NEWS: Document this fix.
3169 2006-07-08 Eric Blake <ebb9@byu.net>
3171 * checks/get-them: Make filtering easier.
3172 * checks/check-them: Filter non-input lines, so line counts are
3173 more realistic in the documentation, and so changeword tests work
3174 even when dnl is disabled.
3175 * doc/m4.texinfo: Adjust example line numbers. Clean up
3176 front-matter, following autoconf's example.
3177 (Changeword): Enable tests, skipping if changeword not supported.
3178 (Define, Defn, Ifelse): Backport more examples from head.
3179 (Input processing, Answers): New nodes, backported from head.
3180 (Include): Expand test to cover empty filename.
3181 (Undivert): Add test of undivert(0).
3183 2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3185 * doc/m4.texinfo: Fix spelling errors.
3187 2006-07-07 Eric Blake <ebb9@byu.net>
3191 * doc/Makefile.am (m4.1): No need to go through a temporary file;
3192 this also ensures timestamps are updated.
3193 * src/m4.h (includes): Require config.h. Assume string.h,
3194 stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
3195 than prototyping ourselves.
3196 (builtin_func): Add parameter type-checking.
3197 (voidstar): Delete, now that we assume C89.
3198 * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
3200 * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
3203 2006-07-06 Eric Blake <ebb9@byu.net>
3205 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
3207 * src/m4.h (includes): Add binary-io.h for O_BINARY.
3208 * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
3209 #ifdef. Fixes patch from 2005-02-03 for cygwin.
3210 * NEWS: Mention this fix.
3212 * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
3213 * src/builtin.c (m4_syscmd): Work around OS/2 bug.
3215 * Makefile.am (SUBDIRS): Build . before src, so that autoheader
3216 runs first when needed.
3217 * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
3218 once in srcdir rather than multiple times in VPATH builds.
3220 2006-07-03 Eric Blake <ebb9@byu.net>
3222 * checks/check-them: Use portable = in test.
3223 * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
3224 directory, as required by Solaris cc. Include built headers, as
3225 required by Solaris make in VPATH build.
3226 * checks/Makefile.in: Use $(srcdir) where needed.
3227 (CHECKS): Factor $(srcdir) into macro.
3228 (DISTFILES): Likewise. Automake takes care of distributing
3231 (Makefile): Use modern syntax of config.status.
3232 * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
3233 Avoid overfull and underfull hboxes in dvi.
3235 Fix 'make check' in VPATH build. All files included by testsuite
3236 now live in a single directory. Use forloop.m4 in testsuite.
3237 * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
3239 * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
3241 * checks/Makefile.in (DISTFILES): Don't distribute moved files.
3242 * examples/Makefile.am (EXTRA_DIST): Distribute new files.
3243 * checks/check-them: Avoid s/// when filename is in pattern.
3244 * examples/forloop.m4: Fix to match documentation.
3245 * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
3247 (Loops, Format): Actually use forloop.m4 in tests.
3249 2006-07-02 Eric Blake <ebb9@byu.net>
3251 * checks/Makefile.in (exec_prefix, prefix): New macros, so that
3252 $(bindir) works in installcheck.
3253 (check, installcheck): No longer change directory, so that
3254 distcheck works with a read-only builddir.
3255 * checks/check-them: Work when pwd is no longer builddir.
3257 2006-07-01 Eric Blake <ebb9@byu.net>
3259 * GNUmakefile: New file, borrowed from coreutils.
3260 * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
3261 * Makefile.maint (Makefile): Delete this rule, now that
3262 GNUmakefile includes Makefile.
3264 2006-06-30 Eric Blake <ebb9@byu.net>
3266 For compatibility with other m4 implementations, sysval returns
3267 signal<<8 rather than 0 if syscmd is terminated by a signal.
3268 * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
3269 * src/builtin.c (include): Include sys/wait.h when stdlib.h does
3270 not provide wait macros.
3271 (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
3272 (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
3273 (m4_esyscmd): Set sysval to -1 on failure.
3274 (m4_sysval): Print 127 on failure, and accomodate signals if they
3276 * NEWS: Document this change.
3277 * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
3279 * checks/check-them: Likewise.
3280 * src/debug.c (debug_set_file): Work around mingw fstat bug.
3282 * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
3283 * src/freeze.c (produce_frozen_state): Use new spelling of
3285 * src/builtin.c (predefined_tab): Add __windows__ on non-unix
3287 (m4_syscmd, m4_esyscmd): The empty command is successful.
3288 * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
3289 Document platform-dependence of system().
3290 (Syscmd): Add example.
3291 (Esyscmd): Make example more robust, and actually demonstrate
3293 (Sysval): Expand test to cover esyscmd code path, and to check
3294 that empty command is successful. Add conditional check for
3296 (Other Incompatibilities): Move platform macros from here...
3297 (Platform macros): ...to this new node. Add windows macro.
3298 Check that exactly one platform macro is provided.
3299 * checks/check-them: Improve trap cleanup. Tolerate dirname and
3300 .exe in error messages. Allow for skipping checks.
3301 * configure.ac (HAVE_EFGCVT): Kill dead configure check.
3302 * NEWS: Document platform macros.
3304 2006-06-29 Eric Blake <ebb9@byu.net>
3306 Fix buffer overrun bug.
3307 * m4/gnulib-cache.m4: Augment with gnulib-tool --import
3309 * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
3310 variant instead, since [efg]cvt are obsolete and our use of them
3311 was buggy (savannah sr #104303).
3312 (format): Fix buffer overflow by using xasprintf.
3313 * doc/m4.texinfo (Format): Expand format test to catch both bugs.
3314 * NEWS: Document this fix.
3316 * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
3318 (AC_CACHE_CHECK): Cache search for ecvt.
3320 2006-06-27 Eric Blake <ebb9@byu.net>
3322 * doc/m4.texinfo (Eval): Document 32-bit signed limitations
3323 required by POSIX, and add example that exposed core dump on x86
3325 (Incompatibilities): Document incompatibility in eval precedence.
3326 * src/eval.c (shift_term): Explicitly mask, to avoid undefined
3328 (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
3329 * NEWS: Document this change.
3331 * doc/m4.texinfo: Use @noindent consistently.
3332 (Quoting Arguments): Document that unquoted parentheses group
3334 (Pseudo Arguments): Expand tests to show this.
3335 (Incompatibilities): Contrast traditional behavior of
3338 2006-06-24 Eric Blake <ebb9@byu.net>
3340 * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
3341 (AC_CHECK_HEADERS_ONCE): Use this new feature.
3342 (AC_CHECK_FUNCS_ONCE): Likewise.
3344 2006-06-23 Eric Blake <ebb9@byu.net>
3346 * doc/m4.texinfo: Quoting cleanup throughout - follow
3347 autoconf-recommended style of one level of quote per parenthesis
3348 in the normal case. Adjust error messages to match GNU coding
3349 standards (and to allow 'make check' to pass again).
3350 (Quoted strings, Inhibiting Invocation): Turn more examples into
3352 (Comments): Resolve FIXME by adding example.
3353 (Define): Add example about underquoting.
3354 (Defn): Add example about use of $0.
3355 (Indir, Format): Resolve FIXME done in last commit.
3356 (Ifelse): Add example about creating blind macro.
3357 (Debugging): Fix grammar.
3358 (Dnl): Add example about dnl with arguments.
3359 (M4wrap): Be explicit that LIFO order is non compliant, and will
3361 (Undivert): Resolve FIXME by adding example.
3362 (Frozen files): Document that m4wrap and sysval will not work
3363 consistently until m4 2.0.
3364 (Incompatibilities): Document another POSIX compliance bug, this
3365 time with changequote. Document a traditional incompatibility
3366 with partial input spanning file boundaries.
3368 Make error messages more consistent with GNU coding standards -
3369 start with lower case, and don't end sentence with punctuation.
3370 * src/debug.c (trace_pre): Update message wording.
3371 * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
3373 * src/freeze.c (produce_frozen_state, issue_expect_message),
3374 (reload_frozen_state): Likewise.
3375 * src/input.c (push_string_init, pop_init, init_macro_token),
3376 (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
3377 * src/m4.c (stackovf_handler, main): Likewise.
3378 * src/macro.c (expand_token, expand_argument, call_macro),
3379 (expand_macro): Likewise.
3380 * src/output.c (make_room_for, output_text, insert_file),
3381 (freeze_diversions): Likewise.
3382 * src/symtab.c (symtab_init, lookup_symbol): Likewise.
3384 * src/builtin.c (builtin_tab): Make format and indir blind.
3385 (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
3386 * NEWS: Mention the change to builtins.
3388 2006-06-22 Eric Blake <ebb9@byu.net>
3390 Robustify frozen file format.
3391 * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
3392 macro. Require V first, and only accept it once. For F, use
3393 placeholder if builtin is not found, rather than warning.
3394 * src/m4.h (m4_placeholder): New prototype.
3395 * src/builtin.c: Unify error message style.
3396 (m4_placeholder): New function, warn if invoked.
3397 (builtin_tab): Add m4_placeholder.
3398 (m4_defn): Warn if placeholder is encountered.
3399 (find_builtin_by_addr): Handle placeholder.
3400 (find_builtin_by_name): Return placeholder on failure.
3401 (m4_builtin): Treat placeholder as undefined.
3402 * doc/m4.texinfo (Frozen files): Document changes in V and F.
3403 * NEWS: Document this change.
3404 Reported by Bruno Haible.
3406 * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
3407 (tabchar): New macro, so that 'make check' still works.
3408 (Invoking m4): Document that ignored compatibility options -B, -S,
3409 and -T each consume an argument.
3410 * checks/get-them: Honor @tabchar{}.
3412 Avoid compiler warnings during -DDEBUG.
3413 * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
3414 [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
3415 * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
3416 (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
3417 (next_token) [DEBUG_INPUT]: Print before returning.
3418 * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
3419 * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
3421 Avoid mkstemp bugs on various platforms.
3422 * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
3423 * src/output.c [! HAVE_MKSTEMP]: Delete.
3424 * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
3425 * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
3426 * NEWS: Document this.
3428 * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
3429 Reported by Bruno Haible.
3431 2006-06-21 Eric Blake <ebb9@byu.net>
3433 Avoid obsolete sigstack when POSIX sigaltstack is available.
3434 * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
3436 * configure.ac (AC_CHECK_HEADERS): Likewise.
3437 (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
3438 obsolete and most hosts now have it in signal.h.
3439 (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
3440 (AC_CACHE_CHECK): Cache decision to use stackovf.
3441 (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
3442 * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
3443 (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
3444 simplify later code.
3445 (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
3446 in case of dereferencing a member of a NULL pointer.
3447 (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
3449 (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
3450 EXIT_FAILURE in error, indent preprocessor directives.
3451 [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
3453 [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
3454 Reported by Santiago Vila.
3456 2006-06-19 Eric Blake <ebb9@byu.net>
3460 2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
3462 * checks/Makefile.in (PATH_SEPARATOR): New macro.
3463 (check, installcheck): Use it, for OS/2.
3465 2006-06-18 Eric Blake <ebb9@byu.net>
3467 Consistently use "GNU M4" as package name, "m4" as executable
3469 * NEWS: Document previous fix.
3471 * README: Fix grammar. Document that --enable-changeword is on
3473 * doc/m4.texinfo (Top, Changeword): Likewise.
3474 (Sysval): Enhance this test.
3475 (History): Backport this section from CVS head, and update.
3477 2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
3478 Eric Blake <ebb9@byu.net>
3480 * src/builtin.c (WEXITSTATUS): Provide fallback definition.
3481 (m4_esyscmd): Set sysval to 0xffff, to accomodate both
3482 big-endian and little-endian wait status definitions.
3483 (m4_sysval): Use WEXITSTATUS.
3484 Reported by Andreas Buening.
3486 2006-06-18 Eric Blake <ebb9@byu.net>
3488 * configure.ac (AC_INIT): Bump version number.
3489 * NEWS: Describe changes in 1.4.4c.
3491 2006-06-17 Eric Blake <ebb9@byu.net>
3493 Beta Release 1.4.4b:
3494 * configure.ac (AC_INIT): Bump version number.
3495 * NEWS: Describe changes since 1.4.4.
3496 * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
3498 * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
3500 * checks/Makefile.in (maintainer-clean): Add missing target.
3501 * COPYING: Remove generated file from CVS.
3503 2006-06-16 Eric Blake <ebb9@byu.net>
3505 * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
3507 2006-06-15 Eric Blake <ebb9@byu.net>
3509 * checks/wrapfifo.m4: New file. Use it...
3510 * doc/m4.texinfo (Incompatibilities): here, in a new test case to
3511 demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
3513 * src/m4.h (to_uchar): New function.
3514 * src/eval.c (eval_lex): Use it to avoid passing signed char to
3515 isdigit, isalpha, isupper, islower, isspace, isalnum.
3516 * src/builtin.c (expand_user_macro): Likewise.
3517 * src/format.c (format): Likewise.
3518 * src/macro.c (expand_argument): Likewise.
3519 * NEWS: Document this security fix.
3522 * src/symtab.c (lookup_symbol): Use invalid, not illegal.
3523 * src/freeze.c (reload_frozen_state): Fix typo in message.
3524 (produce_frozen_state): Standardize on builtin, not built-in.
3525 * src/builtin.c (numeric_arg, bad_argc): Likewise.
3527 * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
3528 (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
3529 (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
3531 * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
3532 * m4/gnulib-cache.m4: New file, from gnulib.
3533 * bootstrap: Invoke gnulib-tool --update.
3534 * src/m4.c (main): Cast away const.
3535 * NEWS: Document that regex is updated.
3538 2006-06-08 Eric Blake <ebb9@byu.net>
3540 * configure.ac (changeword): Work even when changeword is not a
3542 (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
3543 Delete; now done by automake.
3544 (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
3546 2006-06-07 Eric Blake <ebb9@byu.net>
3548 * lib/regex.c (bcmp_translate): Canonicalize type name.
3549 * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
3550 * configure.ac (changeword): Disable changeword for the creation
3551 of configure, in case of bootstrapping with an m4 configured with
3552 --enable-changeword.
3554 Distribute a rudimentary man page.
3555 * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
3557 * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
3558 (SUFFIXES, m4.1): New macros and rules to build m4.1.
3560 2006-06-06 Eric Blake <ebb9@byu.net>
3562 * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
3563 compiler warnings at -O2.
3564 * lib/getopt.c (_getopt_internal): Likewise.
3566 Cleanup of previous patches.
3567 * src/input.c (struct input_block): Remove traced member.
3568 (push_macro, init_macro_token): Don't pass trace status around.
3569 * src/m4.h (struct token_data): Remove traced member.
3570 (struct symbol, struct builtin): Reduce unused space.
3571 (TOKEN_DATA_FUNC): Simplify.
3572 (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
3573 (push_macro, define_builtin): Remove unused parameter.
3574 * src/builtin.c (define_builtin, builtin_init, define_macro),
3575 (m4_defn): Don't pass trace status around.
3576 * src/macro.c (expand_argument): Likewise.
3577 * src/freeze.c (reload_frozen_state): Likewise.
3578 * src/symtab.c: Whitespace cleanup.
3579 * NEWS: Clean up wording.
3580 * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
3581 ensure tests actually expose bugs prior to today's patches.
3583 Trace status of builtins is no longer inherited across
3584 define(...,defn(...)). Fixes bug that autom4te had been working
3586 * src/builtin.c (define_builtin): Don't override trace status.
3587 * doc/m4.texinfo (Trace): Add test for this.
3588 * NEWS: Document this.
3590 When changing macro definitions inside the arguments to the macro,
3591 consistently preserve the old definition that was in effect before
3592 argument collection, similar to the C pre-processor.
3593 Reported by John Brzustowski.
3594 * NEWS: Document this change.
3595 * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
3596 this policy, and add tests that expose core dumps prior to this
3598 * src/m4.h (struct symbol): New members to track when a symbol is
3599 still in use after removal from the symbol table.
3600 (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
3601 (free_symbol): Prototype.
3602 * src/macro.c (expand_macro): Track pending expansions of a
3603 symbol. On completion, if a symbol is deleted and no longer
3604 pending, free its memory.
3605 * src/symtab.c (free_symbol): Export. Don't free memory if symbol
3607 (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
3609 (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
3610 in use as deleted and remove from the table without freeing
3612 (symtab_print_list) [DEBUG_SYM]: More debug output.
3614 * src/symtab.c (hack_all_symbols): Allow certain modifications of
3615 the symbol table during traversal.
3616 * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
3617 SYMBOL_POPDEF, since only the latter is safe with
3620 Solve crash when passing "indir(`foo')" to "m4 -tfoo".
3621 * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
3622 Preserve placeholder when macro is being traced.
3623 * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
3624 symbol is not defined.
3625 (set_trace): Remove placeholder when no longer traced.
3626 (m4_traceon): On named traces, always reserve a slot in the
3628 (m4_traceoff): Don't warn about untracing a nonexistent symbol.
3629 * NEWS: Document new trace behavior.
3630 * doc/m4.texinfo (Trace): Tracing by name now consistently works
3631 no matter whether that macro is currently defined.
3632 (Incompatibilities): Document differences between traditional and
3635 2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
3636 Eric Blake <ebb9@byu.net>
3638 * src/m4.h (hash_table_size): Now size_t instead of int.
3639 * src/m4.c (hash_table_size): Likewise.
3640 (main): Adjust to this; use atol rather than atoi.
3641 * src/symtab.c: Include <limits.h>, for CHAR_BIT.
3642 (symtab_init, lookup_symbol, hack_all_symbols):
3643 Use size_t for sizes and indexes, not int.
3644 (symtab_print_list) [DEBUG_SYM]: Likewise.
3645 (hash): Likewise. Don't case-fold in the hash function.
3646 Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
3647 Don't assume hash word is 32 bits.
3648 * NEWS: Document this change.
3650 2006-06-04 Eric Blake <ebb9@byu.net>
3652 * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
3653 to allow compilation, for use in debugger.
3654 (profiles, current_mode) [DEBUG_SYM]: New variables.
3655 (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
3656 determining hash table performance.
3658 2006-05-31 Eric Blake <ebb9@byu.net>
3659 John Brzustowski <jbrzusto@fastmail.fm>
3661 * src/input.c (input_stack): Delete; use current_input instead.
3662 (wrapup_stack): Dynamically allocate, so that recursion is handled
3664 (push_wrapup): Use current wrapup stack.
3665 (pop_wrapup): Rotate wrapup stack to current, and create new
3667 (input_init): Dynamically allocate stacks.
3668 * NEWS: Update, now that recursive m4wrap can no longer cause
3671 2006-05-31 Eric Blake <ebb9@byu.net>
3673 * lib/getopt.c: Fix copyright year.
3674 * lib/obstack.c: Ditto.
3675 * src/builtin.c: Ditto.
3677 2006-05-30 Eric Blake <ebb9@byu.net>
3679 * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
3680 Reported by John Brzustowski.
3681 (Incompatibilities): Document known POSIX incompatibilities.
3684 2006-05-29 Eric Blake <ebb9@byu.net>
3686 * doc/m4.texinfo (Maketemp): Work even when running 'make check'
3690 * Makefile.am: New file.
3691 * doc/Makefile.am: Ditto.
3692 * examples/Makefile.am: Ditto.
3693 * lib/Makefile.am: Ditto.
3694 * src/Makefile.am: Ditto.
3695 * acinclude.m4: New file, renamed from aclocal.m4.
3696 * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
3697 (AC_ARG_PROGRAM): Now redundant.
3698 (STACKOVF): Turn into automake conditional.
3699 (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
3700 * checks/Makefile.in: Converting this dir to automake was not
3701 trivial; for now, just add missing targets demanded by top-level.
3702 * INSTALL: Remove files that are now generated from CVS.
3703 * Makefile.in: Ditto.
3704 * aclocal.m4: Ditto.
3705 * install-sh: Ditto.
3706 * mkinstalldirs: Ditto.
3707 * doc/Makefile.in: Ditto.
3708 * doc/texinfo.tex: Ditto.
3709 * examples/Makefile.in: Ditto.
3710 * lib/Makefile.in: Ditto.
3711 * src/Makefile.in: Ditto.
3713 * AUTHORS: Backport from CVS head, and update.
3714 * doc/m4.texinfo (Changeword): Fix examples to match behavior.
3716 2006-05-27 Eric Blake <ebb9@byu.net>
3718 * lib/regex.c (regex_compile): Kill compiler warnings.
3719 * lib/getopt.c: Likewise.
3720 * lib/obstack.c: Likewise.
3721 * src/builtin.c (builtin_init): Likewise.
3722 * src/path.c (path_search): Likewise.
3724 * doc/m4.texinfo: Fix usage of a vs. an.
3725 (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
3726 overfull hbox warnings.
3727 (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
3729 * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
3731 * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
3732 (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
3734 (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
3735 * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
3736 * src/Makefile.in: Delete remains of ansi2knr.
3737 * src/ansi2knr.1: Delete.
3738 * src/ansi2knr.c: Delete.
3740 2006-05-25 Eric Blake <ebb9@byu.net>
3742 * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
3745 * doc/m4.texinfo (Francois): No longer needed as a tex variable.
3746 Reported by Karl Berry.
3748 2006-05-24 Eric Blake <ebb9@byu.net>
3750 * Makefile.in (html): New target.
3751 * doc/Makefile.in (html, m4.html): Likewise.
3752 (MAKEINFOHTML): New macro.
3753 * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
3755 (Regexp) [ifhtml]: Make cross-reference to emacs manual an
3757 Reported by Bob Badour.
3759 * THANKS: Update. Move reporter's email addresses here, instead
3762 2006-05-11 Eric Blake <ebb9@byu.net>
3765 * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
3766 patched on 2005-12-04.
3767 Reported by Ilya N. Golubev.
3769 * bootstrap: New file, so that generated files need not be stored
3771 * Makefile.in (DISTFILES): Add bootstrap.
3773 Make testsuite less sensitive to doc changes.
3774 * doc/m4.texinfo: Use m4.input instead of filename.
3775 * checks/check-them (xerr): Turn m4.input into filename.
3776 * checks/Makefile.in (dist): Depend on stamp-checks.
3778 Portability updates for OS/2.
3779 * src/Makefile.in (EXEEXT, OBJEXT): Define.
3782 * lib/Makefile.in (OBJEXT): Define.
3784 * doc/Makefile.in (install, uninstall): Install info files into
3786 Reported by Andreas Buening.
3788 2006-05-09 Eric Blake <ebb9@byu.net>
3790 * install-sh: Update to newer upstream version.
3791 * mkinstalldirs: Likewise.
3792 Reported by Andreas Buening.
3794 * src/m4.c (main): Bump copyright year.
3795 * Makefile.in (datarootdir): Define, for autoconf 2.59c.
3796 * doc/Makefile.in (datarootdir): Likewise.
3798 2006-05-08 Eric Blake <ebb9@byu.net>
3801 * doc/m4.texinfo (Bugs): Backport bug email address from head.
3802 Reported by Stepan Kasal.
3804 2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
3806 * input.c (match_input): Do not pass expression with side effect
3807 to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
3810 2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
3812 * doc/m4.texinfo (How to debug macros and input): s/woould/would/
3813 Reported by Damian Menscher.
3815 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
3817 * configure.ac (AC_INIT): Bump to 1.4.4a.
3819 2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
3822 * configure.ac (AC_INIT): Bump to 1.4.4.
3823 * NEWS: Describe 1.4.4's changes.
3824 * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
3826 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
3828 * src/m4.c: fix return code when non-existent files are processed
3830 2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
3832 * README: update email address for bug reports.
3834 2005-10-17 Gary V. Vaughan <gary@gnu.org>
3836 * doc/m4.info: Generated files are not kept in the repository.
3838 2005-05-01 Gary V. Vaughan <gary@gnu.org>
3840 The FSF are moving offices today. Changed their contact address
3841 in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
3842 `51 Franklin Street, Fifth Floor, MA 02110-1301'.
3844 Also, some of the files here were never updated from the previous
3845 '675 Mass Ave, Cambridge, MA 02139', so changed those to the
3846 '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
3848 2005-03-31 Mike Frysinger <vapier@gentoo.org>
3850 * Makefile.in (bindir, infodir): Substitute from configure rather
3852 * doc/Makefile.in (infodir): Ditto.
3853 * src/Makefile.in (bindir): Ditto.
3856 2005-03-31 Gary V. Vaughan <gary@gnu.org>
3858 Changes needed to automate the release process for 1.4.3:
3860 * Makefile.in (dist): Make .tar.bz2 tarball too.
3861 * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
3862 (cvs-news): Look 1 line further down for NEWS release number.
3863 (cvs-dist): We don't use automake, so make dist is fine.
3864 Remove double . before suffixes.
3865 (cvs-release): Don't mention manual.html.
3866 (fetch): Get latest gendocs files.
3867 (web-manual): Rewritten to use gendoc for multiformat manuals.
3868 * doc/gendocs.sh: Don't save an old version in m4 CVS!
3869 * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
3870 preserving, but case insensitive, so generating html docs per node
3871 clashes between Index.html, the node file, and index.html, the
3872 top-level of the document tree...
3873 (Index macro): ...so renamed to this. Changed all references.
3875 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
3877 * configure.ac (AC_INIT): Bump to 1.4.3a.
3879 2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
3882 * configure.in (AC_INIT): Bump to 1.4.3.
3883 * NEWS: Describe 1.4.3's changes.
3885 2005-03-31 Gary V. Vaughan <gary@gnu.org>
3887 * Makefile.maint: New file with release rules, from CVS libtool.
3888 * Makefile.in (DISTFILES): Add Makefile.maint.
3889 * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
3892 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
3894 * doc/m4.texinfo (Patsubst): Re-add trailing space required by
3895 checks/47.patsubst, with a redundant @comment to prevent emacs
3896 from removing it accidentally again.
3897 * checks/get-them: Allow for trailing spaces tucked behind
3900 2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
3902 * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
3903 * src/Makefile.in (install, uninstall): Likewise.
3905 2005-02-07 Gary V. Vaughan <gary@gnu.org>
3907 * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
3909 Reported by Eric Blake.
3911 2005-02-04 Gary V. Vaughan <gary@gnu.org>
3913 * lib/regex.c, lib/regex.h: Updated from gnulib.
3914 * src/input.c (set_word_regexp): Don't change the word_regexp
3915 unless it compiles correctly.
3917 Reported by Frank Schwidom.
3919 * Makefile.in (stamp-h): Regenerate config.h properly.
3921 2005-02-03 Gary V. Vaughan <gary@gnu.org>
3923 * configure.ac (AC_DEFINE): Fix overquoting of description
3926 * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
3928 * src/freeze.c (produce_frozen_state): Use \n line-endings even
3929 on Windows, so that the frozen file reader will work.
3930 Reported by Josef T. Burger.
3932 * src/m4.c (main): Modernise the --version output.
3934 2005-02-03 Gary V. Vaughan <gary@gnu.org>
3936 Modernise the configury a little to prevent spurious errors from
3937 Autoconf-2.59's autoreconf:
3939 * config.h.in: Renamed to...
3940 * config-h.in: ...this to better support DOS 8.3 file systems.
3941 * acconfig.h: Removed.
3942 * configure.in: Renamed to...
3943 * configure.ac: ...this, and AC_DEFINE used to declare config.h
3944 entry comments. Slight reorganisation and reformatting.
3945 * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
3947 (AC_INIT): Use a modern 3 argument call.
3948 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
3949 examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
3950 s/PRODUCT/PACKAGE/g.
3951 * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
3952 config.h.in. Added configure.ac, config-h.in.
3953 (stamp-h.in): Removed acconfig.h from dependencies.
3954 (configure): Depends on configure.ac, not configure.in.
3955 * doc/Makefile.in (stamp-vti): Ditto.
3956 * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
3957 difference between PRODUCT="m4" and PACKAGE="GNU M4".
3958 * configure: Regenerated.
3960 2005-02-03 Noah Misch <noah@cs.caltech.edu>
3962 * src/output.c (mkstemp): Make non-static, and build regardless of
3963 HAVE_TMPFILE; src/builtin.c also needs this replacement.
3966 2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
3968 * configure.in (AC_CHECK_HEADERS): Commit works best when you save
3969 changes from your editor buffer first.
3971 * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
3972 * src/m4.c: And include them as appropriate.
3975 2004-09-09 Andreas Schwab <schwab@suse.de>
3977 Refactoring of the string read case in next_char provides about a
3978 20% speedup of M4 as typically used by autoconf:
3980 * src/input.c (next_char_1): Renamed from next_char.
3981 (next_char): New macro.
3984 2004-08-21 Gary V. Vaughan <gary@gnu.org>
3986 * configure.in (VERSION): Bump to 1.4.2a.
3988 2004-08-19 Paul Eggert <eggert@twinsun.com>
3991 * configure.in (VERSION): Bump to 1.4.2.
3992 * News: Describe 1.4.2's changes.
3994 * src/m4.c (reference_error): Preserve errno, since M4ERROR
3996 * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
3997 (m4_maketemp): Clear errno before calling mkstemp.
3998 * src/path.c (path_search): Don't let "free" trash errno when
4000 * src/output.c (insert_file): Don't assume errno has a valid
4001 value simply because fread returns zero. This fixes a
4002 portability bug reported by Marion Hakanson in
4003 <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
4005 2004-06-09 Gary V. Vaughan <gary@gnu.org>
4007 * configure.in (VERSION): Bump to 1.4.1a.
4008 * NEWS: Place holder for next stable release.
4010 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4013 * configure.in (VERSION): Bump to 1.4.1.
4014 * NEWS: Describe 1.4.1's changes.
4016 * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
4017 pacify Autoconf 2.59.
4019 * doc/m4.texinfo: Insert commas after @xref's that lack them,
4020 to pacify Texinfo 4.7.
4021 * doc/Makefile.in (info): Remove info-1, info-2, info-3.
4023 * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
4024 pacify Sun C compilers.
4026 2003-09-28 Akim Demaille <akim@epita.fr>
4028 * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
4031 2003-09-03 Santiago Vila <sanvila@debian.org>
4033 * examples/stackovf.sh: Use tempfile if available.
4035 2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
4037 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
4038 * src/output.c (m4_insert_file): Do not mix buffered and
4039 unbuffered I/O, as this breaks on the Hurd. (trivial change)
4041 2001-02-01 Santiago Vila <sanvila@debian.org>
4043 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
4044 * src/m4.c (main): Fix format vulnerabilities. (trivial change)
4046 2001-02-01 Matt Kraai <kraai@debian.org>
4048 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
4049 * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
4050 empty file rather than to a nonexistent file. This closes a common
4052 * src/builtin.c (m4_maketemp): Implement the above, by using
4053 mkstemp rather than mktemp. (trivial change)
4055 2000-01-09 Akim Demaille <demaille@inf.enst.fr>
4057 * src/builtin.c (expand_ranges): Added break after trailing dash.
4058 This caused misbehaviors on some systems.
4060 Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
4063 * doc/Makefile.in (realclean): Also remove stamp-vti.
4064 Reported by Eric Backus.
4066 Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
4068 * src/freeze.c (produce_frozen_state): If the frozen file cannot
4069 be opened, return immediately after producing the error message.
4070 Reported by Andreas Schwab.
4072 * configure.in: Check for const only after having found possible
4073 ANSIfying compiler flags, this is of no use to check it before.
4074 Reported by Alexander Lehmann.
4076 Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
4078 * src/macro.c (collect_arguments): Cast obstack arguments to
4079 (voidstar), so avoiding compiler warnings.
4080 Reported by Joseph E. Sacco.
4082 * src/freeze.c (produce_frozen_state): Cast printed lengths to
4083 (int) so they correspond to %d format items.
4084 Reported by Joseph E. Sacco.
4086 * src/m4.c (main): Cast the argument to xfree to (voidstar).
4087 * src/symtab.c (free_symbol): Idem.
4088 Reported by Karl Vogel.
4090 Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
4092 * Makefile.in (DISTFILES): Distribute BACKLOG.
4094 * configure.in: Define PRODUCT and VERSION.
4095 * acconfig.h: Document PRODUCT and VERSION.
4096 * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
4097 constant string m4 and variable or parameter named version.
4099 Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
4101 * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
4102 __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
4103 defines __STDC__ to 0, for indicating it is *not* ANSI!
4104 Reported by Kaveh R. Ghazi.
4106 * configure.in: Added obsolescent tests for AIX and Minix.
4108 * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
4109 which texclean does not exist anymore.
4110 Reported by Eric Backus, Jim Meyering, John David Anglin and
4113 Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
4115 * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
4116 Reported by John David Anglin.
4118 * src/ansi2knr.c: New version, sent by Peter Deutsch.
4119 * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
4120 ANSI2KNR, depending on the fact the compiler is ANSI or not.
4121 * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
4122 Remove the sed filter after ansi2knr for debug.c. Use $O instead
4123 of $U, put underline in extensions rather than in basenames. Use
4124 implicit rules, now that regularity makes this possible.
4125 Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
4126 of ansi2knr whenever it is needed.
4127 * configure.in: Adjusted for correct STACKOVF substitution.
4128 * src/debug.c (trace_format): When not __STDC__, use (...) as a
4129 parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
4130 Reported by David MacKenzie.
4132 * Makefile.in: Remove binprefix. Use transform_name instead.
4133 Reported by David MacKenzie.
4135 * doc/Makefile.in: Create version.texi, use it, clean it.
4136 Reported by Jim Meyering.
4138 Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
4140 * Makefile.in (all, install, uninstall): Depend on Makefile.
4142 * Makefile.in: For actions invoking $(MAKE) from within compound
4143 sh statements, exit non-zero if the sub-make fails. Otherwise,
4144 the top-level make may exit successfully when it should fail.
4145 Reported by Jim Kingdon.
4147 * {,/*}Makefile.in: Use && after all cd, in case they fail.
4149 * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
4150 (dist): Use PRODUCT and VERSION instead of tricks on .fname.
4151 * configure.in: Substitute PRODUCT and VERSION.
4153 * {,*/}Makefile.in (dist): Always try a hard link before a copy.
4155 Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
4157 * Makefile.in (mostlyclean-local): Do not remove *~.
4158 * */Makefile.in (mostlyclean): Idem.
4159 Reported by Robert E. Brown and Richard Stallman.
4161 Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
4163 * src/m4.h: Get rid of CONFIG_BROKETS.
4165 Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
4167 * configure.in: Use AC_ARG_PROGRAM.
4168 * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
4169 Reported by David MacKenzie.
4171 Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
4173 * configure.in: Do not add -O to CFLAGS for GNU C, now that
4174 configure does it automatically.
4175 Reported by Jim Meyering.
4177 Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
4179 * src/stackovf.c: Declare the handler_t typedef earlier in the
4180 code, use it for stackovf_handler.
4181 (setup_stackovf_trap): Use RETSIGTYPE instead of void while
4182 casting sigsegv_handler.
4183 Reported by Robert Bernstein.
4185 * src/m4.c (main): Initialize program_name to argv[0] without
4187 Reported by Karl Berry.
4189 Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
4191 * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
4192 Reported by Karl Berry.
4194 Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
4196 * lib/Makefile.in (mostlyclean): Added.
4197 (TAGS): Make in $(srcdir).
4199 * configure.in: Use `choke me' in test, like everywhere!
4201 * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
4202 unreacheable and useless.
4204 * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
4206 * lib/Makefile.in (DISTFILES): Distribute TAGS.
4207 (distclean): Do not remove TAGS.
4208 (realclean): Remove it.
4209 * Makefile.in: Make TAGS in lib also, not just in src.
4210 Reported by Karl Berry.
4212 * Makefile.in (distclean, realclean): Instead of recursively
4213 calling $(MAKE) for the -local part, allow parallel execution of
4214 -recursive and -local, only delay the removal of config.status,
4215 which is repeated in both goals.
4217 Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
4220 * Makefile.in: Group all *clean-recursive goals in one, using sed
4221 to remove `-recursive' while calling make recursively. Also, use
4222 a subshell for each recursive $(MAKE).
4223 Reported by Jim Meyering.
4225 * src/m4.h (memcpy): Define with bcopy for BSD systems.
4226 Reported by Kaveh R. Ghazi.
4228 * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
4229 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
4232 * configure.in: Use date instead of touch for stamp-h.
4233 * Makefile.in (stamp-h.in): Idem.
4235 * Makefile.in (distclean, realclean): Force serial execution of
4236 both goals, in case parallel makes are being used.
4237 Reported by Jim Meyering.
4239 * src/Makefile.in (DISTFILES): Distribute TAGS.
4240 (distclean): Do not remove TAGS.
4241 (realclean): Remove it.
4242 Reported by Karl Berry.
4244 Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
4246 * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
4247 to old names, for following Autoconf.
4249 Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
4251 * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
4252 ./install.sh will not be correctly referred to in sub-Makefiles.
4253 Reported by John David Anglin.
4255 * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
4256 Reported by Eric Backus.
4258 * Makefile.in, checks/Makefile.in, doc/Makefile.in,
4259 examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
4260 config.status into remaking this directory's Makefile only.
4261 * Makefile.in (stamp-h): Do not check nor touch stamp-h.
4262 * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
4263 Reported by Jim Meyering.
4265 Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
4267 * configure.in: Correct stack overflow detection logic, taking
4268 care of systems having only incomplete implementations (like for
4269 Pyramid 9820 OSx 5.0d).
4270 Reported by Kaveh R. Ghazi.
4272 * src/Makefile.in (TAGS): Remote -t from etags call.
4274 Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
4276 * lib/Makefile.in (install): Depend on all.
4278 Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
4280 * examples/Makefile.in (mostlyclean): Do not depend on texclean.
4281 Reported by Jim Meyering and John David Anglin.
4283 * Makefile.in (distclean-local): Delete config.log.
4284 Reported by Jim Meyering.
4286 Solidify frozen files with respect to -P:
4287 * src/m4.c: Have -P set prefix_all_buitins variable instead of
4288 calling a function by that name. Declare the variable.
4289 * src/m4.h: Adjust declaration for prefix_all_buitins.
4290 * src/builtin.c (builtin_init): Merge in functionality from
4291 previous prefix_all_buitins function, while making entries in the
4292 symbol table, but not modifying the builtin description itself.
4294 * src/freeze.c (reload_frozen_state): Add a useless `break;',
4295 because *many* compilers do not accept an empty `default:'.
4296 Reported by Akiko Matsushita, Eric Backus, John David Anglin,
4297 Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
4299 * configure.in: Use AC_TYPE_SIGNAL.
4300 * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
4301 Reported by Robert Bernstein.
4303 * checks/Makefile.in (check): Modify PATH so check-them will find
4304 m4 in the src directory.
4305 * Makefile.in (check): Don't.
4306 Reported by Akiko Matsushita and Jim Meyering.
4308 * src/output.c (make_room_for, output_character_helper): New
4309 functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
4310 a per buffer MAXIMUM_BUFFER_SIZE.
4312 * src/output.c (output_text): New function, for optimizing the
4313 output of strings of characters. Use it.
4315 Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
4317 * doc, src: New directories reorganizing the distribution.
4318 * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
4320 * Makefile.in: Adjusted.
4321 * configure.in: Configure new Makefiles.
4323 * m4.h: Declare STRING typedef. Use it for comment and quote
4324 strings, adjusting all references. (This is the rudiments of a
4325 beginning for the eventual withdrawal of NUL terminated strings.)
4326 * output.c (shipout_text): Accept a length parameter, and use it.
4327 All callers adjusted.
4329 Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
4331 * m4.h: Include <unistd.h> if it exists.
4332 * stackovf.c: Don't.
4334 Clean up for current_diversion variable:
4335 * output.c: Move current_diversion from builtin.c.
4336 * m4.h: Declare current_diversion so builtin.c can access it.
4337 * output.c (output_init, make_diversion): Initialize or update
4339 * builtin.c (builtin_init, m4_divert): Leave current_diversion
4342 Remove limit on number of diversions:
4343 * output.c: Replace ndiversion by diversions, declare it.
4344 (output_init): Allocate only diversion 0.
4345 (make_diversion): Allocate new diversions as needed.
4346 * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
4347 * m4.c: Still accept -N, but do nothing with it.
4348 Reported by David MacKenzie.
4351 * output.c (freeze_diversions): New function.
4352 * m4.h: Declare freeze_diversions.
4353 * freeze.c: Document frozen file format, revise it, call
4354 freeze_diversions to add diversions to frozen format, and code to
4355 reload them properly.
4356 * m4.c: Do not undivert automatically at end when status being
4357 frozen. Do not call builtin_init when reloading frozen state.
4359 Speed up diversion processing:
4360 * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
4361 COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
4362 structure and variables, cached variables out of output_diversion,
4363 reallocate_diversion_for and OUTPUT_CHARACTER.
4364 (shipout_text, make_diversion, insert_diversion): Adapted to new
4366 (insert_file): Use better buffering.
4367 Reported by David MacKenzie.
4369 Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
4371 * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
4372 dist works from another build directory.
4374 Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
4376 * symtab.c (hack_all_symbols): Use hash_table_size instead of
4377 constant HASHMAX, for -H option to work better.
4379 * builtin.c (DECLARE): Simplify by using _ ().
4381 * freeze.c: New file.
4382 * Makefile.in: Compile it, distribute it.
4383 * m4.c: Recognize, document and process --freeze-state (-F) and
4384 --reload-state (-R) options. Pass a true flag to builtin_init
4385 only if no reloading some state.
4386 * builtin.c (define_builtin): Remove static specifier.
4387 (find_builtin_by_name): Remove static specifier.
4388 (builtin_init): Accept and obey a flag argument.
4389 * m4.h: Add declarations for freeze.c, changes for builtin.c.
4391 Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
4393 * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
4396 * configure.in: Implement --with-dmalloc.
4397 * acconfig.h: Document WITH_DMALLOC.
4398 * m4.h: Add code for when WITH_DMALLOC.
4400 Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
4402 * m4.c (long_options): Use "error-output", the dash was missing.
4403 Reported by Akiko Matsushita.
4405 Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
4407 * m4.h: Include <sys/types.h>.
4408 * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
4409 * m4.h: Declare len_lquote and len_rquote as size_t, not int.
4411 * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
4413 * builtin.c (dump_args): Declare len as size_t, not int.
4415 * debug.c: Prototype the forward declaration of debug_set_file.
4417 * builtin.c (m4_undivert): Replace div by file, for avoiding the
4418 shadowing of this variable.
4419 * output.c (insert_diversion): Idem.
4421 * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
4422 (input_init): Duplicate default quote and comment strings.
4423 (set_quotes): Free previous quote strings in all cases. Duplicate
4424 even default quote strings.
4425 (set_comment): Free previous comment strings in all cases.
4426 Duplicate even default comment strings.
4428 * configure.in: Updated for Autoconf 2.0.
4429 * Makefile.in (distclean-local): Also delete config.cache.
4431 * m4.c (usage): Reorganize the --help output by topic. Include a
4432 description for debugging flags.
4434 Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
4436 * configure.in: If sigaction is available and SA_ONSTACK defined,
4437 use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
4438 defined, use sigvec. Else don't compile stackovf.c.
4439 * stackovf.c (setup_stackovf_trap): Idem.
4440 Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
4443 Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
4445 * m4.c (usage): Replace printf par fputs.
4447 Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
4451 Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
4453 * configure.in: Check for sigaction and sigvec. Add a new delayed
4454 check for RLIMIT_STACK, combine in the checking for getrlimit.
4455 All those things are not universally available.
4456 * stackovf.c: Split setting up the trap handler and catching
4457 signals, for better taking care of various configure outcomes.
4458 * examples/stackovf.sh: Correct a typo.
4459 Reported by Eric Backus, Jim Avera and Jim Meyering.
4461 Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
4463 * ansi2knr.c: New version sent by its author, Peter Deutsch.
4465 Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
4467 * Makefile.in: Modify so parallel make will not try making
4468 lib/libm4.a twice simultaneously.
4469 Reported by Jim Meyering.
4471 Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
4473 * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
4474 error message, for when no code possibility exists. Even if this
4475 line is completely #ifdef'ed out, it brings a syntax error.
4476 Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
4478 * Makefile.in (install): Have install depend on all too, for lib
4479 to be remade as needed.
4481 * examples/stackovf.sh: Try ksh, bsh and bash for shells
4482 providing ulimit, instead of using only ksh.
4483 Reported by Jim Avera and Joseph E. Sacco.
4485 Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
4487 * Makefile.in (check): Have it depend on all instead of m4. In
4488 this way, a change in lib will be detected and processed.
4490 * builtin.c (numeric_arg): Use strtol and verify the conversion,
4491 instead of using sscanf which stops as soon as there is a
4492 non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
4493 and divert(1xyzzy) were all accepted without any warning or error
4495 * m4.h: Declare strtol as long if not including stdlib.h.
4496 * configure.in: Check for limits.h, and replace strtol if missing.
4497 * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
4498 * lib/strtol.c: New file, from elsewhere.
4499 Reported by Andreas Schwab.
4501 Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
4503 * macro.c (expand_macro): Cast value to (boolean) prior to
4504 assigning it to traced.
4505 Reported by Tom McConnell.
4507 * Makefile.in (m4): Always make all in lib first.
4508 Reported by Jim Meyering.
4510 Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
4512 * stackovf.c: Isolated OS-dependent sections; Improved portability,
4513 adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
4514 handlers), and a default error message if the fault address is not
4515 available (when neither siginfo.h nor BSD sigcontext are supported).
4516 * configure.in: Changes for stackovf.h: Check for sigcontext,
4517 sigaction, sigstack, and define rlim_t as int if necessary.
4518 * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
4519 * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
4520 * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
4522 Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
4524 * configure.in: Use AC_SET_MAKE.
4525 * Makefile.in: Use @SET_MAKE@.
4526 Reported by Jim Meyering.
4528 * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
4529 Reported by Ian Taylor.
4531 Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
4533 * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
4534 because siginfo.h is unrelated to standard headers, and siginfo.h
4535 is already checked for.
4536 Reported by Joseph E. Sacco.
4538 * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
4540 * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
4543 Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
4545 * builtin.c (substitute): Use \& to represent this part of the
4546 string which was matched by the whole regexp, instead of
4547 representing the whole string. Any usage of \0 issues a warning
4548 and acts like \&, it will disappear in some subsequent release.
4550 Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
4552 * m4.c: Complete prototype for forwarded declaration of usage.
4554 * input.c (init_macro_token): Correct own reference in error
4555 message. Previous name get_macro_func was referred to instead.
4556 (next_char): Correct own reference in error message. Previous
4557 name advance_input was referred to instead.
4559 * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
4560 * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
4561 and_term, not_term, logical_not_term, cmp_term, shift_term,
4562 add_term, mult_term, exp_term, unary_term, simple_term): Add
4563 prototype to forwarded declarations. Declare parameter v1 as
4564 eval_t * instead of int *. Same for local variable v2 in dyadic
4565 functions. Same for result in exp_term.
4566 * builtin.c (m4_eval): Declare value as eval_t instead of int.
4567 (ntoa): Declare value as eval_t instead of int. Declare uvalue as
4568 unsigned_eval_t instead of unsigned int. Change casts accordingly.
4569 (shipout_int): Cast first argument of ntoa to eval_t.
4570 Reported by Thorsten Ohl.
4572 * macro.c: Complete the prototypes of forwarded expand_macro and
4574 Reported by Thorsten Ohl.
4576 * m4.h: Define voidstar as void * or char * depending on __STDC__.
4577 The Ultrix 3.1 compiler cannot do much with void pointers.
4579 * builtin.c (dumpdef_cmp): Replace void * by voidstar.
4580 * m4.c (xfree): Replace void * by voidstar.
4581 Reported by Tom McConnell.
4583 * ansi2knr.1: New, from elsewhere.
4584 * Makefile.in (DISTFILES): Distribute ansi2knr.1
4586 * Makefile.in (stamp-h.in): Avoid running ./config.status if
4587 stamp-h does not exist yet. This avoids running it a second time
4588 just after the initial ./configure.
4589 Reported by David MacKenzie and Tom McConnell.
4591 * m4.h: Replace the enum debug_info declaration with a series of
4592 #define's. The Ultrix 3.1 compiler would otherwise need casting
4593 (int) to most references, when used in expressions.
4594 Reported by Tom McConnell.
4596 Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
4598 * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
4599 following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
4600 calls the compiler. Previously, FP_PROTOTYPES was only calling
4601 the preprocessor; by not being subject to CFLAGS, this was
4602 discouraging those flags asking for ANSI compilation.
4603 * acconfig.h: Document HAVE_PROTOTYPES.
4604 * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
4605 * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
4606 Reported by Eric Backus.
4608 * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
4609 from the environment. Default CFLAGS to -g if not set.
4610 * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
4611 * lib/Makefile.in: Have CFLAGS substituted from configure.
4612 Reported by Eric Backus and Tom McConnell.
4614 * configure.in: m4_undefine changeword before using AC_ENABLE.
4616 * m4.h: Declare prototypes for error (for ANSI compilers only),
4617 prefix_all_builtins and reference_error.
4618 Reported by Tom McConnell.
4620 * input.c (set_word_regexp): Do not try to initialize the array
4621 test from a string, this does not work with non-ANSI compilers.
4622 Reported by Eric Backus.
4624 * Makefile.in (dist): Clean examples/ before saving it.
4625 (distclean-local): Also remove stamp-h.
4626 Reported by Eric Backus.
4628 * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
4630 Reported by Tom McConnell.
4632 * checks/Makefile.in (clean): Depends on mostlyclean.
4633 (mostlyclean): New goal.
4635 Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
4637 * Makefile.in (DISTFILES): Distribute install.sh.
4638 * install.sh: New file, copied from elsewhere.
4639 Reported by Assar Westerlund and Kaveh R. Ghazi.
4641 Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
4643 * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
4644 * acconfig.h: Explain ENABLE_CHANGEWORD.
4646 [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
4647 from code provided by Pete Chown]
4648 * m4.h: Add original_text field to u_t variant of union u.
4649 Declare TOKEN_DATA_FUNC macro.
4650 * builtin.c: Declare changeword.
4651 (m4_changeword): New function.
4652 * input.c: Include "regex.h", define variables with word regexps.
4653 (input_init): Initialize the word regexp.
4654 (set_word_regexp): New.
4655 (next_token): Declare local variables, use the previous code if
4656 default_word_regexp is true. Else, match using a new code. Save
4658 * macro.c (expand_token): Ship out original text if not a macro
4660 Reported by Krste Asanovic and Pete Chown.
4662 [These modifs all depend upon ENABLE_CHANGEWORD]
4663 * m4.h: Declare external user_word_regexp.
4664 * m4.c: Declare user_word_regexp, and initialize it from
4665 --word-regexp or -W, or NULL if not specified.
4666 * input.c: Use user_word_regexp if specified, instead of
4667 DEFAULT_WORD_REGEXP.
4669 * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
4672 * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
4673 * checks/Makefile.in: Empty the suffix list.
4674 Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
4676 * m4.c: Declare nesting_limit and initialize it to 250.
4677 Implement -LNUMBER or --nesting-limit=NUMBER to change its
4679 * m4.h: Declare nesting_limit as external.
4680 * macro.c (expand_macro): Stop execution whenever nesting limit
4682 Reported by Bengt Mertensson.
4684 * eval.c (evaluate): Diagnose excess characters in eval input.
4685 Things like `eval(08)' used to return 0 with no diagnostic.
4687 * m4.h: Capitalize first letter of all macro arguments in
4690 * m4.c: Declare warning_status, initialize it to 0. Add new
4691 option -E, or --fatal-warnings, which sets warning_status to
4692 EXIT_FAILURE instead.
4693 * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
4694 EXIT_FAILURE if not otherwise done by header files.
4695 * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
4696 * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
4697 eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
4698 argument of all M4ERROR calls.
4699 Reported by Noah Friedman.
4701 * examples/incl-test.m4: Renamed from incl_test.m4.
4702 * examples/include.m4: Include incl-test.m4 instead of
4704 * examples/multiquotes.m4: Renamed from multi-quotes.m.
4706 Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
4708 * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
4709 that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
4710 also tested it on a Sun Sparc workstation running SunOS 4.x.
4712 * format.c (format): When not HAVE_EFGCVT, m4 was failing the
4713 49.format check, abusing a `union values' argument with sprintf
4714 without selecting the proper field. Now, save the formatting type
4715 first, delaying the fetch of the corresponding argument.
4716 Reported by Joseph E. Sacco and Tom Quinn.
4718 * format.c (format): Remove const from char *fmt declaration when
4719 not HAVE_EFGCVT, because a NUL may be forced into it.
4721 * m4.h: Declare atof() when not STDC_HEADERS.
4722 Reported by Joseph E. Sacco.
4724 * Regenerate configure using Autoconf 1.11, this corrects a
4725 problem about an incorrect cpp seting on NeXT 3.1.
4726 Reported by Alexander Lehmann.
4728 Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
4730 * m4.h (_): Change argument from `x' to `Args'.
4732 Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
4734 * Makefile.in: Remove all occurrences of $(MFLAGS), which were
4735 bringing more evil than good on a few systems.
4736 Reported by Greg A. Woods.
4738 Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
4740 * m4.h: Rename Args() to _().
4741 * m4.h: Remove extern specifier from all function declarations.
4743 Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
4745 * stackovf.c: New file implementing stack-overflow detection.
4746 * configure.in: Check for getrlimit, sigaction. If all of
4747 standard headers, getrlimit and sigaction, define USE_STACKOVF and
4748 substitute ${U}stackovf.o for STACKOVF.
4749 * acconfig.h: Declare USE_STACKOVF.
4750 * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
4751 * m4.h: Declare setup_stackovf_trap().
4752 * m4.c: Call setup_stackovf_trap().
4753 * tests/stackovf_test.sh: New file.
4755 Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
4757 * checks/Makefile.in: Rename .all-stamp to stamp-checks.
4759 * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
4761 Sun Jan 30 14:24:19 1994 (pinard at icule)
4763 * m4.h: Remove definition of volatile, not used anymore.
4764 Reported by Jim Meyering and Joseph E. Sacco.
4766 * m4.h: Consistently use `do { ... } while (0)' in macros, instead
4767 of `if ... else /* nothing */' for if macros.
4768 Reported by Jim Meyering.
4770 * builtin.c (m4_regexp): Reorganize the code for avoiding a
4771 warning from gcc about `repl' possibly used before defined.
4772 Reported by Jim Meyering.
4774 * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
4775 Reported by Jim Meyering.
4777 Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
4779 * m4.h: Move the conditional definition of volatile after the
4780 inclusion of system files, because they may define it first.
4782 Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
4784 * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
4785 get around a problem with Alpha make seeing a syntax error, there.
4786 Reported by Vern Paxson.
4788 Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
4790 * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
4791 Reported by Richard Stallman.
4793 Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
4795 * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
4796 instead of AC_HAVE_FUNCS.
4797 Reported by Noah Friedman.
4799 Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
4801 * m4.c: Initialize show_help and show_version to zero.
4803 * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
4804 Use them in exit() and usage() calls.
4806 Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
4808 * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
4809 syserr() macro. Delete errref, add reference_error and M4ERROR.
4810 * m4.c: Replace errref, which was returning an input reference
4811 string, with reference_error, which prints it on standard error.
4812 * builtin.c, output.c: Use errno as second parameter to error,
4813 instead of using syserr() with %s.
4814 * *.c: Use M4ERROR instead of error: no more errref() with %s.
4815 Doing so, the program name appears after the input reference
4816 instead of before, which eases M-x next-error processing.
4818 Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
4820 * checks/get-them: Escape braces with backslashes in patterns,
4821 because HPUX-9.01 awk needs this.
4822 Reported by Jim Meyering.
4824 Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
4826 * builtin.c: Declare "FILE *popen ();".
4828 * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
4829 macros, replace error_message_prefix() declaration by errref()'s.
4830 Declare xrealloc, for use in errref().
4831 * m4.c: Delete error_message_prefix() function, add errref().
4832 * *.c: Use error() systematically in place of all error macros,
4833 now that error() flushes stdout first. Make needed adjustments.
4835 * m4.h: Remove const in sys_errlist[] declaration, it creates
4836 conflicts on SGI and Alpha.
4837 Reported by Kaveh R. Ghazi.
4839 Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
4841 * m4.c: Include <getopt.h> instead of "getopt.h".
4843 * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
4844 * acconfig.h: New, for documenting HAVE_EFGCVT.
4845 * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
4846 use them wherever appropriate. Also use -I. for compilations.
4847 * lib/Makefile.in: Use -I.. for compilations.
4848 * *.c: Include <config.h> or "config.h".
4850 * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
4851 * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
4853 Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
4855 * builtin.c (m4_eval): Cast strlen to (int) before comparing.
4857 * input.c (input_init): Initialize quote and comment strings
4858 explicitely instead of calling set_quotes and set_comment: by
4859 doing so, we ensure we do not free uninitialized variables.
4861 * checks/check-them: Reverse arguments to both diff, so the
4862 expected is on the left and the obtained on the right.
4864 * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
4865 macros. Delete declarations for m4error, warning, fatal and
4866 internal_error, add declaration for error_message_prefix.
4867 * m4.c: Delete m4error, warning, fatal and internal_error
4868 routines, add error_message_prefix routine.
4869 * *.c: Replace m4error routine calls with MESSAGE* macro calls,
4870 warning with WARNING*, fatal with FATAL* and internal_error with
4872 * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
4873 this is not needed anymore.
4875 * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
4876 DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
4877 and debug_message, add declaration for debug_message_prefix.
4878 * debug.c: Remove static specifier for FILE *debug declaration.
4879 Delete debug_print and debug_message routines, add
4880 debug_message_prefix routine.
4881 * builtin.c, debug.c: Replace debug_print routine calls with
4882 DEBUG_PRINT* macro calls.
4883 * input.c, path.c: Replace debug_message routine calls with
4884 DEBUG_MESSAGE* macro calls.
4886 * m4.h: Remove inclusion of <varargs.h>.
4887 * debug.c: Include <stdarg.h> or <varargs.h>.
4888 (trace_format): Use stdarg instead of varargs if __STDC__.
4890 * configure.in: Remove checks for vfprintf and _doprnt. These
4891 implementations use varargs tricks which are not portable enough.
4892 * lib/vfprintf.c: Deleted.
4893 * lib/_doprnt.c: Deleted.
4894 * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
4895 Reported by Joel Sherrill.
4897 * path.c (add_include_directory): Use xstrdup.
4899 * builtin.c (find_builtin_by_name): Declare static.
4901 * *.[ch]: Add const to a few "char *" declarations.
4903 * configure.in: Remove commented tests for fileno() and fstat().
4904 * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
4906 * debug.c (debug_flush_files): New.
4907 * m4.h: Declares it.
4908 * builtin.c (m4_syscmd, m4_esyscmd): Use it.
4909 Reported by Nicolas Pioch.
4911 Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
4913 * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
4914 Reported by Joel Sherrill.
4916 * builtin.c (prefix_all_builtins): Instead of the table size, use
4917 the null entry at end for stopping the loop. It was overwritten.
4918 Reported by Andreas Schwab and Jim Meyering.
4920 * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
4921 Reported by Kaveh R. Ghazi.
4923 * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
4924 Reported by Karl Vogel.
4926 Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
4928 * m4.h: Do not define volatile if already defined.
4929 Reported by Rene' Seindal.
4931 * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
4933 Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
4934 Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
4936 Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
4938 * m4.h: Define strchr and strrchr in terms of index and rindex,
4939 instead of the other way around.
4940 * builtin.c, m4.c, path.c: Use strchr instead of index.
4942 * input.c (next_char): Remove a "break;" after a "return ...;".
4943 Reported by Tom McConnell.
4945 Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
4949 * configure.in: Do not copy check files in the build hierarchy.
4950 * checks/check-them: Identify the m4 version being checked. For
4951 finding m4, look in $PATH instead of in the parent directory.
4952 * Makefile.in (check): Prepend `pwd` to $PATH before checking.
4953 * checks/Makefile.in (.all-stamp): Always create check files in
4954 the source hierarchy, not anymore in the build hierarchy.
4955 (check): cd to the source hierarchy before performing checks.
4956 Do not copy nor clean COPYING anymore, take it from `..'.
4957 Reported by Tom McConnell.
4959 * Makefile.in (Makefile): Use $(SHELL).
4960 (config.status): Use $(SHELL). Use "config.status --recheck"
4961 instead of "configure --no-create", which is obsolete.
4962 Reported by Tom McConnell.
4964 Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
4966 * m4.c (usage): Use "%s" instead of "m4" in format string.
4967 Reported by Jim Meyering.
4969 * Makefile.in: Distribute mkinstalldirs.
4970 Reported by Pierre Gaumond.
4971 Reported by Jim Meyering.
4972 Reported by Tom McConnell.
4973 Reported by Andreas Gustafsson.
4975 * checks/check-them: Renamed from checks/check_them.
4976 * checks/get-them: Renamed from checks/get_them.
4977 * checks/.all-stamp: Renamed from checks/.all_stamp.
4978 * checks/Makefile.in: Changed accordingly.
4979 Reported by Jim Meyering.
4981 Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
4983 * lib/Makefile.in (dist): Correct permissions on files.
4985 * output.c: Declare tmpfile, some systems don't.
4987 Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
4989 * checks/Makefile.in (dist): Correct permissions on files.
4991 * Makefile.in (dist): Ensure recursive linking for subdirectory
4992 `examples', also set read/write permissions on all its files.
4994 * mkinstalldirs: New, from elsewhere.
4995 * Makefile.in: Use it.
4997 * debug.c: Synchronize debug messages and regular output when
4998 the debug file and stdout are redirected to the same file.
4999 * configure.in: Add (commented) checks for fileno and fstat.
5000 Reported by Jim Avera.
5002 * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
5003 etc., arguments, then ignore the superfluous one. m4 used to
5004 diagnose missing arguments and return the empty string.
5005 Reported by Nick S. Kanakakorn.
5007 Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
5009 * m4.c (main): At end of all input, ensure all undiverted text
5010 goes to the main output stream.
5011 Reported by Andreas Gustafsson.
5013 * m4.c (main): exit (0), instead of return 0.
5015 * m4.c: Implement -P and --prefix-builtins.
5016 * builtin.c: Delete const specifier on builtin_tab.
5017 (prefix_all_builtins): New.
5018 Reported by Noah Friedman.
5019 Reported by Scott Bartram.
5021 * c-boxes.el: New, from elsewhere.
5022 * Makefile.in: Distribute it.
5024 * m4.h: Do not define bcopy if <string.h> defines it.
5025 Reported by Stephen Perkins.
5027 * builtin.c (define_macro): Allow a missing second argument, in
5028 which case it is implied empty. Affects define and pushdef.
5029 Reported by Eric Allman.
5031 Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
5033 * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
5034 struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
5035 * builtin.c: Initialize all the blindness fields in builtin_tab.
5036 (define_builtin): Copy the blindness of a builtin into its symbol.
5037 * macro.c (expand_token): Avoid processing a blind builtin if the
5038 next character is not an opening parenthesis.
5039 Reported by David MacKenzie.
5040 Reported by Noah Friedman.
5042 * configure.in: Ensure an exit status of 0 on completion.
5043 Reported by Vivek P. Singhal.
5045 * eval.c (eval_lex): Admit both lower and upper case letters for
5046 bases greater than 10. Only lower case letters were accepted.
5048 * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
5049 Reported by Krste Asanovic.
5051 * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
5052 * eval.c (logical_not_term): New name for not_term.
5053 * eval.c (xor_term): New, between or_term and and_term.
5054 * eval.c (not_term): New, between and_term and logical_not_term.
5055 * eval.c (shift_term): New, between cmp_term and add_term.
5056 Reported by Krste Asanovic: ~, ^, <<, >>.
5057 Reported by Ben A. Mesander: ** vs ^.
5059 * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
5060 * m4.h: Delete xrealloc.c.
5061 * lib/xmalloc.c: New, from elsewhere.
5062 * lib/xstrdup.c: New, from elsewhere.
5063 * lib/Makefile.in: Distribute and compile them.
5065 * m4.c: Change progname to program_name.
5066 * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
5067 * lib/error.c: New, from elsewhere.
5068 * lib/Makefile.in: Distribute and compile error.c.
5069 * configure.in: Check AC_VPRINTF and for strerror.
5070 * m4.c: Delete cmd_error. Use error instead.
5071 * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
5073 * m4.h: Delete #define const, let Autoconf takes care of this.
5075 * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
5076 Merge parse_args into main. Declare argv to be `char *const *',
5077 then remove superfluous casts.
5079 * m4.c: Rename --no-gnu-extensions to --traditional.
5080 Reported by Ben A. Mesander.
5082 * m4.c (usage): Add a status parameter. Supply one in various
5083 calls. Add --help processing. Remove -V for --version.
5085 * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
5087 * lib/Makefile.in: Have an AR=ar declaration.
5088 Reported by Eric Backus.
5089 Reported by Bjorn R. Bjornsson.
5090 Reported by Tom Tromey.
5091 Reported by Kristine Lund.
5092 Reported by Marion Hakanson.
5094 Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
5096 * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
5097 Reported by Noah Friedman.
5099 Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
5101 * Makefile.in: Remove MDEFINES and cleanup.
5103 Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
5105 * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
5108 Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
5110 * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
5111 ensure 777 mode for directories, so older tar's will restore file
5114 Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
5116 * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
5117 so the installer can override automatically configured choices.
5118 Reported by Karl Berry.
5120 Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
5122 * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
5123 previous version was not working properly on m68k-hp-bsd4.3.
5124 Reported by Roland McGrath.
5126 * lib/_doprnt.c: Stolen from Oleo distribution.
5127 * configure.in: Check for _doprnt.c if vfprintf.c selected.
5128 * lib/Makefile.in: Distribute _doprnt.c.
5129 Do not distribute regex.[ch].old anymore.
5131 Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
5133 * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
5134 Richard wants it there.
5136 Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
5138 * Makefile.in: Add DEFS to MDEFINES.
5139 * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
5140 (libm4.a): Remove the library before creating it.
5141 (distclean): Remove tags and TAGS too.
5143 Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
5145 * Makefile.in (dvi, m4.dvi): New goals.
5147 * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
5148 macro.c, output.c, path.c, symtab.c: Change Copyright from
5149 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
5151 * examples/divert.m4: Deleted, this bug has been corrected.
5153 * Makefile.in (texclean, mostlyclean): New goals.
5155 * Makefile.in (clean): Remove clutter from ansi2knr.
5156 Reported by Pierre Gaumond.
5157 Reported by Greg A. Woods.
5159 Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
5161 * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
5162 might well use CFLAGS is s/he needs it.
5164 * Makefile.in: Allow installation of info files from a separate
5166 Reported by Jason Merrill.
5167 Reported by David MacKenzie.
5168 Reported by Skip Montanaro.
5169 Reported by Erez Zadok.
5170 Reported by Assar Westerlund.
5172 Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
5175 This is still a beta release for the future GNU m4 version 1.1.
5177 * lib/alloca.c: New, from elsewhere.
5178 * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
5180 * m4.h: Do not define index/rindex if already defined. If
5181 FALSE/TRUE are already defined, do not redefine them, but merely
5182 define boolean typedef to int.
5184 * Makefile.in: Use $(DEFS) while compiling ansi2knr.
5185 * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
5186 because some C compilers do not like connectives with #ifdef.
5187 * m4.h: Define `volatile' only if __GNUC__, instead of once for
5188 __GNUC__ and once for __STDC__.
5189 * lib/regex.h: Leave const alone, AC_CONST will take care of it.
5191 * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
5192 Makefile dependencies. Without it, make keeps destroying and
5193 remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
5195 * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
5196 to diversion/DIVERSION, this was a spelling error.
5198 * m4.c: Declare version[], remove #include "version.h".
5199 * version.h: Deleted.
5200 * Makefile.in: Remove references to version.h.
5202 * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
5203 production, by using a simpler and more robust algorithm. This
5204 solves the problem of synclines sometimes written in the middle of
5205 an output line. Delete sync_line() and output_lines variable.
5206 * m4.h: Remove sync_line prototype and output_lines declaration.
5207 * input.c (next_char), output.c (shipout_text): Remove references
5209 * input.c (push_file, pop_file): Merely put the value -1 in
5210 output_current_line instead of calling sync_line, for delaying a
5211 single `#line NUM FILE' before next output line. Do not test
5212 for sync_output, because this is unnecessary clutter.
5213 * output.c (make_divertion, insert_divertion): Idem.
5214 * input.c: Rename must_advance_line to start_of_input_line, for
5217 * debug.c (trace_header): Select a new debug line format, which
5218 better complies with GNU standards for formatting error messages.
5219 With option `-dfl', M-x next-error might be used on the output.
5220 * m4.c (vmesg): Adjust format of error output to GNU standards.
5221 * m4.texinfo: Adjust examples for `make check' to work.
5223 * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
5224 case for enum debug_info constants, which were all lower case.
5226 * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
5228 * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
5229 collected patches. I tried a few times using newer regex.[ch], it
5230 mysteriously stopped aborting with this one. Insecure feeling...
5231 * lib/Makefile.in: Distribute regex.[ch].old, just in case!
5233 Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
5235 * m4.c: Change `--no-warnings' to `--silent'.
5236 Reported by David MacKenzie.
5238 * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
5239 leave it off for now. See comment in m4.c for justification.
5240 Reported by David MacKenzie.
5242 * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
5243 * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
5245 * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
5247 * Makefile.in: Ensure recursive cleaning is done before local
5248 cleaning for all clean goals.
5250 * builtin.c (ntoa): Ensure the value is always interpreted as a
5251 signed quantity, whatever the radix is.
5253 Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
5255 * builtin.c, format.c, input.c: Split long lines.
5256 * m4.c: Use typedef macro_definition instead of struct
5258 * symtab.c: Use typedef symbol instead of struct symbol.
5260 Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
5262 * *.[ch]: Remove all trailing whitespace, in code and comments.
5264 * configure.in: Find some awk.
5265 * Makefile.in: Add $(AWK) to MDEFINES.
5266 * checks/Makefile.in: Transmit $(AWK) to get_them.
5267 * checks/get_them: Use $AWK instead of gawk. Add a close in the
5268 awk script when switching files, because without this, mawk runs
5269 out of file descriptors.
5271 Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
5273 * Makefile.in (realclean): Delete m4.info*.
5274 Reported by Jim Meyering.
5276 * Makefile.in: Adjust and link with checks/Makefile.
5277 * checks/Makefile.in: New.
5278 * configure.in: Output checks/Makefile.
5280 * checks/get_them: Have the dnl header of each test more
5281 recognizable by next-error, also use a better message.
5283 Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
5285 * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
5286 And use that only if __GNUC__ since we're using it's GCC-specific
5287 semantics that tell the compiler the associated function doesn't
5290 * builtin.c (substitute): Don't use character as an array index.
5291 (dumpdef_cmp): Make formal arguments `const void *' to avoid
5292 warnings with gcc -W -Wall on systems with qsort prototype.
5293 (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
5296 * eval.c (most functions): Add parentheses to assignments used
5297 as truth values go avoid warnings from gcc -Wall.
5299 * input.c, m4.c, output.c, path.c, symtab.c: Declare static
5300 any functions that don't need external scope.
5302 * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
5303 (many functions and arrays): Declare `const'.
5305 Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
5307 * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
5308 removing the declaration from m4.h. Also rename false to FALSE
5311 * lib/Makefile.in (Makefile): New goal.
5313 * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
5314 so heavily loaded. It gets more easily overridable, calling make.
5315 Reported by Jim Meyering.
5317 * Makefile.in (dist): Get .fname from the current directory name,
5318 instead of from version.h. I need updating many files manually,
5319 when the version changes, version.h is just one of them.
5321 Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
5323 * m4.h: Remove the tag `boolean' on the enum introducing typedef
5324 `boolean'. This tag conflicts with <sys/types.h> on SVR4.
5325 Reported by Tom McConnell.
5327 Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
5329 * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
5330 39.cleardiv, which were describing missing or spurious newlines.
5331 Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
5332 do not depend on machine word size, `/bin/false' implementation,
5333 or `wc' output format. `make check' is more dependable, now.
5335 * checks/check_them: Summarize the failed tests by listing their
5336 name, at end. If none, issue `All checks successful'. Output
5337 `Checking' instead of `Input file:'.
5339 * checks/get_them, checks/check_them: Reindented.
5341 * Makefile.in (dist): chmod a+r before making the tar file.
5343 Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
5345 * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
5347 * input.c (next_token): Reinitialize token_buttom just after using
5348 it as a watermark with obstack_free. Or else, a future token, big
5349 enough for triggering reallocation of the obstack chunk, could
5350 void the initialized value of token_buttom, later causing panic in
5351 obstack_free. Rename token_buttom to token_bottom everywhere.
5353 * m4.h: Before declaring errno, first include <errno.h> and
5354 ensure that it does not define errno.
5355 Reported by Richard Stallman.
5357 Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
5359 * builtin.c: Define and use DECLARE macro for builtins.
5361 * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
5362 argument, this is a common idiom for introducing long comments.
5364 * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
5365 arguments. The last argument was silently ignored.
5367 * m4.c (cmd_error): Add a missing semicolon before va_end().
5369 Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
5371 * Makefile.in: Now handle protoized sources. Define and use U.
5372 Compile and use ansi2knr with old compilers. Update DISTFILES.
5373 Add `aclocal.m4' to `configure' dependencies.
5374 * ansi2knr.c: New, from Ghostscript distribution.
5375 * configure.in: Define U through FP_PROTOTYPES for old compilers.
5376 Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
5377 * aclocal.m4: New, provide FP_PROTOTYPES.
5378 * m4.h: Conditionnaly protoized through Args, save for varags.
5379 * builtin.c: Protoized. Then:
5380 Include <sys/types.h> if size_t is not defined, before "regex.h".
5381 (m4_ifelse): Fetch built-in name properly for diagnostic.
5382 (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
5383 (m4_regexp): Add const to `msg' declaration.
5384 (m4_patsubst): Add const to `msg' declaration.
5385 * debug.c: Protoized, save for varargs.
5386 * eval.c: Protoized.
5387 * format.c: Protoized.
5388 * input.c: Protoized.
5389 * m4.c: Protoized, save for varargs. Then:
5390 (xfree): Accept void * instead of char *.
5391 (xmalloc): Return void * instead of char *.
5392 (xrealloc): Accept and return void * instead of char *.
5393 * macro.c: Protoized.
5394 * output.c: Protoized.
5395 * path.c: Protoized. Then cast some (char *) over xmalloc's.
5396 * symtab.c: Protoized.
5398 Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
5400 * m4.texinfo: Remove directory from diagnostics in 30.include,
5401 51.eval, 56.errprint and 57.m4exit tests.
5403 * m4.h: Remove declarations for int or void system functions, they
5404 cause more conflicting trouble than they make good.
5406 * configure.in: Avoid configuration header file. Add some tests.
5407 * m4.h: Remove #include "config.h".
5408 * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
5409 Then, rewritten for better compliance with GNU standards.
5411 Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
5413 * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
5414 because of a misplaced #endif.
5416 * Many *.[hc] files: Correct intra-line spacing here and there,
5417 according to GNU indent 1.6 advice.
5419 * configure.in: New, using Autoconf 1.2.
5420 * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
5421 * Delete old configure.in, configure, etc/configure.in,
5422 etc/configure, lib/configure.in, lib/configure and config/*.
5423 Reported by Jason Merrill.
5425 * symtab.c (hash): Change (char) NULL to '\0'.
5426 Reported by Jason Merrill.
5428 * Delete .vers, etc/newdist.sh, etc/newvers.sh and
5429 etc/nextvers.sh. Release numbers will be edited `by hand'.
5430 * version.h: De-automatize, force value in.
5432 * m4.c: Changes in order to use a newer getopt.h.
5433 Reported by David MacKenzie.
5435 * checks/: New name for examples/.
5436 * checks/get_them: New location for etc/get_examples.
5437 * checks/check_them: New location for etc/check_examples.
5438 * Makefile.in, checks/get_them, checks/check_them: Adjust.
5439 * lib/vfprintf.c: New location for etc/vfprintf.c.
5440 * Delete empty etc/.
5441 * examples/: New name for test/.
5443 Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
5445 * Makefile.in (check): Add m4 as dependency.
5447 * m4.c: Accept --no-warnings instead of --no_warnings, and
5448 --no-gnu-extensions instead of --no_gnu_extensions. Make the
5449 usage message more informative.
5450 Reported by David MacKenzie.
5452 Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
5454 * etc/check_examples: New name for check_examples.sh.
5455 * etc/get_examples: New name for get_examples.sh.
5456 * Makefile.in, etc/Makefile.in: Use new names.
5458 * Makefile.in: Transmit $(CC) while making in lib.
5460 * Many *.[hc] files: GNU indent'ed, with further fine tuning of
5461 code disposition by hand.
5463 Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
5465 * m4.h: Delete definitions for abort() and exit().
5466 Reported by Richard Stallman.
5468 * config/hmake-unicos, config/s-unicos.h: New files.
5469 Reported by Hal Peterson.
5471 * eval.c (exp_term): Have N^0 return 1.
5472 Reported by Michael Fetterman.
5474 * eval.c, input.c, m4.h: Remove last comma in enums.
5475 Reported by Mike Lijewski.
5477 * Transfer of maintenance duties from Rene' to Franc,ois.
5479 Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
5481 * Release 1.0. Many thanks to those, who provided me with bug
5482 reports and feedback.
5484 * Uses GNU configure, taken from the gdb distribution.
5486 * Uses GNU getopt(), with long option names.
5488 * The -Q/+quiet option is added, which suppresses warnings about
5489 missing or superflous arguments to built-in macros.
5491 * Added default options via the M4OPTS environment variable.
5493 * The built-in format can now be configured to use sprintf as
5494 the formatting engine, for systems without [efg]cvt(3).
5496 * GNU library code is moved to the ./lib subdirectory; other
5497 utility files are now in ./etc.
5499 * Several minor bugs have been fixed.
5501 Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
5503 * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
5504 Francois Pinard and Roland H. Pesch for providing me with reports.
5506 * The builtins incr and decr are now implemented without use of
5509 * The builtin indir is added, to allow for indirect macro calls
5510 (allows use of "illegal" macro names).
5512 * The debugging and tracing facilities has been enhanced
5513 considerably. See the manual for details.
5515 * The -tMACRO option is added, marks MACRO for tracing as soon
5518 * Builtins are traced after renaming iff they were before.
5520 * Named files can now be undiverted.
5522 * The -Nnum option can be used to increase the number of
5523 divertions available.
5525 * Calling changecom without arguments now disables all comment
5528 * The function m4_patsubst() is now consistently declared
5531 * A bug in dnl is fixed.
5533 * A bug in the multi-character quoting code is fixed.
5535 * Several typos in the manual has been corrected. More probably
5538 * The m4.info file is now installed along with the program.
5540 Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
5542 * Updated and enhanced version. Release 0.75, manual 0.07.
5544 * Implemented search path for include files (-I option and
5545 M4PATH envronment variable).
5547 * Implemented builtin "format" for printf-like formatting.
5549 * Implemented builtin "regexp" for searching for regular
5552 * Implemented builtin "patsubst" for substitution with regular
5555 * Implemented builtin "esyscmd", which expands to a shell
5558 * Implemented "__file__" and "__line__" for use in error
5561 * Implemented character ranges in "translit".
5563 * Implemented control over debugging output.
5565 * Implemented multi-character quotes.
5567 * Implemented multi-character comment delimiters.
5569 * Changed predefined macro "gnu" to "__gnu__".
5571 * Changed predefined macro "unix" to "__unix__", when the -G
5572 option is not used. With -G, "unix" is still defined.
5574 * Changed "shift", "$@" and "$*" to not insert spaces afters
5577 * Added program name to error messages.
5579 * Fixed two missing null bytes bugs.
5581 Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
5583 * Initial beta release. Release 0.50, manual 0.05.
5591 Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2013 Free
5592 Software Foundation, Inc.
5594 Copying and distribution of this file, with or without
5595 modification, are permitted provided the copyright notice
5596 and this notice are preserved.