From: "Andreas Färber" <andreas.faerber@web.de>
To: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Andrzej Zaborowski <andrew.zaborowski@intel.com>,
qemu-devel@nongnu.org, Ben Leslie <benno@benno.id.au>
Subject: Re: [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro
Date: Thu, 08 Dec 2011 01:12:39 +0100 [thread overview]
Message-ID: <4EE000F7.90501@web.de> (raw)
In-Reply-To: <4ED57AF3.3000402@web.de>
Am 30.11.2011 01:38, schrieb Andreas Färber:
> Am 10.11.2011 19:40, schrieb Pavel Borzenkov:
>> Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac
>> OS X host. The patch is based on the Ben Leslie's patch:
>> http://patchwork.ozlabs.org/patch/97859/
>>
>> Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
>
> Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Thanks, applied to the cocoa branch with a minor edit (s/the//).
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/cocoa-for-upstream
Andreas
>> ---
>> block/raw-posix.c | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/block/raw-posix.c b/block/raw-posix.c
>> index 17e1c6f..ee08f80 100644
>> --- a/block/raw-posix.c
>> +++ b/block/raw-posix.c
>> @@ -29,7 +29,7 @@
>> #include "module.h"
>> #include "block/raw-posix-aio.h"
>>
>> -#ifdef CONFIG_COCOA
>> +#if defined(__APPLE__) && (__MACH__)
>> #include <paths.h>
>> #include <sys/param.h>
>> #include <IOKit/IOKitLib.h>
>> @@ -487,7 +487,7 @@ again:
>> }
>> if (size == 0)
>> #endif
>> -#ifdef CONFIG_COCOA
>> +#if defined(__APPLE__) && defined(__MACH__)
>> size = LONG_LONG_MAX;
>> #else
>> size = lseek(fd, 0LL, SEEK_END);
>> @@ -632,7 +632,7 @@ static BlockDriver bdrv_file = {
>> /***********************************************/
>> /* host device */
>>
>> -#ifdef CONFIG_COCOA
>> +#if defined(__APPLE__) && defined(__MACH__)
>> static kern_return_t FindEjectableCDMedia( io_iterator_t *mediaIterator );
>> static kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath, CFIndex maxPathSize );
>>
>> @@ -710,7 +710,7 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags)
>> {
>> BDRVRawState *s = bs->opaque;
>>
>> -#ifdef CONFIG_COCOA
>> +#if defined(__APPLE__) && defined(__MACH__)
>> if (strstart(filename, "/dev/cdrom", NULL)) {
>> kern_return_t kernResult;
>> io_iterator_t mediaIterator;
next prev parent reply other threads:[~2011-12-08 0:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 18:40 [Qemu-devel] [PATCH 0/3] Make GUI frontends optional on Mac OS X Pavel Borzenkov
2011-11-10 18:40 ` [Qemu-devel] [PATCH 1/3] raw-posix: Remove dead code Pavel Borzenkov
2011-12-14 12:03 ` Andreas Färber
2011-11-10 18:40 ` [Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro Pavel Borzenkov
2011-11-30 0:38 ` Andreas Färber
2011-12-08 0:12 ` Andreas Färber [this message]
2011-11-10 18:40 ` [Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch Pavel Borzenkov
2011-12-08 0:41 ` Andreas Färber
2012-01-14 0:42 ` Andreas Färber
2012-01-16 23:46 ` Andrzej Zaborowski
2012-01-17 11:06 ` Andreas Färber
2012-01-17 14:23 ` Andrzej Zaborowski
2012-01-17 14:46 ` Peter Maydell
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=4EE000F7.90501@web.de \
--to=andreas.faerber@web.de \
--cc=andrew.zaborowski@intel.com \
--cc=benno@benno.id.au \
--cc=kwolf@redhat.com \
--cc=pavel.borzenkov@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).