From owner-freebsd-audit Mon Mar 25 4:40:18 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 2A2B237B400 for ; Mon, 25 Mar 2002 04:40:13 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g2PCe3M23881; Mon, 25 Mar 2002 12:40:03 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 g2PCc8xG002769; Mon, 25 Mar 2002 12:38:08 GMT (envelope-from mark@grimreaper.grondar.za) Message-Id: <200203251238.g2PCc8xG002769@grimreaper.grondar.org> To: Bruce Evans Cc: audit@FreeBSD.ORG Subject: Re: src/lib __progname cleanup ; review please References: <20020325221929.W879-100000@gamplex.bde.org> In-Reply-To: <20020325221929.W879-100000@gamplex.bde.org> ; from Bruce Evans "Mon, 25 Mar 2002 22:42:01 +1100." Date: Mon, 25 Mar 2002 12:38:08 +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 > > -char *__progname = empty; > > +const char *__progname = empty; > > Why is the empty string spelled differently on i386's (aout case) only? I assume you mean "blank"? Changed to that. > > - char *s; > > + const char *s; > > This change is missing in most places. Fixed. > You might fix the style bugs involving this line when changing it. If "style bugs" mean the declaration should be moved to the top of the function, then fixed. > > Index: libc/gen/err.c > > =================================================================== > > RCS file: /home/ncvs/src/lib/libc/gen/err.c,v > > retrieving revision 1.12 > > diff -u -d -r1.12 err.c > > --- libc/gen/err.c 22 Mar 2002 21:52:05 -0000 1.12 > > +++ libc/gen/err.c 24 Mar 2002 13:42:26 -0000 > > ... > > @@ -110,7 +108,7 @@ > > { > > if (err_file == 0) > > err_set_file((FILE *)0); > > - fprintf(err_file, "%s: ", __progname); > > + fprintf(err_file, "%s: ", getprogname()); > > A version of getprogname() that is not in the application namespace > should be used, since some members of the err() family are called > internally in libc. Similarly elsewhere. This is even more imporartant > in Standard functions like malloc() and getopt(). I don't understand this. > > -extern const char *__progname; > > +#include "../include/libc_private.h" > > Bogus path. The path to libc_private.h is in CFLAGS, and every other > include of libc_private.h in libc/gen depends on this. Similarly > elsewhere. Fixed. ("Elsewhere" == libc only, right?) 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