From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxoAE-00037H-JN for qemu-devel@nongnu.org; Wed, 15 Feb 2012 18:21:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxoAA-0001By-7A for qemu-devel@nongnu.org; Wed, 15 Feb 2012 18:21:30 -0500 Received: from mail-qw0-f52.google.com ([209.85.216.52]:36063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxoAA-0001Bs-1F for qemu-devel@nongnu.org; Wed, 15 Feb 2012 18:21:26 -0500 Received: by qafi31 with SMTP id i31so1662651qaf.4 for ; Wed, 15 Feb 2012 15:21:25 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4F3C3977.1060306@suse.de> References: <1329293521-16197-1-git-send-email-zwu.kernel@gmail.com> <4F3B6D1F.9010607@web.de> <20120215093800.GB30825@redhat.com> <4F3C3977.1060306@suse.de> Date: Wed, 15 Feb 2012 23:21:25 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] slirp: remove duplicate definition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=C3=A4rber?= Cc: stefanha@linux.vnet.ibm.com, "Michael S. Tsirkin" , qemu-devel@nongnu.org, zwu.kernel@gmail.com, Zhi Yong Wu , Jan Kiszka On 15 February 2012 23:02, Andreas F=C3=A4rber wrote: > Am 15.02.2012 10:38, schrieb Michael S. Tsirkin: >> why does slirp have all these >> defines in the first place? >> >> slirp/mbuf.h:#define m_nextpkt =C2=A0m_hdr.mh_nextpkt >> slirp/mbuf.h:#define ifs_next m_nextpkt >> >> Seriously, #define for a field name? > Maybe historically > m_hdr.mh_nextpkt was m_nextpkt and someone tried to avoid a full > refactoring. This comes from a BSD header originally, and I guess in the BSD context it would have been preserving source compatibility with older versions of BSD where the fields really were all in the mbuf struct. Here's 4.2BSD, for instance: http://minnie.tuhs.org/cgi-bin/utree.pl?file=3D4.2BSD/usr/src/sys/h/mbuf.h The split out of the header fields and the introduction of these macros seems to have happened somewhere between 4.3BSD-Tahoe in 1988 and 4.3BSD-Reno in 1990: you can see them here: http://minnie.tuhs.org/cgi-bin/utree.pl?file=3D4.3BSD-Reno/src/sys/sys/mbuf= .h Anyway, we can happily clean up since we're not trying to be backward compatible with anything (assuming you have no objection to deleting a historical artefact that's over twenty years old :-)) -- PMM