From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJecz-0007HL-B8 for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJecu-0007F9-OL for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:09 -0500 Received: from [199.232.76.173] (port=45232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJecu-0007F5-Iq for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:04 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:58340) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJecu-0000ez-0a for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:04 -0500 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id DD253138AD3F4 for ; Sun, 13 Dec 2009 03:56:01 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 13 Dec 2009 03:55:31 +0100 Message-Id: <1260672941-9365-2-git-send-email-andreas.faerber@web.de> In-Reply-To: <1260672941-9365-1-git-send-email-andreas.faerber@web.de> References: <1260672941-9365-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: andreas.faerber@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 01/11] Cocoa: ppc64 host support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Fix integer usage in the Cocoa backend: NSInteger is long on LP64. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Appl= icationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid= /20000014-BBCFHHCD This makes the graphical display show up on a ppc64 host. v3: - Confine NSInteger to Mac OS X v10.5 and later Signed-off-by: Andreas F=C3=A4rber --- cocoa.m | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/cocoa.m b/cocoa.m index 55ff2b4..989efd5 100644 --- a/cocoa.m +++ b/cocoa.m @@ -28,6 +28,10 @@ #include "console.h" #include "sysemu.h" =20 +#ifndef MAC_OS_X_VERSION_10_5 +#define MAC_OS_X_VERSION_10_5 1050 +#endif + =20 //#define DEBUG =20 @@ -337,7 +341,11 @@ int cocoa_keycode_to_qemu(int keycode) } else { // selective drawing code (draws only dirty rectangles) (OS = X >=3D 10.4) const NSRect *rectList; +#if (MAC_OS_X_VERSION_MAX_ALLOWED >=3D MAC_OS_X_VERSION_10_5) + NSInteger rectCount; +#else int rectCount; +#endif int i; CGImageRef clipImageRef; CGRect clipRect; --=20 1.6.5.3