From owner-freebsd-current Wed Jan 1 13:03:23 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id NAA23684 for current-outgoing; Wed, 1 Jan 1997 13:03:23 -0800 (PST) Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id NAA23677 for ; Wed, 1 Jan 1997 13:03:19 -0800 (PST) Received: from schizo.dk.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0vfXoG-0003whC; Wed, 1 Jan 97 13:02 PST Received: from critter.dk.tfs.com (critter-home [193.162.32.19]) by schizo.dk.tfs.com (8.8.2/8.7.3) with ESMTP id WAA25510; Wed, 1 Jan 1997 22:02:45 +0100 (MET) Received: from critter.dk.tfs.com (localhost.phk.dk [127.0.0.1]) by critter.dk.tfs.com (8.8.2/8.8.2) with ESMTP id WAA13840; Wed, 1 Jan 1997 22:05:36 +0100 (MET) To: Garrett Wollman Cc: current@freebsd.org Subject: Re: and MAKE_SET In-reply-to: Your message of "Wed, 01 Jan 1997 14:57:14 EST." <9701011957.AA19705@halloran-eldar.lcs.mit.edu> Date: Wed, 01 Jan 1997 22:05:35 +0100 Message-ID: <13838.852152735@critter.dk.tfs.com> From: Poul-Henning Kamp Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>>> Isn't it wrong to have MAKE_SET() in ? What if you want >>>> to use it from userland ? >>> >>> Then you write `asm(".stabs blah,blah,blah,blah")'. > >> Yeah, right after `goto L1020;' :-( > >> We're not here to reinvent the wheel all the time. > >I would just as soon see linker sets not used in user-land code, so as >to not diminish its value to other people who are attempting to do >things with it that don't involve using our linker/build environment. >One of the nice things about most of the user-land code as it stands >is that I can take most of the utilities together with some useful >glue from the C library and have things work on other platforms. I don't care much about this, but it prevents me from testing my kernel code in a userland harness :-( I'm going to stick in this patch: Index: kernel.h =================================================================== RCS file: /home/ncvs/src/sys/sys/kernel.h,v retrieving revision 1.22 diff -u -r1.22 kernel.h --- kernel.h 1996/09/20 14:36:14 1.22 +++ kernel.h 1997/01/01 13:25:20 @@ -47,6 +47,7 @@ /* Global variables for the kernel. */ +#ifdef KERNEL /* 1.1 */ extern long hostid; extern char hostname[MAXHOSTNAMELEN]; @@ -72,6 +73,7 @@ extern int tickdelta; extern long timedelta; +#endif /* KERNEL */ /* * The following macros are used to declare global sets of objects, which * are collected by the linker into a `struct linker_set' as defined below. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail.