From owner-freebsd-arch Tue Jan 23 11:58:31 2001 Delivered-To: freebsd-arch@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id A926637B400 for ; Tue, 23 Jan 2001 11:58:13 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.1/8.11.1) with ESMTP id f0NJw7j05203; Tue, 23 Jan 2001 11:58:07 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.1/8.11.0) id f0NJw6P24271; Tue, 23 Jan 2001 11:58:06 -0800 (PST) (envelope-from jdp) Date: Tue, 23 Jan 2001 11:58:06 -0800 (PST) Message-Id: <200101231958.f0NJw6P24271@vashon.polstra.com> To: arch@freebsd.org From: John Polstra Reply-To: arch@freebsd.org Cc: bde@zeta.org.au Subject: Re: Request For Review: libc/libc_r changes to allow -lc_r In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Bruce Evans wrote: > > (1) Underscores are verbose and ugly. > (2) _foo is usually sufficient. _[a-z] is not entirely in the user > namespace like you are claimed. From the 1990 ISO standard: > "All identifiers that begin with an underscore are always > reserved for use as identifiers with file scope in both the > ordinary identifier and tag name spaces". In practice, this > means that the implementation can use names beginning with > _[a-z] except for macro names and global variables that are > used in macros. E.g., errno must be defined as (*__error()) > and not as (*_error()), since the latter would break the > standard-conforming application code: > #include > void foo(void) { int _error = errno; } > A single underscore is sufficient in all other cases. E.g., > struct member names are in a nested namespace so they don't > conflict with variable names at all. They may still need a > single underscore so that they don't conflict with macro > names. > (3) We have some precedence for using _foo. > (4) NetBSD uses _foo (at least in old versions). So did SVR4, which (I think) introduced weak symbols. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message