From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1529 Path: news.gmane.org!not-for-mail From: =?ISO-8859-2?Q?Daniel_Cegie=B3ka?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: Priorities for next release? Date: Sat, 11 Aug 2012 20:41:57 +0200 Message-ID: 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> <20120811165049.GI27715@brightrain.aerifal.cx> <20120812015536.3caa3999@sibserver.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1344710556 3544 80.91.229.3 (11 Aug 2012 18:42:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 18:42:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1530-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 11 20:42:35 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 1T0Gdq-0005l3-Sj for gllmg-musl@plane.gmane.org; Sat, 11 Aug 2012 20:42:31 +0200 Original-Received: (qmail 18366 invoked by uid 550); 11 Aug 2012 18:42:29 -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 18358 invoked from network); 11 Aug 2012 18:42:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=1FqvgN7l/ail0FO5sgh2QQcPq6eoW6a0t4aSrZxA7JQ=; b=fm3w+htabidanPKLa/jGDva28hzlZ03+k3ZdxliFAtqCkIPt3ogxr7av2UQdu+ZsXy ghmNOIuWYh1+BSVk2KEj2MHQYoNkjEepsbY/EF8pAYqhe0JtIKPhQybtfWCkqOHFOLAy 7lWXYssb/Gx6DNPe2sde8S9Ev7dEpI2Kkk1e07F8f4U/pLN3kBmIO+NFvOIVgK6CUdSH POegNm83P1bst4Nko60/PomCXO4zzSZw53u7to688Uz0J80Mhws6Sw0Ccqzygj0x+gQV HgKWxPItnFSu8ZwHiFmmQq/soY3AwbHIaxg9WciLHc3ymmpVSbOmDrJGzliPuyddcE5z Td6w== In-Reply-To: <20120812015536.3caa3999@sibserver.ru> Xref: news.gmane.org gmane.linux.lib.musl.general:1529 Archived-At: >> 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 ? Usually it looks like this: extern char *__progname; 'extern' means __progname must be available to external objects, so in code with main(): #include char *__progname; int main(int argc, char *argv[]) { __progname = argv[0]; printf("%s\n", __progname); return 0; } what you think? It works for me... so why basename(argv[0])? Daniel