diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3 index 0a28fa9e..7173b62c 100644 --- a/src/lib/libc/stdlib/getopt.3 +++ b/src/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