[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin

From: Richard W.M. Jones
Subject: Re: [PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin
Date: Fri, 13 Feb 2015 18:42:31 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

On Fri, Feb 13, 2015 at 10:08:08AM -0800, Paul Eggert wrote:
> Richard W.M. Jones wrote:
> >fter some experimentation she came up with the attached patch, which
> >she has tested, and which allows argv[0] to be found by calling a
> >function `_NSGetArgv' (which of course only exists on OS X).
> Yes, unfortunately this appears to be a fix that will solve the
> problem only on OS X.  We need a fix that will work on all
> platforms.

I'm possibly misunderstanding what you mean, but the patch seems to be
a small improvement .. ie. it will work on { glibc, Mac OS X } whereas
currently it only works on { glibc }.  Having it work everywhere seems
impossible since the C standard doesn't define a standard way to
access argv[0] outside main().

> Perhaps change progname.h to understand the problem, and have
> error.c use progname.h?

I'll take a look if I have the time.  I should note I don't have a Mac
machine on which to test changes.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]