QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
getopt_long.h
Go to the documentation of this file.
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 extern int getopt_long(int argc, char *const argv[],
41  const char *optstring,
42  const struct option * longopts, int *longindex);
43 #endif
44 
45 extern int getopt_long_only(int argc, char * const argv[], const char *optstring,
46  const struct option *longopts, int *longindex);
47 
48 #endif /* GETOPT_LONG_H */