summaryrefslogtreecommitdiff
path: root/contrib/dbase/dbf2pg.c
diff options
context:
space:
mode:
authorTom Lane2002-01-10 01:11:45 +0000
committerTom Lane2002-01-10 01:11:45 +0000
commit92a2598f9744881a99f44f119bb0eb6ccde36c6c (patch)
treed7ca45d6c4a48156cff396d9889637e984ad64ed /contrib/dbase/dbf2pg.c
parent4d72af6cb31baa8d92bc86955ea7e5c4bc57eaad (diff)
The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
Diffstat (limited to 'contrib/dbase/dbf2pg.c')
-rw-r--r--contrib/dbase/dbf2pg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/dbase/dbf2pg.c b/contrib/dbase/dbf2pg.c
index 8b7d989a072..5f5e9d2823f 100644
--- a/contrib/dbase/dbf2pg.c
+++ b/contrib/dbase/dbf2pg.c
@@ -16,6 +16,9 @@
#ifdef HAVE_ICONV_H
#include <iconv.h>
#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
#include "libpq-fe.h"
#include "dbf.h"
@@ -673,7 +676,7 @@ main(int argc, char **argv)
char *query;
dbhead *dbh;
- while ((i = getopt(argc, argv, "DWflucvh:b:e:d:t:s:B:U:F:T:")) != EOF)
+ while ((i = getopt(argc, argv, "DWflucvh:b:e:d:t:s:B:U:F:T:")) != -1)
{
switch (i)
{