Mail Archives: cygwin/2003/01/30/01:01:51
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 -