-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathChangeLog
2918 lines (2199 loc) · 104 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2006-08-25 Eric Blake <ebb9@byu.net>
Release 1.4.6:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.5.
* Makefile.maint (web-manual): Give up on VPATH build during
distribution. But distributions are made so infrequently that
this is not too much of a hardship.
* Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
exists.
2006-08-24 Eric Blake <ebb9@byu.net>
* src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
Solaris, produce output on just one argument.
(m4_regexp, m4_patsubst): For consistency, do likewise.
(m4_patsubst): Allow zero-length match at end of string.
* doc/m4.texinfo (Sysval): Fix overfull hbox.
(Bugs, Macro Arguments): Minor fixes.
(Other tokens): Rearrange node order.
(Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
* NEWS: Document these fixes.
2006-08-22 Eric Blake <ebb9@byu.net>
* src/input.c (pop_input): Avoid empty filename with -di option.
* src/debug.c (debug_message_prefix): Put space before message.
* m4/gnulib-cache.m4: We don't explicitly use alloca module.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
* Makefile.maint (fetch): Simplify, now that we can use gnupload.
* checks/check-them: State why a test is skipped.
* doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
* ChangeLog: Add copyright.
* AUTHORS: Likewise.
* BACKLOG: Likewise.
* README: Likewise.
* THANKS: Likewise.
* TODO: Likewise.
* examples/COPYING: New file, add copyright for all the examples.
* checks/get-them: Put copyright on testsuite files.
2006-08-18 Eric Blake <ebb9@byu.net>
Don't let unrelated child processes see too many files.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
* src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
spelling in error message.
* src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
(debug_set_output): Close debug file on exec.
* src/m4.h (includes): Add cloexec.h.
* src/output.c (make_room_for): Close diversions on exec.
* src/path.c (path_search): Close include files on exec.
* NEWS: Document this.
Regular expressions were leaking memory.
* src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
helper methods.
(m4_regexp, m4_patsubst): Avoid memory leak.
* src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
static.
(set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
from O(n^2) to O(n) for calculating word_start.
(next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
O(1) bitmap, not O(n) search string.
* NEWS: Document this fix.
2006-08-17 Eric Blake <ebb9@byu.net>
* NEWS: Document previous checkin.
* src/builtin.c (substitute): Avoid core dump when accessing
beyond bound of regular expression.
Reported by Karl Nelson.
* doc/m4.texinfo (Regexp): Add example that causes core dump on
some architectures prior to this patch.
* THANKS: Updated.
2006-08-16 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
clear that dumpdef does not always go to stderr.
* src/builtin.c (m4_errprint): Flush buffers before printing to
stderr.
* THANKS: Updated.
2006-08-15 Eric Blake <ebb9@byu.net>
* src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
per debian bug 96075.
* doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
(Changeword): Don't use shift as an example of a swallowed word.
(Divert): Discuss fact that divert is an English word.
Reported by Richard A Nelson.
2006-08-14 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Invoking m4): Minor fixes.
2006-08-12 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Arguments): Hint at better exch macro.
(Answers): Provide a better definition.
2006-08-09 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Incompatibilities): Document that m4 does not
yet understand locales.
* NEWS: Fix wording of a few items.
2006-08-08 Eric Blake <ebb9@byu.net>
Avoid printing `NONE:0:' in error messages.
* src/m4.h (m4_error_at_line): New function.
* src/m4.c (m4_error_at_line): Implement.
* src/input.c (skip_line, input_init, next_token): Use "", not
"NONE", for no file, since NONE can be a real file name.
* src/macro.c (expand_argument): Likewise.
* src/debug.c (debug_message_prefix, trace_header): Check for
current file.
* doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
(Location): Document that synclines and internal message format
are not impacted by redefining these macros.
(M4exit): Hint at bug in fatal_error.
(Answers): Provide workaround to match m4 output.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
* src/m4.h (m4_error): New function.
(M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
error module deficiencies.
(reference_error, suppress_line): No longer needed.
* src/m4.c (m4_error): Implement.
(main): No longer need to install error callback.
2006-08-04 Eric Blake <ebb9@byu.net>
* src/m4.h (program_name): Declare.
(suppress_line): New variable.
(M4ERROR_AT_LINE): New macro.
* src/m4.c (reference_error, main): Follow GNU Coding Standards
for error message format.
* src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
* src/macro.c (expand_argument): Likewise.
* checks/check-them (examples): Adjust to new message format.
* src/builtin.c (m4___program__): New builtin.
* doc/m4.texinfo (Location): Split from Errprint into new node,
and document __program__.
(Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
(Include, Regexp, Patsubst, Incr, Eval): Adjust error message
format.
(Extensions): Document __program__.
* NEWS: Document this change.
2006-08-03 Eric Blake <ebb9@byu.net>
Don't confuse leading `(' in comment or quote with start of
argument collection.
* src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
TOKEN_CLOSE.
(peek_input): Make private to input.c.
(peek_token): New prototype.
* src/input.c (default_word_regexp): Reduce ifdefs.
(peek_input): Make static.
(next_token): Return new token types.
(match_input, MATCH): Add argument consume, which controls
whether match should be pushed back.
(peek_token): New function.
(token_type_string) [DEBUG_INPUT]: New function.
* src/macro.c (expand_token, expand_argument, collect_arguments):
Handle new token types.
* doc/m4.texinfo (Changequote, Changecom): Document this.
* NEWS: Document this.
* src/stackovf.c (setup_stackovf_trap): Free memory on failure.
* src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
overflow detection when sigstack exists but is not implemented.
Fixes debian bug 154053.
* THANKS: Updated.
Reported by David Perlin.
2006-08-02 Eric Blake <ebb9@byu.net>
* src/input.c (MATCH): Fix EOF detection on multi-byte comment
close.
2006-08-01 Eric Blake <ebb9@byu.net>
* src/input.c (skip_line, next_token): Remember current file in
case input file ends abruptly. Addresses debian bug 175365.
(pop_input): Defer freeing storage that holds previous file
name...
(pop_wrapup): to here, after error message is issued.
* src/macro.c (expand_argument): Remember current file in case
input file ends abruptly.
* doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
(M4wrap): Adjust testsuite accordingly.
(Errprint): Document line number limitation of m4wrap.
* NEWS: Document this fix.
* THANKS: Update.
2006-07-31 Eric Blake <ebb9@byu.net>
* src/input.c (peek_input, next_char, match_input): Be eight-bit
clean; fixes debian bug 311378.
* doc/m4.texinfo (Syntax): Describe eight-bit handling.
(Changequote, Changecom): Add examples to test this.
* NEWS: Document this fix.
* THANKS: Update.
Reported by Steven Augart.
* doc/m4.texinfo: Whitespace fix.
* checks/get-them: Avoid exceeding 14-char file name limit.
* THANKS: Update.
2006-07-30 Eric Blake <ebb9@byu.net>
* src/path.c (path_search): Detect allocation failure.
Use native free when it is good enough.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
* src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
Adjust calls.
* src/symtab.c (free_symbol): Likewise.
* src/m4.c (xfree, main): Likewise.
* src/m4.h (obstack_chunk_free): Likewise.
* src/path.c (path_search): Likewise.
* src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
* doc/m4.texinfo (Errprint): Add example for last patch.
* checks/check-them: Account for VPATH in latest example.
2006-07-29 Eric Blake <ebb9@byu.net>
* src/path.c (path_search): Add result parameter, so that
-I can be accounted for. Debian bug 53685.
* src/m4.h (path_search): Update prototype.
* src/m4.c (main): Adjust callers.
* src/freeze.c (reload_frozen_state): Likewise.
* src/builtin.c (include, m4_undivert): Likewise.
* NEWS: Document this change.
Reported by Nicolas Lichtmaier.
2006-07-28 Eric Blake <ebb9@byu.net>
* Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
several non-GNU makes.
* src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
* src/m4.h: Likewise.
* src/input.c (push_wrapup): Avoid compiler warning with Solaris
/usr/ccs/bin/ucbcc.
2006-07-27 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Use @acronym{GNU} throughout.
(History): Update for 1.4.6.
* src/m4.h (_): Remove K&R cruft.
* src/builtin.c: Likewise.
* src/debug.c: Likewise.
* src/eval.c: Likewise.
* src/macro.c: Likewise.
* src/stackovf.c: Likewise.
* doc/Makefile.am (m4.1): Improve man page.
* src/m4.c (usage): Improve --help output, including adding the
bug reporting address.
(main): Follow GNU Coding Standards for --version output.
2006-07-26 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
end-comment consistently, to match POSIX.
* doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
(Dnl, M4wrap, Include): Document EOF issues, and add examples.
(Incompatibilities): Document incompatibility of changecom
vs. macro names, and of EOF in include.
* src/input.c (next_token): Reject unterminated comments at EOF.
(skip_line): Warn on unterminated dnl at EOF.
* NEWS: Document these changes.
2006-07-25 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Update to reflect gnulib's split of
stdio-safer into fopen-safer and tmpfile-safer.
* src/m4.c: Remove redundant include.
2006-07-24 Eric Blake <ebb9@byu.net>
Fix bugs related to stream handling.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
unlocked-io stdio-safer stdlib-safer close-stream.
* configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
provided by gnulib if needed.
* src/output.c [! HAVE_TMPFILE]: Likewise.
* src/m4.h (includes): Replace unistd, stdio, and stdlib with
their safer counterparts.
(retcode): New global variable.
* src/input.c (pop_input): Check for read failure.
* src/freeze.c (reload_frozen_state): Likewise.
(produce_frozen_state): Check for write failure.
* src/debug.c (debug_set_file): Likewise.
* src/m4.c (usage, main): Likewise.
(retcode): Make global.
* src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
status is non-zero except when everything succeeds.
* doc/m4.texinfo (M4exit): Document these changes.
(Incompatibilities): Remove documentation of bug now fixed.
* NEWS: Document these fixes.
2006-07-22 Eric Blake <ebb9@byu.net>
* src/format.c (format): Avoid compiler warning that str may be
used uninitialized.
2006-07-21 Eric Blake <ebb9@byu.net>
* src/m4.h [UNIX]: Add more platforms that are close enough to
categorize as UNIX, but which don't predefine __unix__.
Reported by Nelson H. F. Beebe.
2006-07-20 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
to explicitly ask for --assume-autoconf=2.60.
2006-07-19 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
and exits normally with 129.
Reported by Nelson H. F. Beebe.
* THANKS: Update.
* src/m4.h (EXIT_MISMATCH): Define.
* src/freeze.c (reload_frozen_state): Detect version mismatch, by
exiting with status 63.
* src/m4.c (usage): Document this.
* doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
* NEWS: Likewise.
* doc/m4.texinfo (copying): Relax restriction on front-cover and
back-cover texts.
2006-07-17 Eric Blake <ebb9@byu.net>
* src/format.c (format): Support F, g, and G specifiers.
* doc/m4.texinfo (Format): Document this.
* NEWS: Document this addition.
* doc/m4.texinfo (Builtin): Delete redundant text.
* configure.ac (AC_INIT): Bump version number.
* src/builtin.c (substitute): Bah. Fix buffer overrun.
* NEWS: Document this fix.
2006-07-15 Eric Blake <ebb9@byu.net>
Release 1.4.5:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.4.
* src/m4.c (usage): Document exit status.
* doc/m4.texinfo: Use `exit status', not `exit code'.
(Invoking m4): Document exit status.
* bootstrap: Backport --help, --version from head.
(func_update): New function, for easily grabbing up-to-date files
from gnulib.
* Makefile.maint (web-manual): Fix for VPATH builds.
2006-07-14 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
looks bad in info. Use @deffn rather than @example for
describing prototypes. Fix awkward wording and grammar.
* src/builtin.c (substitute): Warn on bad escape sequences.
Ignore trailing backslash.
* doc/m4.texinfo (Regexp): Add documentation for this.
* NEWS: Document this change.
* src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
* doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
more examples.
(Dnl): Update example to show side effects.
* checks/get-them: Generate three digit test names.
* checks/Makefile.in (CHECKS): Accomodate 100+ tests.
2006-07-13 Eric Blake <ebb9@byu.net>
* src/input.c (input_init): Simplify.
(set_word_regexp): Treat empty string as default, since empty
regexp would disable word parsing.
* src/m4.c (user_word_regexp): Default to empty string.
* src/builtin.c (builtin_tab): Make changeword blind.
* doc/m4.texinfo (Changeword): Document this.
* NEWS: Document this.
* TODO: Knock off completed items.
* src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
just the first.
* doc/m4.texinfo (Undefine, Pushdef): Test this.
* NEWS: Document this change.
* src/builtin.c (numeric_arg): Treat empty string as 0, with a
warning. Detect quoted leading space and overflow as warnings.
(m4_eval): Treat empty radix as 10, and allow output in radix 1.
Treat width as minimum number of digits, as required by POSIX.
(m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
arguments.
(m4_substr): Likewise. Silently treat empty start as 0.
(m4_undivert): Treat ` 1a' as file, not diversion 1.
* src/eval.c (eval_lex): Parse radix 1 numbers.
* doc/m4.texinfo (Invoking m4): Fix wording; there is more than
one type of warning.
(Manual): Document behavior of numeric parsing of empty string.
(Divert, Incr): Document error handling.
(Eval): Document radices better.
(Incompatibilities): Document translit incompatibility.
* NEWS: Document these changes.
* Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
(web-manual): Simplify.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
* Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
(MAINTAINERCLEANFILES): Clean it as well.
* doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
(MAINTAINERCLEANFILES): Clean it as well.
2006-07-12 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Extensions): Document how to overcome
implementation difference in > 9 positional parameters.
* src/m4.c (usage): Sort within sections.
(nesting_limit): Raise default from 250 to 1024.
* doc/m4.texinfo: Use file name, not filename, per GNU coding
standard. Use @option where appropriate.
(Invoking m4): Sort to match --help output.
(Debug Levels): Sort.
(Frozen files): Sort and break into two nodes.
* src/m4.c (nesting_limit): Raise default from 250 to 1024.
* NEWS: Document raised -L limit.
2006-07-11 Eric Blake <ebb9@byu.net>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
stress-test changeword before a release.
* doc/m4.texinfo: More doc cleanups.
(Copying This Manual): New node; actually include the FDL in the
documentation.
* doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
* NEWS: Mention documentation improvements.
* src/m4.h (OS2): New platform macro.
* src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
platform macro.
* doc/m4.texinfo (Platform macros): Document it.
(Sysval): Remove non-portable test of system("").
* NEWS: Document this change.
Reported by Andreas Buening.
2006-07-09 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Undivert): Fix typo in last commit.
* src/m4.c (usage): Document M4PATH.
* src/path.c (path_search): Reject empty string.
* src/output.c (insert_diversion): Ignore diversion 0.
* src/builtin.c (m4_undivert): Ignore empty string.
* NEWS: Document this fix.
2006-07-08 Eric Blake <ebb9@byu.net>
* checks/get-them: Make filtering easier.
* checks/check-them: Filter non-input lines, so line counts are
more realistic in the documentation, and so changeword tests work
even when dnl is disabled.
* doc/m4.texinfo: Adjust example line numbers. Clean up
front-matter, following autoconf's example.
(Changeword): Enable tests, skipping if changeword not supported.
(Define, Defn, Ifelse): Backport more examples from head.
(Input processing, Answers): New nodes, backported from head.
(Include): Expand test to cover empty filename.
(Undivert): Add test of undivert(0).
2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/m4.texinfo: Fix spelling errors.
2006-07-07 Eric Blake <ebb9@byu.net>
* THANKS: Update.
* doc/Makefile.am (m4.1): No need to go through a temporary file;
this also ensures timestamps are updated.
* src/m4.h (includes): Require config.h. Assume string.h,
stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
than prototyping ourselves.
(builtin_func): Add parameter type-checking.
(voidstar): Delete, now that we assume C89.
* src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
voidstar changed.
* src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
xfree.
2006-07-06 Eric Blake <ebb9@byu.net>
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
binary-io.
* src/m4.h (includes): Add binary-io.h for O_BINARY.
* src/freeze.c (produce_frozen_state): Use O_BINARY to remove
#ifdef. Fixes patch from 2005-02-03 for cygwin.
* NEWS: Mention this fix.
* configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
* src/builtin.c (m4_syscmd): Work around OS/2 bug.
* Makefile.am (SUBDIRS): Build . before src, so that autoheader
runs first when needed.
* doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
once in srcdir rather than multiple times in VPATH builds.
2006-07-03 Eric Blake <ebb9@byu.net>
* checks/check-them: Use portable = in test.
* src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
directory, as required by Solaris cc. Include built headers, as
required by Solaris make in VPATH build.
* checks/Makefile.in: Use $(srcdir) where needed.
(CHECKS): Factor $(srcdir) into macro.
(DISTFILES): Likewise. Automake takes care of distributing
Makefile.in.
(dist): Simplify.
(Makefile): Use modern syntax of config.status.
* doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
Avoid overfull and underfull hboxes in dvi.
Fix 'make check' in VPATH build. All files included by testsuite
now live in a single directory. Use forloop.m4 in testsuite.
* checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
here...
* examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
here.
* checks/Makefile.in (DISTFILES): Don't distribute moved files.
* examples/Makefile.am (EXTRA_DIST): Distribute new files.
* checks/check-them: Avoid s/// when filename is in pattern.
* examples/forloop.m4: Fix to match documentation.
* doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
new locations.
(Loops, Format): Actually use forloop.m4 in tests.
2006-07-02 Eric Blake <ebb9@byu.net>
* checks/Makefile.in (exec_prefix, prefix): New macros, so that
$(bindir) works in installcheck.
(check, installcheck): No longer change directory, so that
distcheck works with a read-only builddir.
* checks/check-them: Work when pwd is no longer builddir.
2006-07-01 Eric Blake <ebb9@byu.net>
* GNUmakefile: New file, borrowed from coreutils.
* Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
* Makefile.maint (Makefile): Delete this rule, now that
GNUmakefile includes Makefile.
2006-06-30 Eric Blake <ebb9@byu.net>
For compatibility with other m4 implementations, sysval returns
signal<<8 rather than 0 if syscmd is terminated by a signal.
* configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
* src/builtin.c (include): Include sys/wait.h when stdlib.h does
not provide wait macros.
(WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
(M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
(m4_esyscmd): Set sysval to -1 on failure.
(m4_sysval): Print 127 on failure, and accomodate signals if they
are detectable.
* NEWS: Document this change.
* doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
last commit.
* checks/check-them: Likewise.
* src/debug.c (debug_set_file): Work around mingw fstat bug.
* src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
* src/freeze.c (produce_frozen_state): Use new spelling of
platform macro.
* src/builtin.c (predefined_tab): Add __windows__ on non-unix
platforms.
(m4_syscmd, m4_esyscmd): The empty command is successful.
* doc/m4.texinfo (Shell commands): Rename from UNIX commands.
Document platform-dependence of system().
(Syscmd): Add example.
(Esyscmd): Make example more robust, and actually demonstrate
rescanning.
(Sysval): Expand test to cover esyscmd code path, and to check
that empty command is successful. Add conditional check for
signal behavior.
(Other Incompatibilities): Move platform macros from here...
(Platform macros): ...to this new node. Add windows macro.
Check that exactly one platform macro is provided.
* checks/check-them: Improve trap cleanup. Tolerate dirname and
.exe in error messages. Allow for skipping checks.
* configure.ac (HAVE_EFGCVT): Kill dead configure check.
* NEWS: Document platform macros.
2006-06-29 Eric Blake <ebb9@byu.net>
Fix buffer overrun bug.
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
xvasprintf.
* src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
variant instead, since [efg]cvt are obsolete and our use of them
was buggy (savannah sr #104303).
(format): Fix buffer overflow by using xasprintf.
* doc/m4.texinfo (Format): Expand format test to catch both bugs.
* NEWS: Document this fix.
* configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
cross-compilation.
(AC_CACHE_CHECK): Cache search for ecvt.
2006-06-27 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Eval): Document 32-bit signed limitations
required by POSIX, and add example that exposed core dump on x86
architectures.
(Incompatibilities): Document incompatibility in eval precedence.
* src/eval.c (shift_term): Explicitly mask, to avoid undefined
behavior.
(mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
* NEWS: Document this change.
* doc/m4.texinfo: Use @noindent consistently.
(Quoting Arguments): Document that unquoted parentheses group
arguments.
(Pseudo Arguments): Expand tests to show this.
(Incompatibilities): Contrast traditional behavior of
changequote.
2006-06-24 Eric Blake <ebb9@byu.net>
* configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
(AC_CHECK_HEADERS_ONCE): Use this new feature.
(AC_CHECK_FUNCS_ONCE): Likewise.
2006-06-23 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo: Quoting cleanup throughout - follow
autoconf-recommended style of one level of quote per parenthesis
in the normal case. Adjust error messages to match GNU coding
standards (and to allow 'make check' to pass again).
(Quoted strings, Inhibiting Invocation): Turn more examples into
tests.
(Comments): Resolve FIXME by adding example.
(Define): Add example about underquoting.
(Defn): Add example about use of $0.
(Indir, Format): Resolve FIXME done in last commit.
(Ifelse): Add example about creating blind macro.
(Debugging): Fix grammar.
(Dnl): Add example about dnl with arguments.
(M4wrap): Be explicit that LIFO order is non compliant, and will
change in m4 2.0.
(Undivert): Resolve FIXME by adding example.
(Frozen files): Document that m4wrap and sysval will not work
consistently until m4 2.0.
(Incompatibilities): Document another POSIX compliance bug, this
time with changequote. Document a traditional incompatibility
with partial input spanning file boundaries.
Make error messages more consistent with GNU coding standards -
start with lower case, and don't end sentence with punctuation.
* src/debug.c (trace_pre): Update message wording.
* src/eval.c (evaluate, cmp_term, shift_term, mult_term):
Likewise.
* src/freeze.c (produce_frozen_state, issue_expect_message),
(reload_frozen_state): Likewise.
* src/input.c (push_string_init, pop_init, init_macro_token),
(peek_input, next_char_1, set_word_regexp, next_token): Likewise.
* src/m4.c (stackovf_handler, main): Likewise.
* src/macro.c (expand_token, expand_argument, call_macro),
(expand_macro): Likewise.
* src/output.c (make_room_for, output_text, insert_file),
(freeze_diversions): Likewise.
* src/symtab.c (symtab_init, lookup_symbol): Likewise.
* src/builtin.c (builtin_tab): Make format and indir blind.
(substitute): Prefer "Warning:" vs. "ERROR:" in messages.
* NEWS: Mention the change to builtins.
2006-06-22 Eric Blake <ebb9@byu.net>
Robustify frozen file format.
* src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
macro. Require V first, and only accept it once. For F, use
placeholder if builtin is not found, rather than warning.
* src/m4.h (m4_placeholder): New prototype.
* src/builtin.c: Unify error message style.
(m4_placeholder): New function, warn if invoked.
(builtin_tab): Add m4_placeholder.
(m4_defn): Warn if placeholder is encountered.
(find_builtin_by_addr): Handle placeholder.
(find_builtin_by_name): Return placeholder on failure.
(m4_builtin): Treat placeholder as undefined.
* doc/m4.texinfo (Frozen files): Document changes in V and F.
* NEWS: Document this change.
Reported by Bruno Haible.
* doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
(tabchar): New macro, so that 'make check' still works.
(Invoking m4): Document that ignored compatibility options -B, -S,
and -T each consume an argument.
* checks/get-them: Honor @tabchar{}.
Avoid compiler warnings during -DDEBUG.
* src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
[DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
* src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
(lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
(next_token) [DEBUG_INPUT]: Print before returning.
* src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
* src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
Avoid mkstemp bugs on various platforms.
* m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
* src/output.c [! HAVE_MKSTEMP]: Delete.
* configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
* src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
* NEWS: Document this.
* Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
Reported by Bruno Haible.
2006-06-21 Eric Blake <ebb9@byu.net>
Avoid obsolete sigstack when POSIX sigaltstack is available.
* src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
do likewise.
* configure.ac (AC_CHECK_HEADERS): Likewise.
(AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
obsolete and most hosts now have it in signal.h.
(AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
(AC_CACHE_CHECK): Cache decision to use stackovf.
(AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
* src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
(SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
simplify later code.
(PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
in case of dereferencing a member of a NULL pointer.
(sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
POSIX handler.
(setup_stackovf_trap): Use NULL instead of 0 for pointers, use
EXIT_FAILURE in error, indent preprocessor directives.
[HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
siginfo.h.
[HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
Reported by Santiago Vila.
2006-06-19 Eric Blake <ebb9@byu.net>
* THANKS: Update.
2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
* checks/Makefile.in (PATH_SEPARATOR): New macro.
(check, installcheck): Use it, for OS/2.
2006-06-18 Eric Blake <ebb9@byu.net>
Consistently use "GNU M4" as package name, "m4" as executable
name.
* NEWS: Document previous fix.
* THANKS: Update.
* README: Fix grammar. Document that --enable-changeword is on
its last leg.
* doc/m4.texinfo (Top, Changeword): Likewise.
(Sysval): Enhance this test.
(History): Backport this section from CVS head, and update.
2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
Eric Blake <ebb9@byu.net>
* src/builtin.c (WEXITSTATUS): Provide fallback definition.
(m4_esyscmd): Set sysval to 0xffff, to accomodate both
big-endian and little-endian wait status definitions.
(m4_sysval): Use WEXITSTATUS.
Reported by Andreas Buening.
2006-06-18 Eric Blake <ebb9@byu.net>
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes in 1.4.4c.
2006-06-17 Eric Blake <ebb9@byu.net>
Release 1.4.4b:
* configure.ac (AC_INIT): Bump version number.
* NEWS: Describe changes since 1.4.4.
* Makefile.maint (cvs-news): Accomodate copyright line wrapping.
* Makefile.am (MAINTAINERCLEANFILES): Clean files added by
bootstrap.
* checks/Makefile.in (maintainer-clean): Add missing target.
* COPYING: Remove generated file from CVS.
2006-06-16 Eric Blake <ebb9@byu.net>
* checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
2006-06-15 Eric Blake <ebb9@byu.net>
* checks/wrapfifo.m4: New file. Use it...
* doc/m4.texinfo (Incompatibilities): here, in a new test case to
demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
* src/m4.h (to_uchar): New function.
* src/eval.c (eval_lex): Use it to avoid passing signed char to
isdigit, isalpha, isupper, islower, isspace, isalnum.
* src/builtin.c (expand_user_macro): Likewise.
* src/format.c (format): Likewise.
* src/macro.c (expand_argument): Likewise.
* NEWS: Document this security fix.
Message cleanup.
* src/symtab.c (lookup_symbol): Use invalid, not illegal.
* src/freeze.c (reload_frozen_state): Fix typo in message.
(produce_frozen_state): Standardize on builtin, not built-in.
* src/builtin.c (numeric_arg, bad_argc): Likewise.
* configure.ac (M4_EARLY, M4_INIT): Use gnulib.
(AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
(AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
gnulib.
* Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
* m4/gnulib-cache.m4: New file, from gnulib.
* bootstrap: Invoke gnulib-tool --update.
* src/m4.c (main): Cast away const.
* NEWS: Document that regex is updated.
* THANKS: Update.
2006-06-08 Eric Blake <ebb9@byu.net>
* configure.ac (changeword): Work even when changeword is not a
macro.
(AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
Delete; now done by automake.
(AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
2006-06-07 Eric Blake <ebb9@byu.net>
* lib/regex.c (bcmp_translate): Canonicalize type name.
* doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
* configure.ac (changeword): Disable changeword for the creation
of configure, in case of bootstrapping with an m4 configured with
--enable-changeword.
Distribute a rudimentary man page.
* Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
can feed help2man.
* doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
(SUFFIXES, m4.1): New macros and rules to build m4.1.
2006-06-06 Eric Blake <ebb9@byu.net>
* lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
compiler warnings at -O2.
* lib/getopt.c (_getopt_internal): Likewise.
Cleanup of previous patches.
* src/input.c (struct input_block): Remove traced member.
(push_macro, init_macro_token): Don't pass trace status around.
* src/m4.h (struct token_data): Remove traced member.
(struct symbol, struct builtin): Reduce unused space.
(TOKEN_DATA_FUNC): Simplify.
(TOKEN_DATA_FUNC_TRACED): Remove unused macro.
(push_macro, define_builtin): Remove unused parameter.
* src/builtin.c (define_builtin, builtin_init, define_macro),
(m4_defn): Don't pass trace status around.
* src/macro.c (expand_argument): Likewise.
* src/freeze.c (reload_frozen_state): Likewise.
* src/symtab.c: Whitespace cleanup.
* NEWS: Clean up wording.
* doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
ensure tests actually expose bugs prior to today's patches.
Trace status of builtins is no longer inherited across
define(...,defn(...)). Fixes bug that autom4te had been working
around.
* src/builtin.c (define_builtin): Don't override trace status.
* doc/m4.texinfo (Trace): Add test for this.
* NEWS: Document this.
When changing macro definitions inside the arguments to the macro,
consistently preserve the old definition that was in effect before
argument collection, similar to the C pre-processor.
Reported by John Brzustowski.
* NEWS: Document this change.
* doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
this policy, and add tests that expose core dumps prior to this
patch.
* src/m4.h (struct symbol): New members to track when a symbol is
still in use after removal from the symbol table.
(SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
(free_symbol): Prototype.
* src/macro.c (expand_macro): Track pending expansions of a
symbol. On completion, if a symbol is deleted and no longer
pending, free its memory.
* src/symtab.c (free_symbol): Export. Don't free memory if symbol
is still in use.
(lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
is still in use.
(lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
in use as deleted and remove from the table without freeing
memory.
(symtab_print_list) [DEBUG_SYM]: More debug output.
* src/symtab.c (hack_all_symbols): Allow certain modifications of
the symbol table during traversal.
* src/builtin.c (set_trace): Replace SYMBOL_DELETE with
SYMBOL_POPDEF, since only the latter is safe with
hack_all_symbols.
Solve crash when passing "indir(`foo')" to "m4 -tfoo".
* src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
Preserve placeholder when macro is being traced.
* src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
symbol is not defined.
(set_trace): Remove placeholder when no longer traced.
(m4_traceon): On named traces, always reserve a slot in the
symbol table.
(m4_traceoff): Don't warn about untracing a nonexistent symbol.
* NEWS: Document new trace behavior.
* doc/m4.texinfo (Trace): Tracing by name now consistently works
no matter whether that macro is currently defined.
(Incompatibilities): Document differences between traditional and
GNU trace.
2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
Eric Blake <ebb9@byu.net>
* src/m4.h (hash_table_size): Now size_t instead of int.
* src/m4.c (hash_table_size): Likewise.
(main): Adjust to this; use atol rather than atoi.
* src/symtab.c: Include <limits.h>, for CHAR_BIT.
(symtab_init, lookup_symbol, hack_all_symbols):
Use size_t for sizes and indexes, not int.
(symtab_print_list) [DEBUG_SYM]: Likewise.
(hash): Likewise. Don't case-fold in the hash function.
Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
Don't assume hash word is 32 bits.
* NEWS: Document this change.
2006-06-04 Eric Blake <ebb9@byu.net>
* src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
to allow compilation, for use in debugger.
(profiles, current_mode) [DEBUG_SYM]: New variables.
(show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
determining hash table performance.
2006-05-31 Eric Blake <ebb9@byu.net>
John Brzustowski <jbrzusto@fastmail.fm>
* src/input.c (input_stack): Delete; use current_input instead.
(wrapup_stack): Dynamically allocate, so that recursion is handled
properly.
(push_wrapup): Use current wrapup stack.
(pop_wrapup): Rotate wrapup stack to current, and create new
wrapup stack.
(input_init): Dynamically allocate stacks.
* NEWS: Update, now that recursive m4wrap can no longer cause
core dump.
2006-05-31 Eric Blake <ebb9@byu.net>
* lib/getopt.c: Fix copyright year.
* lib/obstack.c: Ditto.
* src/builtin.c: Ditto.
2006-05-30 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
Reported by John Brzustowski.
(Incompatibilities): Document known POSIX incompatibilities.
* THANKS: Update.
2006-05-29 Eric Blake <ebb9@byu.net>
* doc/m4.texinfo (Maketemp): Work even when running 'make check'