2003-01-06 19:53:25 +01:00
|
|
|
/*
|
|
|
|
* Portions Copyright (c) 1987, 1993, 1994
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* Portions Copyright (c) 2003
|
|
|
|
* PostgreSQL Global Development Group
|
|
|
|
*
|
2003-08-04 02:43:34 +02:00
|
|
|
* $Header: /cvsroot/pgsql/src/include/getopt_long.h,v 1.2 2003/08/04 00:43:29 momjian Exp $
|
2003-01-06 19:53:25 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* These are picked up from the system's getopt() facility. */
|
2003-08-04 02:43:34 +02:00
|
|
|
extern int opterr;
|
|
|
|
extern int optind;
|
|
|
|
extern int optopt;
|
2003-01-06 19:53:25 +01:00
|
|
|
extern char *optarg;
|
|
|
|
|
|
|
|
/* Some systems have this, otherwise you need to define it somewhere. */
|
2003-08-04 02:43:34 +02:00
|
|
|
extern int optreset;
|
2003-01-06 19:53:25 +01:00
|
|
|
|
2003-08-04 02:43:34 +02:00
|
|
|
struct option
|
|
|
|
{
|
2003-01-06 19:53:25 +01:00
|
|
|
const char *name;
|
2003-08-04 02:43:34 +02:00
|
|
|
int has_arg;
|
|
|
|
int *flag;
|
|
|
|
int val;
|
2003-01-06 19:53:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#define no_argument 0
|
|
|
|
#define required_argument 1
|
|
|
|
|
2003-08-04 02:43:34 +02:00
|
|
|
int getopt_long(int argc, char *const argv[],
|
2003-01-06 19:53:25 +01:00
|
|
|
const char *optstring,
|
2003-08-04 02:43:34 +02:00
|
|
|
const struct option * longopts, int *longindex);
|