Received: from eggs.gnu.org ([208.118.235.92]:39440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4bAK-00043Y-38 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 11:53:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4bA0-0008Hc-B3 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 11:53:39 -0500 Date: Mon, 5 Mar 2012 16:53:14 +0000 From: Stefan Hajnoczi Message-ID: <20120305165314.GD8197@stefanha-thinkpad.localdomain> References: <1330928551-6452-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1330928551-6452-1-git-send-email-sw@weilnetz.de> Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] osdep: Remove local definition of macro offsetof List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-trivial , qemu-devel@nongnu.org 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 > --- > 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