PostgreSQL Source Code git master
getopt_long.h
Go to the documentation of this file.
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-2025, PostgreSQL Global Development Group
6 *
7 * src/include/getopt_long.h
8 */
9/* IWYU pragma: always_keep */
10#ifndef GETOPT_LONG_H
11#define GETOPT_LONG_H
12
13#include "pg_getopt.h" /* IWYU pragma: export */
14
15#ifndef HAVE_STRUCT_OPTION
16
17struct option
18{
19 const char *name;
21 int *flag;
22 int val;
23};
24
25#define no_argument 0
26#define required_argument 1
27#define optional_argument 2
28#endif
29
30#ifndef HAVE_GETOPT_LONG
31
32extern int getopt_long(int argc, char *const argv[],
33 const char *optstring,
34 const struct option *longopts, int *longindex);
35#endif
36
37#endif /* GETOPT_LONG_H */
int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
Definition: getopt_long.c:60
int val
Definition: getopt_long.h:22
int has_arg
Definition: getopt_long.h:20
int * flag
Definition: getopt_long.h:21
const char * name
Definition: getopt_long.h:19