From owner-freebsd-hackers Tue May 7 19:38:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mta6.snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240]) by hub.freebsd.org (Postfix) with ESMTP id 2AF2737B408 for ; Tue, 7 May 2002 19:38:22 -0700 (PDT) Received: from kokeb.ambesa.net ([64.172.24.225]) by mta6.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GVR00JOGTZXKL@mta6.snfc21.pbi.net> for freebsd-hackers@FreeBSD.ORG; Tue, 07 May 2002 19:38:22 -0700 (PDT) Received: from kokeb.ambesa.net (localhost [127.0.0.1]) by kokeb.ambesa.net (8.12.3/8.12.3) with ESMTP id g482hqmp076306; Tue, 07 May 2002 19:43:52 -0700 (PDT envelope-from makonnen@pacbell.net) Received: (from mikem@localhost) by kokeb.ambesa.net (8.12.3/8.12.3/Submit) id g482hpmc076305; Tue, 07 May 2002 19:43:51 -0700 (PDT) Date: Tue, 07 May 2002 20:43:50 -0600 From: Mike Makonnen Subject: Re: how does the kernel build process resolve struct defs that arent defined in the compilation unit, declared extern or included in? In-reply-to: To: John Utz Cc: freebsd-hackers@FreeBSD.ORG Message-id: <1020825830.50729.14.camel@kokeb.ambesa.net> MIME-version: 1.0 X-Mailer: Evolution/1.0.2 Content-type: text/plain Content-transfer-encoding: 7BIT References: X-Authentication-warning: kokeb.ambesa.net: mikem set sender to makonnen@pacbell.net using -f Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 2002-05-07 at 19:01, John Utz wrote: > Hi; > > if /usr/src/sys/isa/pnp.c has a structure that is an array of struct > pnp_cinfo and struct pnp_cinfo is only declared in > /usr/src/sys/boot/isapnp.h and struct pnp_cinfo isnt declared extern in > /usr/src/sys/isa/pnp.c and /usr/src/sys/isa/pnp.c doesnt #include > nore does any of the files that pnp.c actually includes, > then how could it possibly compile? i have a pnp.o in my build dir and the > pnp stuff works in my kernel, so i am kinda lost > > any insight into how this works, or any pointer to mistakes i may have > made in interpreting the facts on my box would be greatly appreciated. That declaration is inside an #if 0 block. #if 0 ... #endif The #if will always evaluate to false, so it won't try and compile it. The only reference to it is also #if 0'ed out. Cheers, Mike Makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message