Browse Source

In BUGS section, append a warning to not use '-' as the first character

of optstring to avoid a semantic conflict with GNU getopt.
OPENBSD_3_3
millert 22 years ago
parent
commit
cb897658ca
1 changed files with 13 additions and 3 deletions
  1. +13
    -3
      src/lib/libc/stdlib/getopt.3

+ 13
- 3
src/lib/libc/stdlib/getopt.3 View File

@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: getopt.3,v 1.19 2002/12/04 21:42:22 millert Exp $
.\" $OpenBSD: getopt.3,v 1.20 2002/12/08 18:12:50 millert Exp $
.\"
.Dd April 19, 1994
.Dd December 8, 2002
.Dt GETOPT 3
.Os
.Sh NAME
@ -244,10 +244,20 @@ as an option flag.
This practice is wrong, and should not be used in any current development.
It is provided for backward compatibility
.Em only .
Care should be taken to not to use
.Ql -
as the first character in
.Fa optstring
to avoid a semantic conflict with
.Tn GNU
.Fn getopt ,
which assigns different meaning to an
.Fa optstring
that begins with a
.Ql - .
By default, a single dash causes
.Fn getopt
to return \-1.
This is, we believe, compatible with System V.
.Pp
It is also possible to handle digits as option letters.
This allows


Loading…
Cancel
Save