mirror of
https://github.com/postgres/postgres.git
synced 2025-07-20 05:03:10 +03:00
Use our own version of getopt_long() if the OS doesn't have one.
This commit is contained in:
@ -61,7 +61,6 @@ int nargc;
|
||||
char *const * nargv;
|
||||
const char *ostr;
|
||||
{
|
||||
extern char *__progname;
|
||||
static char *place = EMSG; /* option letter processing */
|
||||
char *oli; /* option letter list index */
|
||||
|
||||
@ -93,7 +92,7 @@ const char *ostr;
|
||||
++optind;
|
||||
if (opterr && *ostr != ':')
|
||||
(void) fprintf(stderr,
|
||||
"%s: illegal option -- %c\n", __progname, optopt);
|
||||
"%s: illegal option -- %c\n", argv[0], optopt);
|
||||
return BADCH;
|
||||
}
|
||||
if (*++oli != ':')
|
||||
@ -114,7 +113,7 @@ const char *ostr;
|
||||
if (opterr)
|
||||
(void) fprintf(stderr,
|
||||
"%s: option requires an argument -- %c\n",
|
||||
__progname, optopt);
|
||||
argv[0], optopt);
|
||||
return BADCH;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user