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: 64-bit compilation and printfs Date: Wed, 14 Oct 2009 09:40:06 -0700 (PDT) Message-ID: <200910141640.n9EGe6o7024021@godzilla.ics.uci.edu> References: <4CE21A3C-B51B-45ED-B51B-86072D403E25@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255538939 850 80.91.229.12 (14 Oct 2009 16:48:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Oct 2009 16:48:59 +0000 (UTC) Cc: Emacs-Devel devel To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 14 18:48:49 2009 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.50) id 1My71r-0001Z4-QW for ged-emacs-devel@m.gmane.org; Wed, 14 Oct 2009 18:48:48 +0200 Original-Received: from localhost ([127.0.0.1]:48591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My71r-0001rr-7q for ged-emacs-devel@m.gmane.org; Wed, 14 Oct 2009 12:48:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1My6v7-0001iK-Mf for emacs-devel@gnu.org; Wed, 14 Oct 2009 12:41:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1My6v2-0001ab-P3 for emacs-devel@gnu.org; Wed, 14 Oct 2009 12:41:48 -0400 Original-Received: from [199.232.76.173] (port=60687 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1My6v2-0001aK-AK for emacs-devel@gnu.org; Wed, 14 Oct 2009 12:41:44 -0400 Original-Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]:33098) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1My6v1-0007wr-Rj for emacs-devel@gnu.org; Wed, 14 Oct 2009 12:41:44 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id n9EGe6c3022725; Wed, 14 Oct 2009 09:40:06 -0700 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n9EGe6o7024021; Wed, 14 Oct 2009 09:40:06 -0700 (PDT) In-Reply-To: <4CE21A3C-B51B-45ED-B51B-86072D403E25@gmail.com> (Adrian Robert's message of "Sun, 11 Oct 2009 20:46:27 -0400") Original-Lines: 35 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: n9EGe6c3022725 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu 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:116142 Archived-At: Adrian Robert writes: > In the course of getting the NS port compiling in 64-bit mode, some > other developers and myself discovered some format - arg mismatches in > printfs. XINT and XUINT return EMACS_INT which can be a long under > LP64. I'd like to replace places that use %d in the code with %ld, > and cast the argument to (long) to avoid issues in 32-bit mode. This > has been checked in for the NS port; the patch attached here does this > in common code. Does anyone think this should be done differently? It looks like this the 64-bit mode uses the 32-bit configuration file. >From configure.in: ## Apple Darwin / Mac OS X *-apple-darwin* ) case "${canonical}" in i[3456]86-* ) machine=intel386 ;; powerpc-* ) machine=macppc ;; * ) unported=yes ;; esac there should be an: x86_64-* ) machine=amdx86-64 ;; in that "case". that will allow to remove this from emacs/src/s/intel386.h: #if defined (DARWIN_OS) #ifdef _LP64 /* For Intel Mac, with CC='gcc -arch x86_64'. */ #define NO_ARG_ARRAY #endif #endif there shouldn't be any _LP64 checks in that file.