qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial <qemu-trivial@nongnu.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] osdep: Remove local definition of macro offsetof
Date: Mon, 5 Mar 2012 16:53:14 +0000	[thread overview]
Message-ID: <20120305165314.GD8197@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1330928551-6452-1-git-send-email-sw@weilnetz.de>

On Mon, Mar 05, 2012 at 07:22:31AM +0100, Stefan Weil wrote:
> 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.
> 
> osdep.h already includes stddef.h, so this patch simply removes
> the unneeded code from the files configure and osdep.h.
> 
> If we ever need the local definition again, it should be added
> to compiler.h (the macro is usually provided with the compiler,
> it is not OS specific).
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  configure |   14 --------------
>  osdep.h   |    3 ---
>  2 files changed, 0 insertions(+), 17 deletions(-)

Andreas and Peter, thanks for looking into whether it's safe to remove
offsetof().  I feel the risk is very low.

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan


      parent reply	other threads:[~2012-03-05 16:53 UTC|newest]

Thread overview: 5+ 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 13:23 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
2012-03-05 13:49   ` Peter Maydell
2012-03-05 17:29     ` Stefan Weil
2012-03-05 16:53 ` Stefan Hajnoczi [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=20120305165314.GD8197@stefanha-thinkpad.localdomain \
    --to=stefanha@gmail.com \
    --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).