This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: getopt_long behavior


Giving the impression that ordering of arguments is not significant
is not a good idea in general.  Although what you're looking for is 
an extreme, the fact that you can generally interchange the order 
of flags ( grep -i -c *.c vs grep -c -i *.c) does generate expectations 
for all tools.  This uniformity isn't going to be met by all tools (like 
gcc and linker flags).  So adding to the flexibility as you suggest would 
only tend to increase the inquiries and problems folks currently have for 
these kinds of tools.  I don't think it's wise to look at making any tool 
accept any argument in any order.  I expect you'd find this isn't practical 
anyway.  But, that's just my opinion and it ain't worth much! ;-)

Reasonably speaking, Cygwin targets POSIX compatibility.  For better
or worse, conforming to this standard comes with certain restrictions
on behavior.  I can only offer the consolation that at least since 
Cygwin is open-source, you have the option to build it the way you 
want it, if you want it bad enough. ;-)

Larry


Original Message:
-----------------
From: Chris Morgan chrismorgan@rcn.com
Date: Wed, 29 Jan 2003 16:29:47 -0500
To: cygwin@cygwin.com
Subject: getopt_long behavior


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?  Is there still no plan to
switch this behavior back?  I can't imagine I'm the only one
that wishes reordering was supported.

Thanks,
Chris


On Thu, Sep 05, 2002 at 04:52:01AM -0400, chrismorgan@rcn.com
wrote:
>I noticed that getopt() and getopt_long() aren't doing
reordering of
>argv entries.  Searching the cygwin-developers mailing list I
found
>that this is due to compiling with POSIXLY_CORRECT set.  Is
there any
>plan to move back to not setting this variable?

No.

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/


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]