opnsense-src/contrib/libevent/WIN32-Code/getopt.h
Cy Schubert 4ebd34fbd5 libevent: Import libevent 2.1.12
Merge commit '5223d1d95fddcef6f9a36e264a5800bd907ade8b' into main

(cherry picked from commit b50261e21f39a6c7249a49e7b60aa878c98512a8)
2023-11-28 07:15:25 -08:00

33 lines
688 B
C

#ifndef __GETOPT_H__
#define __GETOPT_H__
#ifdef __cplusplus
extern "C" {
#endif
extern int opterr; /* if error message should be printed */
extern int optind; /* index into parent argv vector */
extern int optopt; /* character checked for validity */
extern int optreset; /* reset getopt */
extern char *optarg; /* argument associated with option */
struct option
{
const char *name;
int has_arg;
int *flag;
int val;
};
#define no_argument 0
#define required_argument 1
#define optional_argument 2
int getopt(int, char**, const char*);
int getopt_long(int, char**, const char*, const struct option*, int*);
#ifdef __cplusplus
}
#endif
#endif /* __GETOPT_H__ */