mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Prefix all libc replacements with sudo_ and #define the real name
to the sudo_ version. That way we don't pollute the libc namespace.
This commit is contained in:
@@ -55,12 +55,21 @@ struct option {
|
||||
int val;
|
||||
};
|
||||
|
||||
int getopt_long(int, char * const *, const char *,
|
||||
const struct option *, int *);
|
||||
int getopt_long_only(int, char * const *, const char *,
|
||||
const struct option *, int *);
|
||||
int sudo_getopt_long(int, char * const *, const char *,
|
||||
const struct option *, int *);
|
||||
#undef getopt_long
|
||||
#define getopt_long(_a, _b, _c, _d, _e) \
|
||||
sudo_getopt_long((_a), (_b), (_c), (_d), (_e))
|
||||
|
||||
int sudo_getopt_long_only(int, char * const *, const char *,
|
||||
const struct option *, int *);
|
||||
#undef getopt_long_only
|
||||
#define getopt_long_only(_a, _b, _c, _d, _e) \
|
||||
sudo_getopt_long_only((_a), (_b), (_c), (_d), (_e))
|
||||
#if 0
|
||||
int getopt(int, char * const [], const char *);
|
||||
int sudo_getopt(int, char * const [], const char *);
|
||||
#undef getopt
|
||||
#define getopt(_a, _b, _c) sudo_getopt((_a), (_b), (_c))
|
||||
#endif
|
||||
|
||||
extern char *optarg; /* getopt(3) external variables */
|
||||
|
Reference in New Issue
Block a user