summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-12-08 18:04:38 +0000
committerBruce Momjian <bruce@momjian.us>2005-12-08 18:04:38 +0000
commit7f155c3322cb8e40f589be270d2eeebfbddfad23 (patch)
tree3f8dcbfbd136989a7b3bb5a21ad0c6b84cfa36df
parent00b013b56edae286f9601b902462e824d8a9387e (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 7d42798dbe3..50948a6bf28 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;