Header And Logo

PostgreSQL
| The world's most advanced open source database.

getopt_long.h

Go to the documentation of this file.
00001 /*
00002  * Portions Copyright (c) 1987, 1993, 1994
00003  * The Regents of the University of California.  All rights reserved.
00004  *
00005  * Portions Copyright (c) 2003-2013, PostgreSQL Global Development Group
00006  *
00007  * src/include/getopt_long.h
00008  */
00009 #ifndef GETOPT_LONG_H
00010 #define GETOPT_LONG_H
00011 
00012 #ifdef HAVE_GETOPT_H
00013 #include <getopt.h>
00014 #endif
00015 
00016 /* These are picked up from the system's getopt() facility. */
00017 extern int  opterr;
00018 extern int  optind;
00019 extern int  optopt;
00020 extern char *optarg;
00021 
00022 #ifndef HAVE_STRUCT_OPTION
00023 
00024 struct option
00025 {
00026     const char *name;
00027     int         has_arg;
00028     int        *flag;
00029     int         val;
00030 };
00031 
00032 #define no_argument 0
00033 #define required_argument 1
00034 #endif
00035 
00036 #ifndef HAVE_GETOPT_LONG
00037 
00038 extern int getopt_long(int argc, char *const argv[],
00039             const char *optstring,
00040             const struct option * longopts, int *longindex);
00041 #endif
00042 
00043 #endif   /* GETOPT_LONG_H */