aboutsummaryrefslogtreecommitdiffstats
path: root/getopt.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 14:55:10 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 14:55:10 +0300
commit00ef0423acd97cb964a2bae54c93a03a8ab50e5e (patch)
tree2864426773f537f912db1bd716c27b713c5f7dcf /getopt.h
parent3ba50a15ebd976f7a88393e2e45dc14b6478b9a9 (diff)
downloadegawk-00ef0423acd97cb964a2bae54c93a03a8ab50e5e.tar.gz
egawk-00ef0423acd97cb964a2bae54c93a03a8ab50e5e.tar.bz2
egawk-00ef0423acd97cb964a2bae54c93a03a8ab50e5e.zip
Move to 3.1.8.
Diffstat (limited to 'getopt.h')
-rw-r--r--getopt.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/getopt.h b/getopt.h
index c3d63332..b84953f7 100644
--- a/getopt.h
+++ b/getopt.h
@@ -151,6 +151,22 @@ struct option
errors, only prototype getopt for the GNU C library. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW;
+
+# if defined __need_getopt && defined __USE_POSIX2 \
+ && !defined __USE_POSIX_IMPLICITLY && !defined __USE_GNU
+/* The GNU getopt has more functionality than the standard version. The
+ additional functionality can be disable at runtime. This redirection
+ helps to also do this at runtime. */
+# ifdef __REDIRECT
+ extern int __REDIRECT (getopt, (int ___argc, char *const *___argv,
+ const char *__shortopts),
+ __posix_getopt) __THROW;
+# else
+extern int __posix_getopt (int ___argc, char *const *___argv,
+ const char *__shortopts) __THROW;
+# define getopt __posix_getopt
+# endif
+# endif
#else /* not __GNU_LIBRARY__ */
extern int getopt ();
#endif /* __GNU_LIBRARY__ */