From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1527 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Priorities for next release? Date: Sat, 11 Aug 2012 12:50:49 -0400 Message-ID: <20120811165049.GI27715@brightrain.aerifal.cx> References: <50258541.6000805@gentoo.org> <20120811000553.GD27715@brightrain.aerifal.cx> <5025AD41.3060009@gentoo.org> <22761.132.241.65.128.1344651681.squirrel@lavabit.com> <20120811023602.GF27715@brightrain.aerifal.cx> <20120811122712.GG27715@brightrain.aerifal.cx> <20120811160950.GH27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1344703805 22309 80.91.229.3 (11 Aug 2012 16:50:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 16:50:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1528-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 11 18:50:02 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T0Esz-0007jh-NK for gllmg-musl@plane.gmane.org; Sat, 11 Aug 2012 18:50:01 +0200 Original-Received: (qmail 9254 invoked by uid 550); 11 Aug 2012 16:50:00 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9242 invoked from network); 11 Aug 2012 16:50:00 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1527 Archived-At: On Sat, Aug 11, 2012 at 06:35:12PM +0200, Daniel Cegiełka wrote: > >> argv[0] > > > > I meant program_invocation_name or whatever ugly thing glibc calls it. > > Of course if the goal is to make BSD programs happy, that won't really > > help. I really wish somebody would just fix these programs to save > > argv[0] themselves if they need it (or to hard-code their own names as > > a string literal...) rather than keeping around the historical > > practice of poking at implementation internals of the original libc > > they used.. > > That's what I do now (patches for __progname). Unfortunately some > linux distributions forcing __progname, even Owl: > > in Owl's popa3d we have a #ifdef, which really helps. > > #ifdef HAVE_PROGNAME > extern char *__progname; > #define progname __progname > > http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/startup.c?rev=1.4;content-type=text%2Fplain > > but for Owl's msulogin we need a patch for musl: > > http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/msulogin/msulogin/sulogin.c?rev=1.4;content-type=text%2Fplain Couldn't this code just be fixed to add an argument to usage() and call usage(argv[0]) or even usage(basename(argv[0])) if preferred? Rich