From: Peter Maydell <peter.maydell@linaro.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] osdep: Remove local definition of macro offsetof
Date: Mon, 5 Mar 2012 13:49:38 +0000 [thread overview]
Message-ID: <CAFEAcA-F276yFMOfo8KxPHqNtf+UnWSN_h9WDaMwoNB4ZqbPhQ@mail.gmail.com> (raw)
In-Reply-To: <4F54BE41.7040409@suse.de>
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
next prev parent reply other threads:[~2012-03-05 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 6:22 [Qemu-devel] [PATCH] osdep: Remove local definition of macro offsetof Stefan Weil
2012-03-05 13:23 ` Andreas Färber
2012-03-05 13:49 ` Peter Maydell [this message]
2012-03-05 17:29 ` Stefan Weil
2012-03-05 16:53 ` [Qemu-devel] [Qemu-trivial] " 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=CAFEAcA-F276yFMOfo8KxPHqNtf+UnWSN_h9WDaMwoNB4ZqbPhQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.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 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).