2003-01-06 19:53:25 +01:00
|
|
|
/*
|
|
|
|
* Portions Copyright (c) 1987, 1993, 1994
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
2016-01-02 19:33:40 +01:00
|
|
|
* Portions Copyright (c) 2003-2016, 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
|
|
|
|
|
2014-02-15 20:31:30 +01:00
|
|
|
#include "pg_getopt.h"
|
2003-01-06 19:53:25 +01:00
|
|
|
|
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
|
2014-09-10 17:21:50 +02:00
|
|
|
#define optional_argument 2
|
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 */
|