qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Win32: Fix compilation with SDL.
Date: Thu, 18 Jun 2009 20:11:03 +0200	[thread overview]
Message-ID: <1245348663-9022-1-git-send-email-weil@mail.berlios.de> (raw)

`sdl-config --cflags` defines main = SDL_main
on some platforms. One of these platforms is
Windows with mingw32.

For those platforms, the solution already developed
for __APPLE__ is now applied.

A compiler warning (missing return value) is fixed, too.

Maybe __APPLE__ no longer needs a separate check.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vl.c b/vl.c
index 3242c23..e688837 100644
--- a/vl.c
+++ b/vl.c
@@ -113,12 +113,12 @@
 #endif
 
 #ifdef CONFIG_SDL
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(main)
 #include <SDL.h>
 int qemu_main(int argc, char **argv, char **envp);
 int main(int argc, char **argv)
 {
-    qemu_main(argc, argv, NULL);
+    return qemu_main(argc, argv, NULL);
 }
 #undef main
 #define main qemu_main
-- 
1.5.6.5

             reply	other threads:[~2009-06-18 18:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 18:11 Stefan Weil [this message]
2009-06-18 18:46 ` [Qemu-devel] [PATCH] Win32: Fix compilation with SDL Anthony Liguori
2009-06-18 19:01   ` Stefan Weil
2009-06-18 19:12     ` Anthony Liguori
2009-06-18 19:17       ` Stefan Weil
2009-06-18 20:00         ` Anthony Liguori
2009-06-18 20:49           ` Hollis Blanchard

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=1245348663-9022-1-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --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).