1 GNU m4 TODO - Tasks that need implementing. -*- outline -*-
2 Copyright 2000, 2001 Free Software Foundation, Inc.
4 Tell the maintainers at <bug-m4@gnu.org> if you feel like volunteering
5 for any of these ideas or if you have others to add.
9 + m4wrap.1.test fail on Solaris 2.6 using egcs 1.1a compiler (Erick B).
11 + The test case `other-tests/stackovf.test' does not work.
13 + Some characters, such as comma, are still hardcoded, and do not
14 follow changes in the syntax table.
16 + sigstack/sigaltstack and ENOSYS
18 When sigstack or sigaltstack fail with errno == ENOSYS, m4 should
19 fall back silently to not using an alternate signal stack.
20 Otherwise, problems arise in at least the following case: glibc
21 2.1 test releases, built with Linux 2.1 headers (as recommended
22 for glibc 2.1), so the library has sigstack and sigaltstack, but
23 run with a Linux 2.0 kernel, so the kernel support is not present
24 and ENOSYS is returned.
26 (GNU m4 1.4k, built with glibc 2.0.100 (itself built with Linux
27 2.1.126 headers), and running on Linux 2.0.36pre15.)
33 + stack overflow is basically broken
35 The routines to detect stack overflow throuh segv are basically
36 broken. The idea may be fine, but it ends up calling a sigv handler
37 that uses gettext, printf, stdout... all of which are definitely NOT
38 sig-safe. Pity, because the hardcode routine is basically very careful
39 to use write(2), to avoid this.
41 I haven't checked that translation magic is signal-safe.
43 - stdio is not signal-safe in any kind of portable setting anyways.
46 espie@schutzenberger.liafa.jussieu.fr
48 + ~/src/ace % m4 --trace undefine -dV nostromo Err 1$
49 m4 debug: NONE: 0: input read from stdin
51 m4trace:stdin:1: -1- id 1: undefine ...
52 m4trace:stdin:1: -1- id 1: undefine(`undefine') -> ???
53 m4trace:stdin:1: -1- id 1: p@8(...)
60 * FEATURES OR PROBLEMS
62 + m4 should keep an ``execution stack'' of macros, which applications could
63 use in their error messages.
65 + Implement discarding comment delimiters with the syntax table.
67 + Implement qindir. Like indir, except that the result of the macro call
68 is not expanded. Because the input stack might contain a file or a
69 string, it is probably best achieved by making note that the TOS input
70 should be copied rather than rescanned.
77 indir(`include', f)dnl
79 qindir(`include', f)dnl
82 patsubst(qindir(`include', f), `b', x)
85 + Use the TOS input quoting for qindir to fix this bug:
92 Stepan Kasal <kasal@ucw.cz>
94 + The $ used in user defined macros cannot be changed through
95 changesyntax. It should be handled as a modifier.
97 + If configured --with-gmp for multiple precision arithmetic there are
98 some warnings, but it passes the tests.
100 + Make m4 show include dependencies like gcc so Makefile targets are
101 updated when their (included) input files are updated (Erick B).
103 + Sort out all the weird forms of interaction between changesyntax,
104 changecom and changequote. What happens if you install a quote with
105 changequote and removes it with changesyntax and vice versa.
107 + Add support for wide character sets.
110 * OPTIMIZATION AND CLEAN UP
112 + Have NULs go really undisturbed through GNU m4
113 GNU m4 is lousy regarding NULs in streams (this would require
114 maintaining the string lengths, and avoiding strlen, strcpy,
117 + The argument count limits are handled for all tokens passed around by
118 the internals: we should enable attaching these values to text macros
121 + The context parameter is just a placeholder for formerly global state.
122 We should be making the library reentrant so that multiple instances
123 of m4 can be run in the same process at the same time.
125 + The path management stuff (in path.c/m4private.h) is reinventing the
126 wheel. There are a bunch of fast path management and search functions
127 in ltdl.c: These need to be sanitized, exported through ltdl.h, and
128 then wrapped by the m4module.h path api. path.c can probably be removed
129 entirely at that point.
131 * MODULE SPECIFIC ISSUES
133 + Some way of linking a module statically is needed, for systems
134 without support for dynamic loading.
136 + Some sort of module interface versioning system needs to be implemented
137 in the module loader and the freezer so that m4 can tell if it is being
138 asked to load a frozen file that requires versions of modules with
139 interface versions unsupported by the current release.
141 + Setting of the module search path within m4 scripts:
143 append(__modulepath__, `/some/modules/live/here')
145 + Module autoloader. This would allow an m4 core with no builtins except
146 for loadmodule(). A default startup script would mark the recognised
147 set of builtins for autoload from the installed module directory on first
148 use. A new cli parameter would inhibit initialisation from this script,
149 so that customised m4 interpreters could be built on the fly!
151 + The module loader needs to differentiate between modules that are in
152 memory and modules that are loaded (i.e. visible) from various context
155 + The perl module should only be built if a suitable perl interpreter
156 is found on the build machine.
160 + Automake 1.5 doesn't seem to like pkglibexec_LTLIBRARIES +=
161 See modules/Makefile.am.