From owner-freebsd-current Thu Apr 27 3:44:11 2000 Delivered-To: freebsd-current@freebsd.org Received: from storm.FreeBSD.org.uk (storm.freebsd.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 4703D37B6A5 for ; Thu, 27 Apr 2000 03:44:07 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (hak.nat.Awfulhak.org [172.31.0.12]) by storm.FreeBSD.org.uk (8.9.3/8.9.3) with ESMTP id LAA78440; Thu, 27 Apr 2000 11:44:03 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id LAA01935; Thu, 27 Apr 2000 11:14:26 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200004271014.LAA01935@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Poul-Henning Kamp Cc: Greg Lehey , current@FreeBSD.ORG, brian@hak.lan.Awfulhak.org Subject: Re: PATCH: Removal of unneeded In-Reply-To: Message from Poul-Henning Kamp of "Thu, 27 Apr 2000 07:16:02 +0200." <62933.956812562@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Apr 2000 11:14:26 +0100 From: Brian Somers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message <20000427094411.G43932@freebie.lemis.com>, Greg Lehey writes: > >On Wednesday, 26 April 2000 at 11:50:11 +0200, Poul-Henning Kamp wrote: > >> > >> New patch at: http://phk.freebsd.dk/misc/sys_kernel_h.patch > >> > >> This patch removes 67 unneeded instances of #include > >> > >> Comments, tests and reviews please. > > > >Have you checked that there are no references which are #ifdefed out? > > Yes, the src/tools/tools/kerninclude script first renames the include > and if the source file still compiles it declares a "no-read" and > leaves the #include intact. The thing that's screwed me up the most doing this sort of thing is something like: #include /* For TUNS* ioctls */ .... #ifdef TUNSIFMODE /* Make sure we're POINTOPOINT */ iff = IFF_POINTOPOINT; if (ID0ioctl(bundle.dev.fd, TUNSIFMODE, &iff) < 0) log_Printf(LogERROR, "bundle_Create: ioctl(TUNSIFMODE): %s\n", strerror(errno)); #endif hence the comments beside many of the includes in ppp. I think the only way to ensure something really can be removed is to compile with & without and ensure that the resulting object is the same modulo embedded compile dates. > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD coreteam member | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message