Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / msvc / getopt_long.h
1 /*
2  * Portions Copyright (c) 1987, 1993, 1994
3  * The Regents of the University of California.  All rights reserved.
4  *
5  * Portions Copyright (c) 2003-2007, PostgreSQL Global Development Group
6  *
7  * $PostgreSQL: pgsql/src/include/getopt_long.h,v 1.8 2007/01/05 22:19:50 momjian Exp $
8  */
9 #ifndef GETOPT_LONG_H
10 #define GETOPT_LONG_H
11
12 #ifdef HAVE_GETOPT_H
13 #include <getopt.h>
14 #endif
15
16 /* These are picked up from the system's getopt() facility. */
17 extern int      opterr;
18 extern int      optind;
19 extern int      optopt;
20 extern char *optarg;
21
22 /* Some systems have this, otherwise you need to define it somewhere. */
23 extern int      optreset;
24
25 #ifndef HAVE_STRUCT_OPTION
26
27 struct option
28 {
29         const char *name;
30         int                     has_arg;
31         int                *flag;
32         int                     val;
33 };
34
35 #define no_argument 0
36 #define required_argument 1
37 #endif
38
39 #ifndef HAVE_GETOPT_LONG
40
41 extern int getopt_long(int argc, char *const argv[],
42                         const char *optstring,
43                         const struct option * longopts, int *longindex);
44 #endif
45
46 #endif   /* GETOPT_LONG_H */