aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2022-05-04 15:56:47 +0530
committerAndreas K. Hüttel <dilfridge@gentoo.org>2022-05-14 23:16:48 +0200
commit193eab7abeba67dfb2ec3a887c141e66cf1a905d (patch)
tree1a6bbe766af2bc7d8083afd509aaabf546c20e03
parentAdd HWCAP2_AFP, HWCAP2_RPRES from Linux 5.17 to AArch64 bits/hwcap.h (diff)
downloadglibc-193eab7abeba67dfb2ec3a887c141e66cf1a905d.tar.gz
glibc-193eab7abeba67dfb2ec3a887c141e66cf1a905d.tar.bz2
glibc-193eab7abeba67dfb2ec3a887c141e66cf1a905d.zip
manual: Clarify that abbreviations of long options are allowed
The man page and code comments clearly state that abbreviations of long option names are recognized correctly as long as they are unique. Document this fact in the glibc manual as well. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Florian Weimer <fweimer@redhat.com> Reviewed-by: Andreas Schwab <schwab@linux-m68k.org> (cherry picked from commit db1efe02c9f15affc3908d6ae73875b82898a489) (cherry picked from commit 31af92b9c8cf753992d45c801a855a02060afc08)
-rw-r--r--manual/getopt.texi3
1 files changed, 2 insertions, 1 deletions
diff --git a/manual/getopt.texi b/manual/getopt.texi
index 5485fc4694..b4c0b15ac2 100644
--- a/manual/getopt.texi
+++ b/manual/getopt.texi
@@ -250,7 +250,8 @@ option, and stores the option's argument (if it has one) in @code{optarg}.
When @code{getopt_long} encounters a long option, it takes actions based
on the @code{flag} and @code{val} fields of the definition of that
-option.
+option. The option name may be abbreviated as long as the abbreviation is
+unique.
If @code{flag} is a null pointer, then @code{getopt_long} returns the
contents of @code{val} to indicate which option it found. You should