]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix compilation error on systems without iconv().
authorBruno Haible <bruno@clisp.org>
Tue, 26 Jul 2005 13:37:11 +0000 (13:37 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:42 +0000 (12:12 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/xgettext.c

index f9ea1165cc58e41ea841847d1ab255a3984c7b55..41c91486a198bfad98eeb7e2ab6b0a4f999a4e2e 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-26  Bruno Haible  <bruno@clisp.org>
+
+       Fix compilation error on systems without iconv().
+       * xgettext.c (convert_string): Remove fallback macro definition.
+       (from_current_source_encoding) [!HAVE_ICONV]: Just abort here.
+
 2005-07-17  Bruno Haible  <bruno@clisp.org>
 
        * po-lex.c (mb_width): Remove gcc warnings on platform with unsigned
index 40844ecc4fe5de093e5a83942f8dc10dfcceed08..be4d8b30cf644755fd6de4b1bcd94994b5f835c9 100644 (file)
@@ -1642,14 +1642,6 @@ extract_from_file (const char *file_name, extractor_ty extractor,
 
 
 
-#if !HAVE_ICONV
-/* If we don't have iconv(), the only supported values for
-   xgettext_global_source_encoding and thus also for
-   xgettext_current_source_encoding are ASCII and UTF-8.
-   convert_string() should not be called in this case.  */
-#define convert_string(cd,string,context) (abort (), (string))
-#endif
-
 /* Convert the given string from xgettext_current_source_encoding to
    the output file encoding (i.e. ASCII or UTF-8).
    The resulting string is either the argument string, or freshly allocated.
@@ -1678,6 +1670,7 @@ Please specify the source encoding through --from-code.\n"),
     }
   else if (xgettext_current_source_encoding != po_charset_utf8)
     {
+#if HAVE_ICONV
       struct conversion_context context;
 
       context.from_code = xgettext_current_source_encoding;
@@ -1685,6 +1678,13 @@ Please specify the source encoding through --from-code.\n"),
       context.from_filename = file_name;
 
       string = convert_string (xgettext_current_source_iconv, string, &context);
+#else
+      /* If we don't have iconv(), the only supported values for
+        xgettext_global_source_encoding and thus also for
+        xgettext_current_source_encoding are ASCII and UTF-8.
+        convert_string() should not be called in this case.  */
+      abort ();
+#endif
     }
 
   return (char *) string;