qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: G 3 <programmingkidx@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] cocoa.m issues fixed
Date: Sat, 20 Jun 2009 21:19:32 -0400	[thread overview]
Message-ID: <bd18a40b73fc236ecd330f0b5e433cee@gmail.com> (raw)

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  <programmingkidx@gmail.com>
--- 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 );

             reply	other threads:[~2009-06-21  1:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21  1:19 G 3 [this message]
2009-06-21 10:10 ` [Qemu-devel] [PATCH] cocoa.m issues fixed Andreas Färber
2009-06-21 14:06   ` G 3
2009-06-21 15:23     ` Avi Kivity
2009-06-21 18:07       ` Blue Swirl
2009-06-21 18:16         ` Avi Kivity
2009-06-22 17:05         ` Stuart Brady
2009-06-22 17:35           ` Blue Swirl
2009-06-22 18:47             ` Stuart Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd18a40b73fc236ecd330f0b5e433cee@gmail.com \
    --to=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).