From defa8eb04522435c344b4ea2ba9ca2342251ad09 Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Sun, 2 Oct 2022 21:33:40 -0500 Subject: [PATCH] getopt.h: remove leading double underscore from argc/argv causes an error on Windows due to __argc and __argv being defined to something else Signed-off-by: Christopher Degawa --- include/getopt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/getopt.h b/include/getopt.h index b0147e9d..cfcc92c0 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -131,20 +131,20 @@ struct option /* 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, +extern int getopt_long (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); -extern int getopt_long_only (int __argc, char *const *__argv, +extern int getopt_long_only (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int __argc, char *const *__argv, +extern int _getopt_internal (int argc, char *const *argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only);