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-2010, PostgreSQL Global Development Group 6 */ 7 #ifndef GETOPT_LONG_H 8 #define GETOPT_LONG_H 9 10 extern int opterr; 11 extern int optind; 12 extern int optopt; 13 extern char *optarg; 14 15 struct option 16 { 17 const char *name; 18 int has_arg; 19 int *flag; 20 int val; 21 }; 22 23 #define no_argument 0 24 #define required_argument 1 25 26 extern int getopt_long(int argc, char *const argv[], 27 const char *optstring, 28 const struct option * longopts, int *longindex); 29 30 #endif /* GETOPT_LONG_H */ 31