Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2001 11:58:06 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        arch@freebsd.org
Cc:        bde@zeta.org.au
Subject:   Re: Request For Review: libc/libc_r changes to allow -lc_r 
Message-ID:  <200101231958.f0NJw6P24271@vashon.polstra.com>
In-Reply-To: <Pine.BSF.4.21.0101221935540.27700-100000@besplex.bde.org>
References:  <Pine.BSF.4.21.0101221935540.27700-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.4.21.0101221935540.27700-100000@besplex.bde.org>,
Bruce Evans  <bde@zeta.org.au> 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 <errno.h>
>       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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101231958.f0NJw6P24271>