[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recent changes to regex.c break bootstrapping
From: |
Giorgos Keramidas |
Subject: |
Re: Recent changes to regex.c break bootstrapping |
Date: |
Tue, 21 Feb 2006 00:53:45 +0200 |
On 2006-02-20 12:08, Chong Yidong <address@hidden> wrote:
> The 2006-02-19 change to regex.c, changing malloc and realloc to
> xmalloc and xrealloc, doesn't do what it is apparently supposed to do,
> since regex.c defines malloc as xmalloc, realloc as xrealloc, and free
> as xfree when linked with Emacs. For the case when it is not linked
> with Emacs, I added xmalloc and xrealloc definitions (no need for
> xfree, since its only purpose is to call BLOCK_INPUT), and put in the
> same malloc -> xmalloc, realloc -> xrealloc redefinitions.
>
> I hope this is correct way to go. One worry: if another
> non-Emacs-linked file #includes regex.c and defines its own xmalloc,
> ugliness may ensue.
If the intent is to make regex.[ch] as self-reliant as possible,
it may be better to copy xrealloc/xmalloc into regex.c and make
them static.
The etags build is easy to fix with a small patch to etags.c, which
I posted earlier, but I'm not sure if it's ok for regex.c to rely on
its callers to support xrealloc() and xmalloc().