delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/30/01:01:51

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
Date: Thu, 30 Jan 2003 00:57:57 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: getopt_long behavior
Message-ID: <20030130055757.GA1554@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <E18dzmF-0002Lr-00 AT smtp03 DOT mrf DOT mail DOT rcn DOT net> <20030130010056 DOT GA3603 AT redhat DOT com> <3E38B5DB DOT 5090801 AT ece DOT gatech DOT edu>
Mime-Version: 1.0
In-Reply-To: <3E38B5DB.5090801@ece.gatech.edu>
User-Agent: Mutt/1.5.1i

On Thu, Jan 30, 2003 at 12:19:23AM -0500, Charles Wilson wrote:
>Christopher Faylor wrote:
>>On Wed, Jan 29, 2003 at 04:29:47PM -0500, Chris Morgan wrote:
>>>I orginally posted this message some time ago.  Having all of
>>>the cygwin tools lacking the ability to accept arguments in
>>>arbirtary order makes it more difficult to use them(I often do
>>>grep "string" *.c and then rerun with -i at the end).  Is
>>>there anyway to get around this without recompiling the whole
>>>cygwin suite from source code?
>>
>>No.
>
>Not entirely correct, Chris.  One may simply link a static copy of the 
>[getopt.c  getopt.h  getopt1.c] files to the desired executable.  That's 
>what I did with the gettext library, because gettext's selftests depend 
>on non-POSIXLY-correct commandlines (and reordering the tests wouldn't 
>have worked).

I think that the original poster was looking for a quick fix.  If you
want to experience non-POSIX getopt behavior you can't just set an
environment variable or even make a simple modification to the cygwin
DLL and have that change affect all programs which use the DLL.  You
have to rebuild the utility you're trying to use.

I chose to interpret the "recompile" as indicating "rebuild" since
nearly anyone who wants to use a new version of getopt will have to
rebuild the utility (grep was the example in this case) which uses it
from scratch.  And, they will have to plug in the new version of
getopt into the link step somehow.

>So, if you want a "foo.exe" that allows argument re-ordering, rebuild 
>foo and add getopt.o & getopt1.o to the link command.  Or build a 
>**static** library "libmygetopt" from those two .o's, and use 
>-lmygetopt.  And no recompiling of the cygwin kernel needed.

He didn't say "cygwin kernel".  He said "cygwin suite", as in suite
of programs.  If someone wants a cygwin distribution which uses
non-posix options, they will have to recompile and rebuild the
whole cygwin release.

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/

- Raw text -


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