1
0
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:
Peter Eisentraut
2003-01-06 18:53:25 +00:00
parent 6e90803f90
commit 939a59ffc6
14 changed files with 280 additions and 200 deletions

View File

@ -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