From owner-freebsd-audit Wed Mar 27 1: 5:19 2002 Delivered-To: freebsd-audit@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id BCE1E37B404 for ; Wed, 27 Mar 2002 01:05:14 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g2R950381103; Wed, 27 Mar 2002 09:05:00 GMT (envelope-from mark@grimreaper.grondar.za) Received: from grimreaper (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.2/8.12.2) with ESMTP id g2R91DQE006444; Wed, 27 Mar 2002 09:01:13 GMT (envelope-from mark@grimreaper.grondar.za) Message-Id: <200203270901.g2R91DQE006444@grimreaper.grondar.org> To: Bruce Evans Cc: audit@FreeBSD.ORG Subject: Re: Library __progname cleanups - commit candidate References: <20020327151238.W2670-100000@gamplex.bde.org> In-Reply-To: <20020327151238.W2670-100000@gamplex.bde.org> ; from Bruce Evans "Wed, 27 Mar 2002 15:48:24 +1100." Date: Wed, 27 Mar 2002 09:01:13 +0000 From: Mark Murray 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 > > 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? > Why not use the standard namespace mechanism? It just happens that > this header provides a convenient place to put prototype for the > implementatation name so that a less hackish mechanism can be used, > but this is surprising. "Standard"? No documentation == no standard. Even the headers themselves have no useful comments. > > - 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). M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message