From owner-freebsd-arch@FreeBSD.ORG Mon Sep 29 18:01:33 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 908EC16A4B3; Mon, 29 Sep 2003 18:01:33 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id E33E343FFD; Mon, 29 Sep 2003 18:01:32 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.9/8.12.3) with ESMTP id h8U11Sgg031863; Mon, 29 Sep 2003 18:01:28 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.9/8.12.3/Submit) id h8U11SML031862; Mon, 29 Sep 2003 18:01:28 -0700 Date: Mon, 29 Sep 2003 18:01:28 -0700 From: Brooks Davis To: arch@freebsd.org, net@freebsd.org Message-ID: <20030930010128.GA31222@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu Subject: finishing the if.h/if_var.h split X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 01:01:33 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Six years and eight months ago, net/if.h was split into if.h and if_var.h. At the time, if_var.h was included at the end if if.h as follows (this is the current code, but it's equivalent): #ifdef _KERNEL struct thread; /* XXX - this should go away soon. */ #include #endif Unfortunately, "soon" hasn't happened yet and it is now tripping me up. To add the if_dev member to struct ifnet (see the forthcoming post on that subject), it is necessary for sys/bus.h to be included in net/if_var.h which in turn requires that if_var.h NOT be included in genassym.c. Since if.h must be included for nfsdiskless support, this means we need to finish the job and remove the include if_var.h from if.h. It involves editing a large number of files, but over all it's pretty mechanical as it simple includes adding and include of if_var.h after the if.h include in files that break after the change. Does this sound reasonable? -- Brooks P.S. The alternative is to add a second typedef of device_t to if_var.h. It's an ugly solution since it and the definition in sys/bus.h would have to look like the one below, but it would be a heck of a lot easier. #ifndef _DEVICE_T_DECLARED typedef struct device *device_t; #define _DEVICE_T_DECLARED #endif --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/eNXlXY6L6fI4GtQRArpKAJ9renTX9Wzn1Ui/mMg0wKCGANXpngCfQhu1 ACJ4kydQbKRn3SJuqNmFtRY= =eusb -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK--