From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHIvY-0006TT-1B for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHIvT-0006On-3r for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:35 -0500 Received: from [199.232.76.173] (port=57527 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHIvS-0006Oc-Rr for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:30 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:41136) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHIvS-0005I9-Ge for qemu-devel@nongnu.org; Sun, 06 Dec 2009 10:21:30 -0500 From: Andreas Faerber Date: Sun, 6 Dec 2009 16:21:21 +0100 Message-Id: <1260112882-1799-2-git-send-email-andreas.faerber@web.de> In-Reply-To: <1260112882-1799-1-git-send-email-andreas.faerber@web.de> References: <1260112882-1799-1-git-send-email-andreas.faerber@web.de> Sender: andreas.faerber@web.de Subject: [Qemu-devel] [PATCH v3 2/3] 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: Alexander Graf , Andreas Faerber , Mike Kronenberg , John Arbuckle Fix integer usage in the Cocoa backend: NSInteger is long on LP64. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/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 Faerber Cc: Alexander Graf Cc: Mike Kronenberg Cc: John Arbuckle --- 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" +#ifndef MAC_OS_X_VERSION_10_5 +#define MAC_OS_X_VERSION_10_5 1050 +#endif + //#define DEBUG @@ -337,7 +341,11 @@ int cocoa_keycode_to_qemu(int keycode) } else { // selective drawing code (draws only dirty rectangles) (OS X >= 10.4) const NSRect *rectList; +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) + NSInteger rectCount; +#else int rectCount; +#endif int i; CGImageRef clipImageRef; CGRect clipRect; -- 1.6.5.3