aboutsummaryrefslogtreecommitdiffstats
path: root/man3/getopt.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getopt.3')
-rw-r--r--man3/getopt.318
1 files changed, 15 insertions, 3 deletions
diff --git a/man3/getopt.3 b/man3/getopt.3
index 8974a07e7b..503f6890a4 100644
--- a/man3/getopt.3
+++ b/man3/getopt.3
@@ -36,7 +36,7 @@
.\" the start of optstring
.\" Modified 2006-12-15, mtk, Added getopt() example program.
.\"
-.TH GETOPT 3 2008-07-10 "GNU" "Linux Programmer's Manual"
+.TH GETOPT 3 2008-08-29 "GNU" "Linux Programmer's Manual"
.SH NAME
getopt, getopt_long, getopt_long_only,
optarg, optind, opterr, optopt \- Parse command-line options
@@ -50,8 +50,6 @@ optarg, optind, opterr, optopt \- Parse command-line options
.BI "extern char *" optarg ;
.BI "extern int " optind ", " opterr ", " optopt ;
.sp
-.B #define _GNU_SOURCE
-.br
.B #include <getopt.h>
.sp
.BI "int getopt_long(int " argc ", char * const " argv[] ,
@@ -62,6 +60,20 @@ optarg, optind, opterr, optopt \- Parse command-line options
.BI " const char *" optstring ,
.BI " const struct option *" longopts ", int *" longindex );
.fi
+.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.ad l
+.in
+.sp
+.BR getopt ():
+_POSIX_C_SOURCE\ >=\ 2 || _XOPEN_SOURCE || _POSIX_SOURCE
+.br
+.BR getopt_long (),
+.BR getopt_long_only ():
+_GNU_SOURCE
+.ad b
.SH DESCRIPTION
The
.BR getopt ()