summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2005-03-26 22:02:15 +0000
committermillert <millert@openbsd.org>2005-03-26 22:02:15 +0000
commite9d4ef23d946a5dc8d3e4dbfd67e91b3bb4acc21 (patch)
treee656bec4bd49cf5be18c35b92e606881664bc544 /lib/libc
parentenable compat_hpux and a commented out compat_linux (diff)
downloadwireguard-openbsd-e9d4ef23d946a5dc8d3e4dbfd67e91b3bb4acc21.tar.xz
wireguard-openbsd-e9d4ef23d946a5dc8d3e4dbfd67e91b3bb4acc21.zip
Document that historic BSD getopt(3) set optopt for each char, not just
on error.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/getopt.315
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
index 831d35c0ba2..e0dc3701f90 100644
--- a/lib/libc/stdlib/getopt.3
+++ b/lib/libc/stdlib/getopt.3
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: getopt.3,v 1.30 2004/12/22 16:24:53 jmc Exp $
+.\" $OpenBSD: getopt.3,v 1.31 2005/03/26 22:02:15 millert Exp $
.\"
.Dd December 17, 2002
.Dt GETOPT 3
@@ -311,6 +311,19 @@ the
.Ox
.Fn getopt
supports optional arguments separated by whitespace.
+.Pp
+Historic
+.Bx
+versions of
+.Fn getopt
+set
+.Fa optopt
+to the last option character processed.
+However, this conflicts with
+.St -p1003.1
+which stipulates that
+.Fa optopt
+be set to the last character that caused an error.
.Sh HISTORY
The
.Fn getopt