# HG changeset patch
# User Steve Borho <[email protected]>
# Date 1439523373 -19800
#      Fri Aug 14 09:06:13 2015 +0530
# Node ID 25ddcc4f9f0ce7822373a74484ad237bc04e2b78
# Parent  bc5a7c2ac38b06d2a232b983f10bc0394d252ad7
getopt: remove double underscores from prototype arguments (fixes #162)

It seems that the latest stdint.h from Microsoft defines a macro named __arg
which causes our compat getopt.h to mis-compile.

diff -r bc5a7c2ac38b -r 25ddcc4f9f0c source/compat/getopt/getopt.h
--- a/source/compat/getopt/getopt.h     Wed Aug 12 15:13:51 2015 +0530
+++ b/source/compat/getopt/getopt.h     Fri Aug 14 09:06:13 2015 +0530
@@ -144,23 +144,23 @@
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
    errors, only prototype getopt for the GNU C library.  */
-extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
+extern int getopt (int argc, char *const *argv, const char *shortopts);
 # else /* not __GNU_LIBRARY__ */
 extern int getopt ();
 # endif /* __GNU_LIBRARY__ */
 
 # ifndef __need_getopt
-extern int getopt_long (int __argc, char *const *__argv, const char 
*__shortopts,
-                       const struct option *__longopts, int32_t *__longind);
-extern int getopt_long_only (int __argc, char *const *__argv,
-                            const char *__shortopts,
-                            const struct option *__longopts, int32_t 
*__longind);
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+                       const struct option *longopts, int32_t *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int32_t *longind);
 
 /* Internal only.  Users should not call this directly.  */
-extern int _getopt_internal (int __argc, char *const *__argv,
-                            const char *__shortopts,
-                            const struct option *__longopts, int32_t 
*__longind,
-                            int __long_only);
+extern int _getopt_internal (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int32_t *longind,
+                            int longonly);
 # endif
 #else /* not __STDC__ */
 extern int getopt ();
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to