From eda7bf0d97786c04a8563606fd43eab4494490d6 Mon Sep 17 00:00:00 2001 From: Steven Walters Date: Tue, 12 Jan 2010 22:55:10 -0500 Subject: [PATCH] Add getopt_long to the included getopt.c Fixes option handling on OSs that have a nonworking/missing getopt (e.g. Solaris). --- extras/getopt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extras/getopt.c b/extras/getopt.c index 4c0cb101..434efe7e 100644 --- a/extras/getopt.c +++ b/extras/getopt.c @@ -980,6 +980,16 @@ getopt (argc, argv, optstring) 0); } +int getopt_long (argc, argv, optstring, long_options, opt_index) + int argc; + char *const *argv; + const char *optstring; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, optstring, long_options, opt_index, 0); +} + #endif /* Not ELIDE_CODE. */ #ifdef TEST -- 2.47.3