Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 29 Jan 2003 20:39:20 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: getopt_long behavior
Message-ID: <20030130013920.GA4679@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <E18dzmF-0002Lr-00@smtp03.mrf.mail.rcn.net> <001301c2c7e8$11fb57e0$78d96f83@pomello> <20030130011501.GB3603@redhat.com> <00b301c2c7ff$c646c5b0$78d96f83@pomello>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <00b301c2c7ff$c646c5b0$78d96f83@pomello>
User-Agent: Mutt/1.5.1i

On Thu, Jan 30, 2003 at 01:34:47AM -0000, Max Bowsher wrote:
>Christopher Faylor wrote:
>> On Wed, Jan 29, 2003 at 10:45:06PM -0000, Max Bowsher wrote:
>>> would you accept a patch making getopt respond to a
>>> "POSIXLY_INCORRECT_GETOPT" envvar?
>>
>> I'll make the change but it won't have the effect you think it will.
>> I guarantee it.  I will even make a snapshot and then you can watch
>> in horror and amazement as setting the environment variable has no
>> effect.
>>
>> And for an answer to the riddle of why this won't immediately do what
>> you want, try this in the winsup/cygwin directory:
>>
>>   grep -i getopt cygwin.din
>>
>> (Remember not to put the -i at the end!)
>
>Ah.  This suggests that the ideal fix would be to have alternate object
>files for getopt, such that programs which really can't cope with
>getopt's reordering can surpress it at link time - something along the
>lines of automode.o, textmode.o, etc.

No, it wouldn't suggest that at all.  Did you try the grep that I
suggested?  getopt isn't exported from cygwin1.dll.  It only lives in
libcygwin.a.

I don't know why the original designers of cygwin decided to do things
this way but it has been this way forever.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

