From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#18368: HYBRID_MALLOC broke AIX build Date: Sat, 30 Aug 2014 21:41:57 -0400 Message-ID: <54027D65.8010607@cornell.edu> References: <54025536.7010803@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1409449409 22470 80.91.229.3 (31 Aug 2014 01:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Aug 2014 01:43:29 +0000 (UTC) To: Paul Eggert , 18368@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 31 03:43:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XNuAr-00021E-Mr for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Aug 2014 03:43:21 +0200 Original-Received: from localhost ([::1]:48423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNuAq-00089x-WC for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Aug 2014 21:43:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNuAg-000888-Ma for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 21:43:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNuAZ-000673-4Q for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 21:43:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNuAZ-00066x-16 for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 21:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XNuAY-0003Yb-Kb for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 21:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Aug 2014 01:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18368 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18368-submit@debbugs.gnu.org id=B18368.140944933713608 (code B ref 18368); Sun, 31 Aug 2014 01:43:02 +0000 Original-Received: (at 18368) by debbugs.gnu.org; 31 Aug 2014 01:42:17 +0000 Original-Received: from localhost ([127.0.0.1]:54721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNu9o-0003XP-Al for submit@debbugs.gnu.org; Sat, 30 Aug 2014 21:42:16 -0400 Original-Received: from limerock01.mail.cornell.edu ([128.84.13.241]:55666) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNu9l-0003XA-T8 for 18368@debbugs.gnu.org; Sat, 30 Aug 2014 21:42:14 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id s7V1g0S7011859; Sat, 30 Aug 2014 21:42:00 -0400 Original-Received: from [192.168.1.4] (cpe-67-249-176-226.twcny.res.rr.com [67.249.176.226]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id s7V1fwC6025040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 30 Aug 2014 21:41:59 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <54025536.7010803@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92886 Archived-At: On 8/30/2014 6:50 PM, Paul Eggert wrote: > The trunk's recent HYBRID_MALLOC changes broke the build on AIX. How's this: === modified file 'src/gmalloc.c' --- src/gmalloc.c 2014-08-28 14:48:02 +0000 +++ src/gmalloc.c 2014-08-31 01:29:41 +0000 @@ -19,13 +19,6 @@ The author may be reached (Email) at the address mike@ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ -/* If HYBRID_MALLOC is defined in config.h, then conf_post.h #defines - malloc and friends as macros before including stdlib.h. In this - file we will need the prototypes for the system malloc, so we must - include stdlib.h before config.h. And we have to do this - unconditionally, since HYBRID_MALLOC hasn't been defined yet. */ -#include - #include #if defined HAVE_PTHREAD && !defined HYBRID_MALLOC @@ -1725,6 +1718,17 @@ #undef aligned_alloc #undef free +/* Declare system malloc and friends. */ +extern void *malloc (size_t size); +extern void *realloc (void *ptr, size_t size); +extern void *calloc (size_t nmemb, size_t size); +extern void free (void *ptr); +#ifdef HAVE_ALIGNED_ALLOC +extern void *aligned_alloc (size_t alignment, size_t size); +#elif defined HAVE_POSIX_MEMALIGN +extern int posix_memalign (void **memptr, size_t alignment, size_t size); +#endif + /* See the comments near the beginning of this file for explanations of the following functions. */