From owner-cvs-all Tue Jun 9 05:32:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA04279 for cvs-all-outgoing; Tue, 9 Jun 1998 05:32:18 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA04203; Tue, 9 Jun 1998 05:32:04 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id LAA03148; Tue, 9 Jun 1998 11:38:22 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id NAA19327; Tue, 9 Jun 1998 13:37:41 +0200 (MET DST) Message-ID: <19980609133741.17754@follo.net> Date: Tue, 9 Jun 1998 13:37:41 +0200 From: Eivind Eklund To: Bruce Evans , cvs-committers@FreeBSD.ORG, phk@FreeBSD.ORG Subject: Re: cvs commit: src/sys/sys time.h References: <199806080115.LAA01973@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199806080115.LAA01973@godzilla.zeta.org.au>; from Bruce Evans on Mon, Jun 08, 1998 at 11:15:24AM +1000 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Mon, Jun 08, 1998 at 11:15:24AM +1000, Bruce Evans wrote: > > Modified files: > > sys/sys time.h > > Log: > > Sigh, all good words are reserved words these days... > > s/private/priv/ > > Why not use the standard method of adding a short prefix for struct > members? Almost all words are reserved for use by applications. What's safe to use as struct members is anything starting with '_' - a program isn't allowed to declare a macro or external identifier starting with '_'. To avoid this infecting the kernel, it is possible to do something like this: #ifdef KERNEL #define _KERNVAR(a) a #else #define _KERNVAR(a) _kernelname_##a #endif struct whatever { int _KERNVAR(cost); }; which creates nice identifiers in-kernel, and avoids polluting the user namespace. Of course, the above gives nasty-looking headerfiles - there is always a tradeoff... Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message