[Top][All Lists]

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

Re: Updating FreeBSD port

From: Eric Blake
Subject: Re: Updating FreeBSD port
Date: Thu, 21 Sep 2006 07:36:26 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060909 Thunderbird/ Mnenhy/

Hash: SHA1

According to Mikhail Teterin on 9/21/2006 6:57 AM:
> When using the short options, please, stick to the POSIX-provided semantics.

GNU m4 (and many other GNU utilities using getopt_long or argp) already do
just that.  For the three short options required by POSIX, (-s with no
argument, and -D and -U with arguments), m4 parses according to POSIX
requirements (and for -D and -U, a space between the option and its
argument is optional).  For all other options, short or long, they are
extensions to POSIX, and POSIX allows GNU m4 to assign whatever semantics
we want, so long as we comply with the guidelines of POSIX option parsing
plus read up on the Austin group mailing list for how this section will
likely be changing in the next revision of POSIX).  That means we are free
to have -d take an optional argument, in which case there must not be a
space between the short option and its argument, if the argument is
provided.  Just because POSIX discourages optional arguments on the
options it requires (in part because the getopt interface it requires does
not support them) does not mean it forbids them on extensions.

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

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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