From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: alloca() warnings on freebsd Date: Mon, 09 Aug 2010 19:16:33 -0400 Message-ID: References: <87ocdbbfpz.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281395819 28839 80.91.229.12 (9 Aug 2010 23:16:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Aug 2010 23:16:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Giorgos Keramidas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 10 01:16:55 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OibaO-0002Vv-BR for ged-emacs-devel@m.gmane.org; Tue, 10 Aug 2010 01:16:52 +0200 Original-Received: from localhost ([127.0.0.1]:51492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OibaN-0007ls-IG for ged-emacs-devel@m.gmane.org; Mon, 09 Aug 2010 19:16:51 -0400 Original-Received: from [199.232.76.173] (port=56743 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OibaJ-0007ld-Jc for emacs-devel@gnu.org; Mon, 09 Aug 2010 19:16:47 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Oiba7-0002JD-7K for emacs-devel@gnu.org; Mon, 09 Aug 2010 19:16:47 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:34965) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Oiba6-0002J8-VJ for emacs-devel@gnu.org; Mon, 09 Aug 2010 19:16:35 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Oiba5-0003BP-NL; Mon, 09 Aug 2010 19:16:33 -0400 In-Reply-To: <87ocdbbfpz.fsf@kobe.laptop> (Giorgos Keramidas's message of "Tue\, 10 Aug 2010 01\:09\:44 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:128519 Archived-At: Giorgos Keramidas writes: > Some time during the recent past an alloca() prototype was introduced to > config.h that conflicts with the stdlib.h prototype of alloca() on my > FreeBSD laptop. > > The current check near line 1148 of config.in is: > > #ifdef HAVE_ALLOCA_H > # include > #elif defined __GNUC__ > # define alloca __builtin_alloca > #elif defined _AIX > # define alloca __alloca > #else > # include > # ifdef __cplusplus > extern "C" > # endif > void *alloca (size_t); > #endif > > The tricky bit is that FreeBSD *does* have alloca() but not alloca.h, so > the final #else part declares a redundant prototype. This causes a very > minor but frequent warning for all source files that include config.h: > > In file included from /hg/emacs/gker/lib-src/test-distrib.c:23: > ../src/config.h:1152:1: warning: "alloca" redefined > In file included from ../src/config.h:1146, > from /hg/emacs/gker/lib-src/test-distrib.c:23: > /usr/include/stdlib.h:233:1: warning: this is the location of the previous definition > ... > > The attached patch is an attempt to fix this for FreeBSD without > breaking alloca() on other platforms. > > Does it look ok for trunk? What we use now is a shorter version what the autoconf manual recommends. Could you ask the autoconf guys about this, and post the solution here? That would help fix the same problem for other programs, not only for emacs.