delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/30/00:21:23

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: <3E38B5DB.5090801@ece.gatech.edu>
Date: Thu, 30 Jan 2003 00:19:23 -0500
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: getopt_long behavior
References: <E18dzmF-0002Lr-00 AT smtp03 DOT mrf DOT mail DOT rcn DOT net> <20030130010056 DOT GA3603 AT redhat DOT com>


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).

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.

--Chuck





--
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