Skip to content

Commit fdf8dc6

Browse files
committed
Rename reserved parameter names in getopt.h prototypes
The __argc and __argv identifiers may conflict with Windows runtime symbols. Use plain argc/argv names in the function prototypes. Made-with: Cursor
1 parent c56fafc commit fdf8dc6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

win32/getopt.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,23 @@ struct option
130130
/* Many other libraries have conflicting prototypes for getopt, with
131131
differences in the consts, in stdlib.h. To avoid compilation
132132
errors, only prototype getopt for the GNU C library. */
133-
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
133+
extern int getopt (int argc, char *const *argv, const char *shortopts);
134134
# else /* not __GNU_LIBRARY__ */
135-
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
135+
extern int getopt (int argc, char *const *argv, const char *shortopts);
136136
# endif /* __GNU_LIBRARY__ */
137137

138138
# ifndef __need_getopt
139-
extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
140-
const struct option *__longopts, int *__longind);
141-
extern int getopt_long_only (int __argc, char *const *__argv,
142-
const char *__shortopts,
143-
const struct option *__longopts, int *__longind);
139+
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
140+
const struct option *longopts, int *longind);
141+
extern int getopt_long_only (int argc, char *const *argv,
142+
const char *shortopts,
143+
const struct option *longopts, int *longind);
144144

145145
/* Internal only. Users should not call this directly. */
146-
extern int _getopt_internal (int __argc, char *const *__argv,
147-
const char *__shortopts,
148-
const struct option *__longopts, int *__longind,
149-
int __long_only);
146+
extern int _getopt_internal (int argc, char *const *argv,
147+
const char *shortopts,
148+
const struct option *longopts, int *longind,
149+
int long_only);
150150
# endif
151151

152152
#ifdef __cplusplus

0 commit comments

Comments
 (0)