2003-01-06 19:53:25 +01:00
|
|
|
/*
|
|
|
|
* Portions Copyright (c) 1987, 1993, 1994
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
2010-01-02 17:58:17 +01:00
|
|
|
* Portions Copyright (c) 2003-2010, PostgreSQL Global Development Group
|
2003-01-06 19:53:25 +01:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/getopt_long.h
|
2003-01-06 19:53:25 +01:00
|
|
|
*/
|
2003-08-07 23:11:58 +02:00
|
|
|
#ifndef GETOPT_LONG_H
|
|
|
|
#define GETOPT_LONG_H
|
|
|
|
|
|
|
|
#ifdef HAVE_GETOPT_H
|
|
|
|
#include <getopt.h>
|
|
|
|
#endif
|
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;
|
|
|
|
|
2003-08-07 23:11:58 +02:00
|
|
|
#ifndef HAVE_STRUCT_OPTION
|
|
|
|
|
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-07 23:11:58 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HAVE_GETOPT_LONG
|
|
|
|
|
|
|
|
extern 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);
|
2003-08-07 23:11:58 +02:00
|
|
|
#endif
|
|
|
|
|
2003-08-08 23:42:59 +02:00
|
|
|
#endif /* GETOPT_LONG_H */
|