diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-08 18:12:51 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-12-08 18:12:51 +0000 |
commit | 3afe74123249d0a1a65308b8d1f18849bbe6910e (patch) | |
tree | 7b2f4a7db8efa5ba031b7dca465b1b6e462270d1 /lib/libc/stdlib | |
parent | 5b888a4d430d11f02bafddf08d468c86d7cacf81 (diff) |
In BUGS section, append a warning to not use '-' as the first character
of optstring to avoid a semantic conflict with GNU getopt.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/getopt.3 | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index 0a28fa9e604..7173b62c5c5 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -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 |