From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIBie-0003wp-Kg for qemu-devel@nongnu.org; Sat, 20 Jun 2009 21:19:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIBiZ-0003wd-HR for qemu-devel@nongnu.org; Sat, 20 Jun 2009 21:19:39 -0400 Received: from [199.232.76.173] (port=33445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIBiZ-0003wa-Do for qemu-devel@nongnu.org; Sat, 20 Jun 2009 21:19:35 -0400 Received: from mail-yx0-f192.google.com ([209.85.210.192]:41869) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MIBiZ-0003o6-2l for qemu-devel@nongnu.org; Sat, 20 Jun 2009 21:19:35 -0400 Received: by yxe30 with SMTP id 30so3652090yxe.4 for ; Sat, 20 Jun 2009 18:19:34 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v624) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed From: G 3 Date: Sat, 20 Jun 2009 21:19:32 -0400 Subject: [Qemu-devel] [PATCH] cocoa.m issues fixed List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch allows the file cocoa.m to compile under Mac OS 10.3. MAC_OS_X_VERSION_10_4 isn't defined under Mac OS 10.3. The #define will define it. The method cStringUsingEncoding isn't defined under Mac OS 10.3, so I used a similar function that does work. Signed-off-by: programmingkid --- cocoa.m Wed May 20 16:46:58 2009 +++ cocoa (edited).m Sat Jun 20 20:57:41 2009 @@ -28,6 +28,13 @@ #include "console.h" #include "sysemu.h" +#ifndef MAC_OS_X_VERSION_10_4 +#define MAC_OS_X_VERSION_10_4 1040 +#endif + +#ifndef __LITTLE_ENDIAN__ +#define __LITTLE_ENDIAN__ 0 /* assume PowerPC*/ +#endif //#define DEBUG @@ -55,6 +62,8 @@ } QEMUScreen; int qemu_main(int argc, char **argv); // main defined in qemu/vl.c +int cocoa_keycode_to_qemu(int keycode); + NSWindow *normalWindow; id cocoaView; static DisplayChangeListener *dcl; @@ -783,8 +792,8 @@ if(returnCode == NSCancelButton) { exit(0); } else if(returnCode == NSOKButton) { - char *bin = "qemu"; - char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding]; + char bin[5] = "qemu"; + char *img = (char*)[ [ sheet filename ] cString]; char **argv = (char**)malloc( sizeof(char*)*3 );