From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.devel Subject: Re: Recent changes to regex.c break bootstrapping Date: Tue, 21 Feb 2006 00:53:45 +0200 Message-ID: <20060220225345.GA31530@flame.pc> References: <200602200610.k1K6ANa25590@raven.dms.auburn.edu> <43F973F4.9060807@swipnet.se> <87veva3qll.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140502156 7222 80.91.229.2 (21 Feb 2006 06:09:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2006 06:09:16 +0000 (UTC) Cc: "Jan D." , Luc Teirlinck , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 21 07:09:14 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FBQi1-0002DZ-8i for ged-emacs-devel@m.gmane.org; Tue, 21 Feb 2006 07:09:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBQa9-0004EJ-Ge for ged-emacs-devel@m.gmane.org; Tue, 21 Feb 2006 01:01:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FBJvO-0002Sh-FH for emacs-devel@gnu.org; Mon, 20 Feb 2006 17:54:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FBJvM-0002R9-6W for emacs-devel@gnu.org; Mon, 20 Feb 2006 17:54:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBJvM-0002R3-2S for emacs-devel@gnu.org; Mon, 20 Feb 2006 17:54:32 -0500 Original-Received: from [62.1.205.36] (helo=igloo.linux.gr) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FBK1T-0002Ud-Lb for emacs-devel@gnu.org; Mon, 20 Feb 2006 18:00:52 -0500 Original-Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k1KMs7VH023714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 21 Feb 2006 00:54:09 +0200 Original-Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k1KMrmQp031558; Tue, 21 Feb 2006 00:53:48 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Original-Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k1KMrjQO031557; Tue, 21 Feb 2006 00:53:45 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Original-To: Chong Yidong Content-Disposition: inline In-Reply-To: <87veva3qll.fsf@stupidchicken.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.361, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.84, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50846 Archived-At: On 2006-02-20 12:08, Chong Yidong 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().