summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2005-12-08 18:04:38 +0000
committerBruce Momjian2005-12-08 18:04:38 +0000
commitb0d809eae00ec6f089349969709445141b30fa5a (patch)
treee87c9b34aa3f8f27d1a819a4a92a3e5bcf3c1cd7
parent7d3c85705db2d132a1c9e54afc717a03db527bf9 (diff)
I recently received the Debian bug report below about missing iconv
support for the dbf2pg contrib module. The submitter created a patch which replaces the silent ignoring of -F (when iconv support is disabled) with a meaningful warning. Martin Pitt
-rw-r--r--contrib/dbase/dbf2pg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/dbase/dbf2pg.c b/contrib/dbase/dbf2pg.c
index 7d42798dbe..50948a6bf2 100644
--- a/contrib/dbase/dbf2pg.c
+++ b/contrib/dbase/dbf2pg.c
@@ -618,10 +618,14 @@ main(int argc, char **argv)
case 'U':
username = (char *) strdup(optarg);
break;
-#ifdef HAVE_ICONV_H
case 'F':
+#ifdef HAVE_ICONV_H
charset_from = (char *) strdup(optarg);
+#else
+ printf("WARNING: dbf2pg was compiled without iconv support, ignoring -F option\n");
+#endif
break;
+#ifdef HAVE_ICONV_H
case 'T':
charset_to = (char *) strdup(optarg);
break;