[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

non-POSIX getopt() (Re: Updating FreeBSD port)

From: Mikhail Teterin
Subject: non-POSIX getopt() (Re: Updating FreeBSD port)
Date: Thu, 21 Sep 2006 10:36:48 -0400
User-agent: KMail/1.9.1

On Thursday 21 September 2006 09:36, Eric Blake wrote:
= > Finally, does m4 actually use/document the short-options usage, that's
= > affected by the POSIX vs. GNU differences in getopt()?
= Yes, the info documentation for m4's -d discusses the ramifications of its
= argument being optional (and if that text is not clear enough for you,
= please report it as a bug so we can improve it).

The bug, IMHO, is in the use of getopt, that departs from POSIX' 
specifications for the function, thus requiring to compile your own version 
of it, which is a patently bad style.

"Embrace and Extend" :-/

I wonder, how GNU's getopt implementation, where flags' arguments can be 
optional, deals with the cases of such an option followed by something, that 
begins with a dash itself:

        m4 -d -X

Is "-X" an argument for -d, or a separate flag?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]