Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: <20030130010056 DOT GA3603 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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/