From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4YIh-0002cq-Ax for qemu-devel@nongnu.org; Mon, 05 Mar 2012 08:50:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4YIH-0005hp-EC for qemu-devel@nongnu.org; Mon, 05 Mar 2012 08:50:06 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:47106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4YIH-0005hJ-B2 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 08:49:41 -0500 Received: by qcsc20 with SMTP id c20so1657808qcs.4 for ; Mon, 05 Mar 2012 05:49:38 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4F54BE41.7040409@suse.de> References: <1330928551-6452-1-git-send-email-sw@weilnetz.de> <4F54BE41.7040409@suse.de> Date: Mon, 5 Mar 2012 13:49:38 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] osdep: Remove local definition of macro offsetof List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: qemu-trivial , Stefan Weil , qemu-devel@nongnu.org On 5 March 2012 13:23, Andreas F=C3=A4rber 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