Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 12 Aug 2012 01:55:36 +0800
From: orc <orc@...server.ru>
To: musl@...ts.openwall.com
Subject: Re: Priorities for next release?

On Sat, 11 Aug 2012 12:50:49 -0400
Rich Felker <dalias@...ifal.cx> wrote:

> 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

Or even progname = basename(argv[0]) with global char *progname ?

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.