I recently received the Debian bug report below about missing iconv
authorBruce Momjian
Thu, 8 Dec 2005 18:04:33 +0000 (18:04 +0000)
committerBruce Momjian
Thu, 8 Dec 2005 18:04:33 +0000 (18:04 +0000)
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

contrib/dbase/dbf2pg.c

index 7d42798dbe3b901091a7eb22a9ecc6512305296b..50948a6bf2847c9b010daae08386dc7eea735343 100644 (file)
@@ -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;