diff options
author | millert <> | 2002-12-08 18:12:50 +0000 |
---|---|---|
committer | millert <> | 2002-12-08 18:12:50 +0000 |
commit | e2a937d6505165b947df5bec71c8a4f8c66156cc (patch) | |
tree | 5d7c4527f5f006f49d427639de8470e508cc8265 /src/lib | |
parent | 10cd0723992abc87bfc4d250cd0db10dabf9cf75 (diff) | |
download | openbsd-e2a937d6505165b947df5bec71c8a4f8c66156cc.tar.gz openbsd-e2a937d6505165b947df5bec71c8a4f8c66156cc.tar.bz2 openbsd-e2a937d6505165b947df5bec71c8a4f8c66156cc.zip |
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 'src/lib')
-rw-r--r-- | src/lib/libc/stdlib/getopt.3 | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3 index 0a28fa9e60..7173b62c5c 100644 --- a/src/lib/libc/stdlib/getopt.3 +++ b/src/lib/libc/stdlib/getopt.3 | |||
@@ -29,9 +29,9 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: getopt.3,v 1.19 2002/12/04 21:42:22 millert Exp $ | 32 | .\" $OpenBSD: getopt.3,v 1.20 2002/12/08 18:12:50 millert Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd April 19, 1994 | 34 | .Dd December 8, 2002 |
35 | .Dt GETOPT 3 | 35 | .Dt GETOPT 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -244,10 +244,20 @@ as an option flag. | |||
244 | This practice is wrong, and should not be used in any current development. | 244 | This practice is wrong, and should not be used in any current development. |
245 | It is provided for backward compatibility | 245 | It is provided for backward compatibility |
246 | .Em only . | 246 | .Em only . |
247 | Care should be taken to not to use | ||
248 | .Ql - | ||
249 | as the first character in | ||
250 | .Fa optstring | ||
251 | to avoid a semantic conflict with | ||
252 | .Tn GNU | ||
253 | .Fn getopt , | ||
254 | which assigns different meaning to an | ||
255 | .Fa optstring | ||
256 | that begins with a | ||
257 | .Ql - . | ||
247 | By default, a single dash causes | 258 | By default, a single dash causes |
248 | .Fn getopt | 259 | .Fn getopt |
249 | to return \-1. | 260 | to return \-1. |
250 | This is, we believe, compatible with System V. | ||
251 | .Pp | 261 | .Pp |
252 | It is also possible to handle digits as option letters. | 262 | It is also possible to handle digits as option letters. |
253 | This allows | 263 | This allows |