All of lore.kernel.org
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Stefan Weil <weil@mail.berlios.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: [PATCH] win32: Add missing function ffs
Date: Sun, 27 Jun 2010 20:25:45 +0000	[thread overview]
Message-ID: <AANLkTikX0HVNpny-KumY25LcRzla1WVwicP4MTKwZeSI@mail.gmail.com> (raw)
In-Reply-To: <4C23C513.3050606@mail.berlios.de>

Thanks, applied.

On Thu, Jun 24, 2010 at 8:50 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 12.06.2010 16:07, schrieb Stefan Weil:
>>
>> mingw32 does not include function ffs.
>>
>> Commit c6d29ad6e24533cc3762e1d654275607e1d03058 added a
>> declaration for ffs, but an implementation was missing.
>>
>> For compilations with optimization, the compiler creates
>> inline code, so the implementation is not always needed.
>>
>> Without optimization, linking fails without this patch.
>>
>> v2: Use __builtin_ffs as suggested by Richard Henderson
>>
>> Cc: Richard Henderson<rth@twiddle.net>
>> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
>> ---
>>  osdep.c |    7 +++++++
>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/osdep.c b/osdep.c
>> index abbc8a2..dbf872a 100644
>> --- a/osdep.c
>> +++ b/osdep.c
>> @@ -167,6 +167,13 @@ int qemu_create_pidfile(const char *filename)
>>
>>  #ifdef _WIN32
>>
>> +/* mingw32 needs ffs for compilations without optimization. */
>> +int ffs(int i)
>> +{
>> +    /* Use gcc's builtin ffs. */
>> +    return __builtin_ffs(i);
>> +}
>> +
>>  /* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */
>>  #define _W32_FT_OFFSET (116444736000000000ULL)
>>
>>
>
> Ping. The patch should be applied to qemu master.
>
> Thanks,
> Stefan
>
>
>

      reply	other threads:[~2010-06-27 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11 20:57 [Qemu-devel] [PATCH] win32: Add missing function ffs Stefan Weil
2010-06-11 21:35 ` Richard Henderson
2010-06-12 14:07   ` Stefan Weil
2010-06-12 15:52     ` [Qemu-devel] " Richard Henderson
2010-06-24 20:50     ` Stefan Weil
2010-06-27 20:25       ` Blue Swirl [this message]

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=AANLkTikX0HVNpny-KumY25LcRzla1WVwicP4MTKwZeSI@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weil@mail.berlios.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.