+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
-#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.
}
else if (xgettext_current_source_encoding != po_charset_utf8)
{
+#if HAVE_ICONV
struct conversion_context context;
context.from_code = xgettext_current_source_encoding;
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;