All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	"Andreas Färber" <afaerber@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] osdep: Remove local definition of macro offsetof
Date: Mon, 05 Mar 2012 18:29:50 +0100	[thread overview]
Message-ID: <4F54F80E.6040401@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA-F276yFMOfo8KxPHqNtf+UnWSN_h9WDaMwoNB4ZqbPhQ@mail.gmail.com>

Am 05.03.2012 14:49, schrieb Peter Maydell:
> On 5 March 2012 13:23, Andreas Färber <afaerber@suse.de> wrote:
>> Am 05.03.2012 07:22, schrieb Stefan Weil:
>>> The macro offsetof is defined in stddef.h. It is conforming to
>>> the standards C89, C99 and POSIX.1-2001 (see man page), so it
>>> is a sufficiently old standard.
>>>
>>> Therefore chances are very high that QEMU never needs a local
>>> definition of this macro.
>
>> Did you check when this was introduced and whether the commit message
>> gave any explanation why?
>
> It's been copied and moved around and rerationalised down to one
> definition since then, but the first offsetof() definition was
> added by Fabrice in fd6ce8f66 in May 2003, with no particular
> comment about it. That is about as close as qemu gets to "it has
> always been this way" :-)
>
> Nearly a decade on, I think dropping it is probably reasonably
> safe.
>
> -- PMM

Thanks for your mail.

If anybody likes historic discussion threads, here is one from 2008:

http://lists.nongnu.org/archive/html/qemu-devel/2008-06/msg00009.html

I am working without the local definition in my QEMU tree since 4 years now.

Cheers,
Stefan W.



WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	"Andreas Färber" <afaerber@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] osdep: Remove local definition of macro offsetof
Date: Mon, 05 Mar 2012 18:29:50 +0100	[thread overview]
Message-ID: <4F54F80E.6040401@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA-F276yFMOfo8KxPHqNtf+UnWSN_h9WDaMwoNB4ZqbPhQ@mail.gmail.com>

Am 05.03.2012 14:49, schrieb Peter Maydell:
> On 5 March 2012 13:23, Andreas Färber <afaerber@suse.de> wrote:
>> Am 05.03.2012 07:22, schrieb Stefan Weil:
>>> The macro offsetof is defined in stddef.h. It is conforming to
>>> the standards C89, C99 and POSIX.1-2001 (see man page), so it
>>> is a sufficiently old standard.
>>>
>>> Therefore chances are very high that QEMU never needs a local
>>> definition of this macro.
>
>> Did you check when this was introduced and whether the commit message
>> gave any explanation why?
>
> It's been copied and moved around and rerationalised down to one
> definition since then, but the first offsetof() definition was
> added by Fabrice in fd6ce8f66 in May 2003, with no particular
> comment about it. That is about as close as qemu gets to "it has
> always been this way" :-)
>
> Nearly a decade on, I think dropping it is probably reasonably
> safe.
>
> -- PMM

Thanks for your mail.

If anybody likes historic discussion threads, here is one from 2008:

http://lists.nongnu.org/archive/html/qemu-devel/2008-06/msg00009.html

I am working without the local definition in my QEMU tree since 4 years now.

Cheers,
Stefan W.

  reply	other threads:[~2012-03-05 17:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05  6:22 [Qemu-trivial] [PATCH] osdep: Remove local definition of macro offsetof Stefan Weil
2012-03-05  6:22 ` [Qemu-devel] " Stefan Weil
2012-03-05 13:23 ` [Qemu-trivial] " Andreas Färber
2012-03-05 13:23   ` Andreas Färber
2012-03-05 13:49   ` [Qemu-trivial] " Peter Maydell
2012-03-05 13:49     ` Peter Maydell
2012-03-05 17:29     ` Stefan Weil [this message]
2012-03-05 17:29       ` Stefan Weil
2012-03-05 16:53 ` [Qemu-trivial] " Stefan Hajnoczi
2012-03-05 16:53   ` [Qemu-devel] " Stefan Hajnoczi

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=4F54F80E.6040401@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=afaerber@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 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.