+2010-05-24 Bruno Haible <bruno@clisp.org>
+
+ Use regex module without dependency on 'malloc'.
+ * lib/regex_internal.h.diff: New file.
+ * lib/regexec.c.diff: New file.
+ * modules/regex.diff: New file.
+ * Makefile.am (EXTRA_DIST): Add them.
+
2010-05-23 Bruno Haible <bruno@clisp.org>
Do regex matching purely with regex, not regex + dfa + kwset.
lib/ostream.oo.c \
lib/ostream.oo.h \
lib/progname.h.diff \
+lib/regexec.c.diff \
+lib/regex_internal.h.diff \
lib/styled-ostream.oo.c \
lib/styled-ostream.oo.h \
lib/term-ostream.oo.c \
modules/ostream \
modules/quotearg.diff \
modules/quote.diff \
+modules/regex.diff \
modules/styled-ostream \
modules/termcap \
modules/termcap-h \
--- /dev/null
+*** lib/regex_internal.h.orig Mon May 24 12:36:55 2010
+--- lib/regex_internal.h Mon May 24 12:35:46 2010
+***************
+*** 476,482 ****
+ # define MAX(a,b) ((a) < (b) ? (b) : (a))
+ #endif
+
+! #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
+ #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
+ #define re_free(p) free (p)
+
+--- 476,482 ----
+ # define MAX(a,b) ((a) < (b) ? (b) : (a))
+ #endif
+
+! #define re_malloc(t,n) ((t *) malloc ((n) > 0 ? (n) * sizeof (t) : 1))
+ #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
+ #define re_free(p) free (p)
+
--- /dev/null
+*** lib/regexec.c.orig Mon May 24 12:36:55 2010
+--- lib/regexec.c Mon May 24 12:34:41 2010
+***************
+*** 3425,3431 ****
+ else
+ {
+ dest_states = (re_dfastate_t **)
+! malloc (ndests * 3 * sizeof (re_dfastate_t *));
+ if (BE (dest_states == NULL, 0))
+ {
+ out_free:
+--- 3425,3431 ----
+ else
+ {
+ dest_states = (re_dfastate_t **)
+! re_malloc (re_dfastate_t *, ndests * 3);
+ if (BE (dest_states == NULL, 0))
+ {
+ out_free:
--- /dev/null
+*** modules/regex.orig Mon May 24 12:36:55 2010
+--- modules/regex Mon May 24 12:36:42 2010
+***************
+*** 17,23 ****
+ extensions
+ gettext-h
+ localcharset
+! malloc
+ memcmp
+ memmove
+ mbrtowc
+--- 17,23 ----
+ extensions
+ gettext-h
+ localcharset
+! malloc-posix
+ memcmp
+ memmove
+ mbrtowc