9.0 beta2 pg_upgrade command line parsing

Поиск
Список
Период
Сортировка
От Steve Singer
Тема 9.0 beta2 pg_upgrade command line parsing
Дата
Msg-id 4C17F04B.5010901@ca.afilias.info
обсуждение исходный текст
Ответы Re: 9.0 beta2 pg_upgrade command line parsing  (Bruce Momjian <bruce@momjian.us>)
Список 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 по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: New PGXN Extension site
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: New PGXN Extension site