mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Centralize getopt-related declarations in a new header file pg_getopt.h.
We used to have externs for getopt() and its API variables scattered all over the place. Now that we find we're going to need to tweak the variable declarations for Cygwin, it seems like a good idea to have just one place to tweak. In this commit, the variables are declared "#ifndef HAVE_GETOPT_H". That may or may not work everywhere, but we'll soon find out. Andres Freund
This commit is contained in:
@@ -9,15 +9,7 @@
|
||||
#ifndef GETOPT_LONG_H
|
||||
#define GETOPT_LONG_H
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
/* These are picked up from the system's getopt() facility. */
|
||||
extern int opterr;
|
||||
extern int optind;
|
||||
extern int optopt;
|
||||
extern char *optarg;
|
||||
#include "pg_getopt.h"
|
||||
|
||||
#ifndef HAVE_STRUCT_OPTION
|
||||
|
||||
|
Reference in New Issue
Block a user