1 GNU m4 TODO - Tasks that need implementing. -*- outline -*-
2 Copyright (C) 2000, 2001, 2006, 2007, 2008 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 + The following patch needs to be ported from the branch:
10 http://lists.gnu.org/archive/html/m4-patches/2007-03/msg00005.html
11 May be a couple of issues in that thread.
13 + The format builtin needs more power to be like printf(1):
14 http://lists.gnu.org/archive/html/m4-discuss/2007-05/msg00015.html
15 But be aware of compatibility issues in making too many changes.
17 + The test case `other-tests/stackovf.test' does not work.
19 + stack overflow is basically broken
21 The routines to detect stack overflow throuh segv are basically
22 broken. The idea may be fine, but it ends up calling a sigv handler
23 that uses gettext, printf, stdout... all of which are definitely NOT
24 sig-safe. Pity, because the hardcode routine is basically very careful
25 to use write(2), to avoid this.
27 I haven't checked that translation magic is signal-safe.
29 - stdio is not signal-safe in any kind of portable setting anyways.
32 espie@schutzenberger.liafa.jussieu.fr
34 Perhaps the gnulib c-stack module or libsigsegv would be useful:
35 http://lists.gnu.org/archive/html/bug-gnu-utils/2008-01/msg00042.html
37 * FEATURES OR PROBLEMS
39 + m4 should keep an ``execution stack'' of macros, which applications could
40 use in their error messages.
42 + Implement discarding comment delimiters with the syntax table.
44 + Implement qindir. Like indir, except that the result of the macro call
45 is not expanded. Because the input stack might contain a file or a
46 string, it is probably best achieved by making note that the TOS input
47 should be copied rather than rescanned.
54 indir(`include', f)dnl
56 qindir(`include', f)dnl
59 patsubst(qindir(`include', f), `b', x)
62 + Use the TOS input quoting for qindir to fix this undesirable POSIX
70 Stepan Kasal <kasal@ucw.cz>
72 + If configured --with-gmp for multiple precision arithmetic there are
73 some warnings, but it passes the tests.
75 + Make m4 show include dependencies like gcc so Makefile targets are
76 updated when their (included) input files are updated (Erick B).
78 + Add support for wide character sets.
81 * OPTIMIZATION AND CLEAN UP
83 + Have NULs go really undisturbed through GNU m4
84 GNU m4 is lousy regarding NULs in streams (this would require
85 maintaining the string lengths, and avoiding strlen, strcpy,
86 etc.). (Almost there, once argv_ref is ported).
88 + The argument count limits are handled for all tokens passed around by
89 the internals: we should enable attaching these values to text macros
92 + The context parameter is just a placeholder for formerly global state.
93 We should be making the library reentrant so that multiple instances
94 of m4 can be run in the same process at the same time.
96 + The path management stuff (in path.c/m4private.h) is reinventing the
97 wheel. There are a bunch of fast path management and search functions
98 in ltdl.c: These need to be sanitized, exported through ltdl.h, and
99 then wrapped by the m4module.h path api. path.c can probably be removed
100 entirely at that point.
102 * MODULE SPECIFIC ISSUES
104 + Some way of linking a module statically is needed, for systems
105 without support for dynamic loading.
107 + Some sort of module interface versioning system needs to be implemented
108 in the module loader and the freezer so that m4 can tell if it is being
109 asked to load a frozen file that requires versions of modules with
110 interface versions unsupported by the current release.
112 + The module API should probably use functions, not data exports:
113 http://lists.gnu.org/archive/html/m4-patches/2007-09/msg00012.html
114 Actually, there are several good ideas for module in that thread.
116 + Setting of the module search path within m4 scripts:
118 append(__modulepath__, `/some/modules/live/here')
120 + Module autoloader. This would allow an m4 core with no builtins except
121 for loadmodule(). A default startup script would mark the recognised
122 set of builtins for autoload from the installed module directory on first
123 use. A new cli parameter would inhibit initialisation from this script,
124 so that customised m4 interpreters could be built on the fly!
126 + The module loader needs to differentiate between modules that are in
127 memory and modules that are loaded (i.e. visible) from various context
130 + The perl module should only be built if a suitable perl interpreter
131 is found on the build machine. For that matter, it has been a
132 while since the perl module has even been built, and perl has had
133 new releases in the meantime.