]> granicus.if.org Git - postgresql/blob - src/include/getopt_long.h
A visit from the message-style police ...
[postgresql] / src / include / 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
6  * PostgreSQL Global Development Group
7  *
8  * $Header: /cvsroot/pgsql/src/include/getopt_long.h,v 1.1 2003/01/06 18:53:25 petere Exp $
9  */
10
11 /* These are picked up from the system's getopt() facility. */
12 extern int opterr;
13 extern int optind;
14 extern int optopt;
15 extern char *optarg;
16
17 /* Some systems have this, otherwise you need to define it somewhere. */
18 extern int optreset;
19
20 struct option {
21         const char *name;
22         int has_arg;
23         int *flag;
24         int val;
25 };
26
27 #define no_argument 0
28 #define required_argument 1
29
30 int
31 getopt_long(int argc, char * const argv[],
32                         const char *optstring,
33                         const struct option *longopts, int *longindex);