bug-gnulib
[Top][All Lists]
Advanced

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

Re: POSIXLY_CORRECT not correctly unset in getopt.m4?


From: Dustin J. Mitchell
Subject: Re: POSIXLY_CORRECT not correctly unset in getopt.m4?
Date: Tue, 7 Sep 2010 09:51:12 -0500

On Tue, Sep 7, 2010 at 9:16 AM, Eric Blake <address@hidden> wrote:
> Thanks for the report.  However, I fail to see how getopt.m4 sets
> POSIXLY_CORRECT in perpetuity, because it is immediately followed by
> AS_UNSET if it was determined that POSIXLY_CORRECT was not set prior to the
> test.  While I appreciate the patch, I'd need more convincing why your patch
> helps matters, and why the existing attempt at unsetting POSIXLY_CORRECT is
> not working for you.

I explained in the first email: at the beginning of the macro,
POSIXLY_CORRECT is set but not exported.  As far as I can tell, this
is the normal means of operation for bash when run as /bin/sh.

The gnulib getopt macro then sees that POSIXLY_CORRECT is set and
exports it.  *That* is the bug.  There's no portable way that I can
see to "un-export" an environment variable, so I chose the alternate
solution of not exporting it at all, and just setting the variable in
the C program where it is required.

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com



reply via email to

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