9.0 beta2 pg_upgrade command line parsing - Mailing list pgsql-hackers

From Steve Singer
Subject 9.0 beta2 pg_upgrade command line parsing
Date
Msg-id 4C17F04B.5010901@ca.afilias.info
Whole thread Raw
Responses Re: 9.0 beta2 pg_upgrade command line parsing  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
When I try running pg_upgrade from beta2 on an AIX server I'm unable to
get beyond the command line parsing (no matter what command line
arguments I pass in it always complains about the usage).


When I compile pg_upgrade it complains about:

option.c: In function 'parseCommandLine':
option.c:103: warning: comparison is always true due to limited range of
data type

getopt_long  (both our version in ports and the gnu version) is defined
to return an int.

The attach patch allows me to get beyond the options loop under AIX.





--
Steve Singer
Afilias Canada
Data Services Developer
416-673-1142
diff --git a/contrib/pg_upgrade/option.c b/contrib/pg_upgrade/option.c
index 83300a9..a4760a7 100644
--- a/contrib/pg_upgrade/option.c
+++ b/contrib/pg_upgrade/option.c
@@ -46,7 +46,7 @@ parseCommandLine(migratorContext *ctx, int argc, char *argv[])
         {"verbose", no_argument, NULL, 'v'},
         {NULL, 0, NULL, 0}
     };
-    char        option;            /* Command line option */
+    int        option;            /* Command line option */
     int            optindex = 0;    /* used by getopt_long */
     int            user_id;


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: New PGXN Extension site
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: New PGXN Extension site