From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#18368: HYBRID_MALLOC broke AIX build Date: Sat, 30 Aug 2014 15:50:30 -0700 Organization: UCLA Computer Science Department Message-ID: <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 1409439157 13593 80.91.229.3 (30 Aug 2014 22:52:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Aug 2014 22:52:37 +0000 (UTC) To: 18368@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 31 00:52:30 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 1XNrVS-0006Eb-Bg for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Aug 2014 00:52:26 +0200 Original-Received: from localhost ([::1]:47979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNrVS-0003dI-1p for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Aug 2014 18:52:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNrVE-0003bo-H3 for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:52:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNrV4-0008Ej-KK for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:52:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNrV4-0008ET-HE for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XNrV4-0007vC-0B for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Aug 2014 22:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18368 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Emacs bug reports and feature requests Original-Received: via spool by submit@debbugs.gnu.org id=B.140943908130402 (code B ref -1); Sat, 30 Aug 2014 22:52:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2014 22:51:21 +0000 Original-Received: from localhost ([127.0.0.1]:54654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNrUO-0007uH-9V for submit@debbugs.gnu.org; Sat, 30 Aug 2014 18:51:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33839) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XNrUL-0007u3-G0 for submit@debbugs.gnu.org; Sat, 30 Aug 2014 18:51:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNrU6-00086b-A0 for submit@debbugs.gnu.org; Sat, 30 Aug 2014 18:51:12 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNrU6-00086X-7O for submit@debbugs.gnu.org; Sat, 30 Aug 2014 18:51:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNrTy-0003ZO-Ma for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:51:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNrTr-00085z-5y for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:50:54 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:43921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNrTq-00085W-TL for bug-gnu-emacs@gnu.org; Sat, 30 Aug 2014 18:50:47 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id AA87CA60013; Sat, 30 Aug 2014 15:50:39 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QDMy0NQCERLl; Sat, 30 Aug 2014 15:50:31 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EE14FA60002; Sat, 30 Aug 2014 15:50:30 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:92884 Archived-At: The trunk's recent HYBRID_MALLOC changes broke the build on AIX. Here are the first couple of compile-time diagnostics: xlc -c -Demacs -I. -I. -I../lib -I../lib -g3 -O gmalloc.c "/usr/include/unistd.h", line 201.17: 1506-343 (S) Redeclaration of lseek64 differs from previous declaration on line 199 of "/usr/include/unistd.h". "/usr/include/unistd.h", line 201.17: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long". The culprit is this part of gmalloc.c: /* 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 This doesn't work, as must come first for various reasons; I suspect the AIX breakage is just the tip of the iceberg. One possible fix is to declare the system malloc directly, if HYBRID_MALLOC is defined. Another one, which might be safer, is to modify config.h to capture the system malloc before it's redefined. Since AIX does not define HYBRID_MALLOC, I have temporarily worked around the problem on my AIX host by using this in gmalloc.c: #ifdef HYBRID_MALLOC #include #endif #include #include but I suspect this is not the right way to fix the problems on platforms that need HYBRID_MALLOC but have AIX-like problems with redefinitions.