delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/08/05/07:53:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <025d01c35b48$33c5cd80$017c883e@starfruit>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: "Patrick Eisenacher" <eisenacher AT fillmore-labs DOT com>, <cygwin AT cygwin DOT com>
References: <3F2F92F4 DOT 7030906 AT fillmore-labs DOT com>
Subject: Re: getopt & output reordering (was: xmlto package install question)
Date: Tue, 5 Aug 2003 12:53:34 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

Patrick Eisenacher wrote:
> Talking to Tim Waugh, the author of xmlto, revealed that the order of
> arguments doesn't matter on his system (that's Red Hat, I guess),
> whereas it matters indeed on Cygwin.
>
> Investigating it a bit further revealed that Cygwin's getopt differs
> from what he expected:
>
>> getopt -- o: xmlto -o foo bar
>>
>> should output this:
>>
>>  -o 'foo' -- 'xmlto' 'bar'
>
> Cygwin's getopt outputs like this:
>
> $ getopt -- o: xmlto -o foo bar
>   -- 'xmlto' '-o' 'foo' 'bar'
>
> Checking the archive I found a thread from back in January talking about
> the inability of Cygwin's getopt to do reordering of arguments. I guess
> we're facing here the same issue: the option arguments are not output
> before the non-option arguments.
>
> Was any work done wrt this issue? Is anything planned?

IIRC, the end result of the discussion was that no consensus could be
reached on whether it was better to reorder or not to reorder, so CGF had to
make a ruling, and he ruled not to reorder.

Reordering can be enabled by setting POSIXLY_INCORRECT_GETOPT in the
environment, but because getopt is statically linked, this only works for
programs rebuilt since this change was made, and many haven't been yet.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019