Imported Upstream version 0.7.12
[platform/upstream/libsolv.git] / win32 / getopt.h
1 #ifndef _GETOPT_H
2 #define _GETOPT_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include "config.h"
9
10 int getopt(int, char * const [], const char *);
11
12 SOLV_API extern char *optarg;
13 SOLV_API extern int optind, opterr, optopt, optreset;
14
15 struct option {
16         const char *name;
17         int has_arg;
18         int *flag;
19         int val;
20 };
21
22 int getopt_long(int, char *const *, const char *, const struct option *, int *);
23 int getopt_long_only(int, char *const *, const char *, const struct option *, int *);
24
25 #define no_argument        0
26 #define required_argument  1
27 #define optional_argument  2
28
29 #ifdef __cplusplus
30 }
31 #endif
32
33 #endif