From owner-freebsd-current Tue May 5 13:19:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA27777 for freebsd-current-outgoing; Tue, 5 May 1998 13:19:18 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA27766 for ; Tue, 5 May 1998 13:19:12 -0700 (PDT) (envelope-from pb@fasterix.frmug.org) Received: (from uucp@localhost) by frmug.org (8.9.0.Beta7/frmug-2.3/nospam) with UUCP id WAA17859 for freebsd-current@freebsd.org; Tue, 5 May 1998 22:18:55 +0200 (CEST) (envelope-from pb@fasterix.frmug.org) Received: (from pb@localhost) by fasterix.frmug.org (8.8.8/8.8.5/pb-19970302) id VAA23078 for freebsd-current@freebsd.org; Tue, 5 May 1998 21:35:32 +0200 (CEST) Message-ID: <19980505213531.A22439@fasterix.frmug.fr.net> Date: Tue, 5 May 1998 21:35:31 +0200 From: Pierre Beyssac To: freebsd-current@FreeBSD.ORG Subject: kernel includes dependencies Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.92.2 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd like to know how nested dependencies on kernel includes are supposed to be resolved. Example: while working on NetBSD's ipflow stuff for inclusion in FreeBSD, I had to add a structure declaration to ip_var.h. This structure introduces a new dependency on net/route.h. But as nested includes seem to be avoided in FreeBSD in the kernel, it looks like I need to add an #include at every place that includes netinet/ip_var.h. This includes userland stuff such as ipfw. [ In that particular case, there is the solution of putting this in a private include ipflow.h, because that new structure isn't used outside of the ipflow stuff ] This all seems odd to me, as I consider such dependencies an implementation issue, and avoiding includes in includes forces the caller to be aware of these supposedly internal dependencies. Is there something I missed ? Is there a magic solution to my problem, which is that it looks a bit painful and error prone to grep through the whole source tree to catch and update utilities such as ipfw which depend on such includes ? -- Pierre Beyssac pb@fasterix.frmug.org pb@fasterix.freenix.org {Free,Net,Open}BSD, Linux : il y a moins bien, mais c'est plus cher Free domains: http://www.eu.org/ or mail dns-manager@EU.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message