fix includes
[m6w6/libmemcached] / src / win32 / getopt.h
1 #pragma once
2
3 extern "C" {
4
5 extern int opterr; /* if error message should be printed */
6 extern int optind; /* index into parent argv vector */
7 extern char *optarg; /* argument associated with option */
8
9 struct option /* specification for a long form option... */
10 {
11 const char *name; /* option name, without leading hyphens */
12 int has_arg; /* does it take an argument? */
13 int *flag; /* where to save its status, or NULL */
14 int val; /* its associated status value */
15 };
16
17 enum /* permitted values for its `has_arg' field... */
18 {
19 no_argument = 0, /* option never takes an argument */
20 required_argument, /* option always requires an argument */
21 optional_argument /* option may take an argument */
22 };
23
24 int getopt(int nargc, char * const *nargv, const char *options);
25 int getopt_long(int nargc, char * const *nargv, const char *options,
26 const struct option *long_options, int *idx);
27 int getopt_long_only(int nargc, char * const *nargv, const char *options,
28 const struct option *long_options, int *idx);
29
30 }