[x264-devel] commit: Add getopt_long to the included getopt.c (Steven Walters )

git version control git at videolan.org
Thu Jan 14 05:51:07 CET 2010


x264 | branch: master | Steven Walters <kemuri9 at gmail.com> | Tue Jan 12 22:55:10 2010 -0500| [eda7bf0d97786c04a8563606fd43eab4494490d6] | committer: Jason Garrett-Glaser 

Add getopt_long to the included getopt.c
Fixes option handling on OSs that have a nonworking/missing getopt (e.g. Solaris).

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=eda7bf0d97786c04a8563606fd43eab4494490d6
---

 extras/getopt.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/extras/getopt.c b/extras/getopt.c
index 4c0cb10..434efe7 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



More information about the x264-devel mailing list