From owner-freebsd-audit Wed Mar 27 2:56: 3 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id CCE7337B405 for ; Wed, 27 Mar 2002 02:55:46 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id VAA31282; Wed, 27 Mar 2002 21:54:38 +1100 Date: Wed, 27 Mar 2002 21:55:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Mark Murray Cc: audit@FreeBSD.ORG Subject: Re: Library __progname cleanups - commit candidate In-Reply-To: <200203270901.g2R91DQE006444@grimreaper.grondar.org> Message-ID: <20020327214800.B3808-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 27 Mar 2002, Mark Murray wrote: > > > retrieving revision 1.3 > > > diff -u -d -r1.3 getprogname.c > > > --- libc/gen/getprogname.c 1 Feb 2002 00:57:29 -0000 1.3 > > > +++ libc/gen/getprogname.c 26 Mar 2002 08:33:48 -0000 > > > @@ -3,10 +3,12 @@ > > > > > > #include > > > > This is missing includes of "namespace.h" and "un-namespace.h", except > > you do things in a nonstandard way. Similarly elsewhere. Not so > > similarly in err.c above (I limited the scopy of the namespace includes > > too carefully there, so they don't already cover ). > > You don't think this "standard way" could be documented somewhere, do you? The logs for the commits that added it should be sufficient. There are hundreds of examples. > > > - snprintf(str, sizeof(str), "%s - Warning: Thread %p attempted to lock %p from %s (%d) was left locked from %s (%d)\n", __progname, curthread, lck, fname, lineno, lck->fname, lck->lineno); > > > + snprintf(str, sizeof(str), "%s - Warning: Thread %p attempted to lock %p from %s (%d) was left locked from %s (%d)\n", _getprogname(), curthread, lck, fname, lineno, lck->fname, lck->lineno); > > > > Disgustingly long line longer than before. > > I'd prefer to solve this with an appropriate indent(1). FreeBSD's indent(1) doesn't understand long lines at all. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message